Rev 1496 | Rev 1566 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1496 | Rev 1497 | ||
|---|---|---|---|
| Line 164... | Line 164... | ||
| 164 | #elif act_hwPWM_CH4_COM>0 |
164 | #elif act_hwPWM_CH4_COM>0 |
| 165 | TCCR0A=((act_hwPWM_CH4_WGM&0x03)<<WGM00); |
165 | TCCR0A=((act_hwPWM_CH4_WGM&0x03)<<WGM00); |
| 166 | TCCR0B=(((act_hwPWM_CH4_WGM>>2)&0x01)<<WGM02); |
166 | TCCR0B=(((act_hwPWM_CH4_WGM>>2)&0x01)<<WGM02); |
| 167 | #endif |
167 | #endif |
| 168 | 168 | ||
| 169 | /* enable outputs for timer |
169 | /* enable outputs for timer 0 */ |
| 170 | #if act_hwPWM_CH3_COM>0 |
170 | #if act_hwPWM_CH3_COM>0 |
| 171 | gpio_set_out(EXP_F); |
171 | gpio_set_out(EXP_F); |
| 172 | #endif |
172 | #endif |
| 173 | #if act_hwPWM_CH4_COM>0 |
173 | #if act_hwPWM_CH4_COM>0 |
| 174 | gpio_set_out(EXP_G); |
174 | gpio_set_out(EXP_G); |
| Line 198... | Line 198... | ||
| 198 | Timer_SetTimeout(act_hwPWM_FADE_TIMER, 10, TimerTypeFreeRunning, &act_hwPWM_timer_callback); |
198 | Timer_SetTimeout(act_hwPWM_FADE_TIMER, 10, TimerTypeFreeRunning, &act_hwPWM_timer_callback); |
| 199 | #endif |
199 | #endif |
| 200 | 200 | ||
| 201 | /* Setup timeout for sending the status packet */ |
201 | /* Setup timeout for sending the status packet */ |
| 202 | Timer_SetTimeout(act_hwPWM_SEND_STATUS_TIMEOUT, act_hwPWM_SEND_STATUS_INTERVAL_S*1000, TimerTypeFreeRunning, 0); |
202 | Timer_SetTimeout(act_hwPWM_SEND_STATUS_TIMEOUT, act_hwPWM_SEND_STATUS_INTERVAL_S*1000, TimerTypeFreeRunning, 0); |
| 203 |
|
203 | //printf("Hello world!\n"); |
| 204 | } |
204 | } |
| 205 | uint8_t channel_to_send = 1; |
205 | uint8_t channel_to_send = 1; |
| 206 | void act_hwPWM_Process(void) |
206 | void act_hwPWM_Process(void) |
| 207 | { |
207 | { |
| 208 | if (Timer_Expired(act_hwPWM_SEND_STATUS_TIMEOUT)) |
208 | if (Timer_Expired(act_hwPWM_SEND_STATUS_TIMEOUT)) |