diff options
Diffstat (limited to 'kbc.c')
| -rw-r--r-- | kbc.c | 11 |
1 files changed, 8 insertions, 3 deletions
| @@ -90,6 +90,7 @@ static void usart_dis() | |||
| 90 | (void)UDR0; | 90 | (void)UDR0; |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | #if 0 | ||
| 93 | static uint8_t dbgtx[64]; | 94 | static uint8_t dbgtx[64]; |
| 94 | static uint8_t dbgpos; | 95 | static uint8_t dbgpos; |
| 95 | 96 | ||
| @@ -121,6 +122,10 @@ static void dbg_init(void) | |||
| 121 | /* MSB first, cpol = rise,fall, cpha = sample(r),setup(f) */ | 122 | /* MSB first, cpol = rise,fall, cpha = sample(r),setup(f) */ |
| 122 | SPCR = (1 << SPIE) | (1 << SPE); | 123 | SPCR = (1 << SPIE) | (1 << SPE); |
| 123 | } | 124 | } |
| 125 | #else | ||
| 126 | #define dbg_init() | ||
| 127 | #define dbg_wr(x) | ||
| 128 | #endif | ||
| 124 | 129 | ||
| 125 | static volatile uint8_t statecntr = 0; | 130 | static volatile uint8_t statecntr = 0; |
| 126 | 131 | ||
| @@ -332,8 +337,8 @@ static uint8_t cntr = 0; | |||
| 332 | static uint8_t error; | 337 | static uint8_t error; |
| 333 | #endif | 338 | #endif |
| 334 | 339 | ||
| 335 | static const EEMEM char passwd[sizeof(PIN) - 1] = PIN; | 340 | static const EEMEM uint8_t passwd[sizeof(PIN) - 1] = PIN; |
| 336 | static char code[sizeof(PIN)]; | 341 | static uint8_t code[sizeof(PIN)]; |
| 337 | 342 | ||
| 338 | static void state_enter(void) | 343 | static void state_enter(void) |
| 339 | { | 344 | { |
| @@ -479,7 +484,7 @@ ISR(SIG_OVERFLOW0) | |||
| 479 | #define ENT 0x0d | 484 | #define ENT 0x0d |
| 480 | 485 | ||
| 481 | #define KBC_BASE 0x16 | 486 | #define KBC_BASE 0x16 |
| 482 | const PROGMEM char kbc[] = { | 487 | const PROGMEM uint8_t kbc[] = { |
| 483 | /* 0 1 2 3 4 5 6 7 | 488 | /* 0 1 2 3 4 5 6 7 |
| 484 | * 8 9 a b c d e f | 489 | * 8 9 a b c d e f |
| 485 | */ | 490 | */ |
