Rev 1922 | Details | Compare with Previous | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1922 | arune | 1 | #ifndef SNS_RFTRANSCEIVE |
| 2 | #define SNS_RFTRANSCEIVE |
||
| 3 | |||
| 4 | /*----------------------------------------------------------------------------- |
||
| 5 | * Includes |
||
| 6 | *---------------------------------------------------------------------------*/ |
||
| 7 | /* system files */ |
||
| 8 | #include <avr/io.h> |
||
| 9 | #include <avr/interrupt.h> |
||
| 10 | #include <stdio.h> |
||
| 11 | /* lib files */ |
||
| 12 | #include <config.h> |
||
| 13 | #include <bios.h> |
||
| 14 | #include <drivers/can/stdcan.h> |
||
| 15 | #include <drivers/timer/timer.h> |
||
| 16 | /* delay.h must be declared after F_CPU */ |
||
| 17 | #include <util/delay.h> |
||
| 18 | #include <drivers/mcu/gpio.h> |
||
| 19 | #include <drivers/ir/transceiver/irtransceiverMulti.h> |
||
| 20 | #include <drivers/ir/protocols.h> |
||
| 21 | |||
| 22 | void sns_rfTransceive_Init(void); |
||
| 23 | void sns_rfTransceive_Process(void); |
||
| 24 | void sns_rfTransceive_HandleMessage(StdCan_Msg_t *rxMsg); |
||
| 25 | void sns_rfTransceive_List(uint8_t ModuleSequenceNumber); |
||
| 26 | |||
| 27 | |||
| 28 | |||
| 29 | |||
| 30 | #define sns_rfTransceive_STATE_IDLE (0) |
||
| 31 | #define sns_rfTransceive_STATE_IR_REPEAT (1) |
||
| 32 | #define sns_rfTransceive_STATE_START_RECEIVE (2) |
||
| 33 | #define sns_rfTransceive_STATE_RECEIVING (3) |
||
| 34 | #define sns_rfTransceive_STATE_START_PAUSE (4) |
||
| 35 | #define sns_rfTransceive_STATE_PAUSING (5) |
||
| 36 | #define sns_rfTransceive_STATE_START_IDLE (6) |
||
| 37 | |||
| 38 | #define sns_rfTransceive_STATE_START_TRANSMIT (7) |
||
| 39 | |||
| 40 | #define sns_rfTransceive_STATE_TRANSMITTING (11) |
||
| 41 | |||
| 42 | #define sns_rfTransceive_STATE_DISABLED 0xff |
||
| 43 | |||
| 44 | |||
| 45 | #define TRUE 1 |
||
| 46 | #define FALSE 0 |
||
| 47 | |||
| 1978 | arune | 48 | #ifndef sns_rfTransceive_USEEEPROM |
| 49 | #define sns_rfTransceive_USEEEPROM 0 |
||
| 50 | #endif |
||
| 51 | |||
| 52 | #if sns_rfTransceive_USEEEPROM==1 |
||
| 1922 | arune | 53 | struct sns_rfTransceive_Data{ |
| 54 | ///TODO: Define EEPROM variables needed by the module |
||
| 55 | uint8_t x; |
||
| 56 | uint16_t y; |
||
| 57 | }; |
||
| 58 | #endif |
||
| 59 | |||
| 60 | #endif // SNS_RFTRANSCEIVE |
||
| 61 | |||
| 62 |