Rev 426 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 426 | Rev 434 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include "timer0.h" |
1 | #include "timer0.h" |
2 | #include "button.h" |
2 | #include "button.h" |
- | 3 | #include "printf_P.h" |
|
Line 3... | Line 4... | ||
3 | 4 | ||
4 | 5 | ||
5 | #ifdef USE_FOLLOWME |
6 | #ifdef USE_FOLLOWME |
Line 14... | Line 15... | ||
14 | 15 | ||
Line 15... | Line 16... | ||
15 | uint16_t ButtonTimer = 0; |
16 | uint16_t ButtonTimer = 0; |
16 | 17 | ||
17 | void Button_Init(void) |
- | |
- | 18 | void Button_Init(void) |
|
18 | { |
19 | { |
19 | 20 | printf("\r\n BUTTON init..."); |
|
20 | // set port pin as input pullup |
21 | // set port pin as input pullup |
21 | #ifdef USE_FOLLOWME |
22 | #ifdef USE_FOLLOWME |
22 | PORTC |= (1 << PORTC6); |
23 | PORTC |= (1 << PORTC6); |
Line 26... | Line 27... | ||
26 | #ifdef USE_SDLOGGER |
27 | #ifdef USE_SDLOGGER |
27 | PORTC |= (1 << PORTC3); |
28 | PORTC |= (1 << PORTC3); |
28 | DDRC &= ~(1 << DDC3); |
29 | DDRC &= ~(1 << DDC3); |
29 | #endif |
30 | #endif |
30 | ButtonTimer = SetDelay(KEY_DELAY_MS); |
31 | ButtonTimer = SetDelay(KEY_DELAY_MS); |
- | 32 | printf("ok"); |
|
31 | } |
33 | } |
Line 32... | Line 34... | ||
32 | 34 | ||
33 | uint8_t GetButton(void) |
35 | uint8_t GetButton(void) |
34 | { |
36 | { |