Rev 1737 | Rev 1754 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1737 | Rev 1744 | ||
|---|---|---|---|
| Line 94... | Line 94... | ||
| 94 | #endif |
94 | #endif |
| 95 | 95 | ||
| 96 | void sns_irTransceive_Init(void) |
96 | void sns_irTransceive_Init(void) |
| 97 | { |
97 | { |
| 98 | /* Debug IO, PB7 */ |
98 | /* Debug IO, PB7 */ |
| - | 99 | gpio_set_out(GPIO_D7); |
|
| - | 100 | gpio_set_pin(GPIO_D7); |
|
| 99 | gpio_set_out( |
101 | gpio_set_out(GPIO_B0); |
| - | 102 | gpio_set_pin(GPIO_B0); |
|
| - | 103 | gpio_set_out(GPIO_B7); |
|
| 100 | gpio_set_pin( |
104 | gpio_set_pin(GPIO_B7); |
| 101 | 105 | ||
| 102 | StdCan_Set_class(irTxMsg.Header, CAN_MODULE_CLASS_SNS); |
106 | StdCan_Set_class(irTxMsg.Header, CAN_MODULE_CLASS_SNS); |
| 103 | StdCan_Set_direction(irTxMsg.Header, DIRECTIONFLAG_FROM_OWNER); |
107 | StdCan_Set_direction(irTxMsg.Header, DIRECTIONFLAG_FROM_OWNER); |
| 104 | irTxMsg.Header.ModuleType = CAN_MODULE_TYPE_SNS_IRTRANSCEIVE; |
108 | irTxMsg.Header.ModuleType = CAN_MODULE_TYPE_SNS_IRTRANSCEIVE; |
| 105 | irTxMsg.Header.ModuleId = sns_irTransceive_ID; |
109 | irTxMsg.Header.ModuleId = sns_irTransceive_ID; |
| Line 167... | Line 171... | ||
| 167 | 171 | ||
| 168 | void sns_irTransceive_Process(void) |
172 | void sns_irTransceive_Process(void) |
| 169 | { |
173 | { |
| 170 | for (uint8_t channel=0; channel < IR_SUPPORTED_NUM_CHANNELS; channel++) |
174 | for (uint8_t channel=0; channel < IR_SUPPORTED_NUM_CHANNELS; channel++) |
| 171 | { |
175 | { |
| 172 | //gpio_toggle_pin(EXP_A); /* Toggle debug output PB7 */ |
- | |
| 173 | 176 | ||
| 174 | #if IR_RX_ENABLE==1 |
177 | #if IR_RX_ENABLE==1 |
| 175 | switch (irRxChannel[channel].state) |
178 | switch (irRxChannel[channel].state) |
| 176 | { |
179 | { |
| 177 | case sns_irTransceive_STATE_IDLE: |
180 | case sns_irTransceive_STATE_IDLE: |