#ifndef _WIRELESS_H #define _WIRELESS_H #include "../../stdafx.h" class Wireless : public IO_Module { public: Wireless() { this->parent = NULL; this->moduleId = 0; } Wireless(uint32 wirelessId) { this->parent = NULL; this->moduleId = wirelessId; switch(wirelessId) { case IO_WIRELESS_MAIN: uart_init(51); // 19200 Baud at 16MHz Atmel break; default: break; } } protected: uint8 transmitPower; public: void SetTransmitPower(uint8 newTransmitPower) { this->transmitPower = newTransmitPower; char buffer[12]; ltoa(this->transmitPower-1, buffer, 10); uart_puts(buffer); } void Send(char* message) { uart_puts(message); } void Send(uint8 message) { uart_putc(message); } int16 Recieve() { return uart_getc(); } }; #endif