12 #define T0_RELOAD 0xb1
16 #define T0_INC20 25 //78
20 #define IV_1S 1202 //50
24 #define BTN_DN (PINB & _BV(PINB2)) //PINB.2
28 #define BTN_UP (PINB & _BV(PINB1)) //PINB.1
32 #define DEBOUNCED_S 130//10
36 #define DEBOUNCED_L 8 * DEBOUNCED_S
40 #define BTN_TEMP_DELTA 100
44 #define ENG_RUN_CW PORTB |= _BV(PB4)
48 #define ENG_STOP_CW PORTB &= ~_BV(PB4)
52 #define ENG_RUN_CCW PORTB |= _BV(PB3)
56 #define ENG_STOP_CCW PORTB &= ~_BV(PB3)
64 ISR(TIMER0_COMPA_vect);
UCHAR GetTenthSec(void)
interface to get the global tenth seconds
void sMov(UCHAR mov)
set minute overflow counter
ISR(TIMER0_COMPA_vect)
compare match interrupt service for OCR0A
void TimerInit(void)
initialize timer resource period: 32µs
UCHAR gMov(void)
return minute overflow counter
BTN_CODE DecodeButton(void)
identify whether a (and which) button is pressed or not