Rev 1266 | Details | Compare with Previous | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1266 | pengi | 1 | #ifndef CHN_CHNMASTER |
| 2 | #define CHN_CHNMASTER |
||
| 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 | #include <drivers/mcu/gpio.h> |
||
| 17 | |||
| 18 | //to use PCINT lib. uncomment the line below |
||
| 19 | //#include <drivers/mcu/pcint.h> |
||
| 20 | |||
| 21 | void chn_ChnMaster_RegisterListener( uint16_t channel_id, void (*UpdateFunc)(uint16_t, uint16_t) /* channel, value */ ); |
||
| 22 | void chn_ChnMaster_UpdateChannel( uint16_t channel_id, uint16_t value ); |
||
| 23 | |||
| 24 | void chn_ChnMaster_Init(void); |
||
| 25 | void chn_ChnMaster_Process(void); |
||
| 26 | void chn_ChnMaster_HandleMessage(StdCan_Msg_t *rxMsg); |
||
| 27 | void chn_ChnMaster_List(uint8_t ModuleSequenceNumber); |
||
| 28 | |||
| 29 | |||
| 1978 | arune | 30 | #ifndef chn_ChnMaster_USEEEPROM |
| 31 | #define chn_ChnMaster_USEEEPROM 0 |
||
| 32 | #endif |
||
| 33 | |||
| 34 | #if chn_ChnMaster_USEEEPROM==1 |
||
| 1266 | pengi | 35 | struct chn_ChnMaster_Data{ |
| 36 | ///TODO: Define EEPROM variables needed by the module |
||
| 37 | uint8_t x; |
||
| 38 | uint16_t y; |
||
| 39 | }; |
||
| 40 | #endif |
||
| 41 | |||
| 42 | #endif // CHN_CHNMASTER |