Elisa3
|
00001 00002 #ifndef IR_COMMUNICATION_H 00003 #define IR_COMMUNICATION_H 00004 00005 00039 #include "variables.h" 00040 #include "utility.h" 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00050 void irCommInit(); 00051 00056 void irCommInitReceiver(); 00057 00062 void irCommInitTransmitter(); 00063 00068 void irCommDeinit(); 00069 00074 void irCommTasks(); 00075 00077 // * \brief Set the data to be sent through IR; the obstacle avoidance and cliff avoidance will be disabled during the transmission. 00078 // * \param value: byte to be sent; sensor: sensor id mask (bit 0 corresponds to sensor 0 in front of robot, id increases clockwise). 00079 // * \return none 00080 // */ 00081 //void irCommSendData(unsigned char value, unsigned char sensorMask); 00082 00088 void irCommSendData(unsigned char value); 00089 00094 unsigned char irCommDataSent(); 00095 00100 unsigned char irCommDataAvailable(); 00101 00106 unsigned char irCommReadData(); 00107 00112 signed char irCommReceivingSensor(); 00113 00118 signed int getBearing(unsigned char sensor); 00119 00120 #ifdef __cplusplus 00121 } // extern "C" 00122 #endif 00123 00124 #endif