main
Rev | Line | |
---|
[b82c7b3] | 1 | #include <avr/io.h>
|
---|
| 2 |
|
---|
| 3 | #include "keyboard.h"
|
---|
| 4 | #include "usart.h"
|
---|
| 5 |
|
---|
| 6 | int main() {
|
---|
| 7 |
|
---|
| 8 | USARTInit(51);
|
---|
| 9 | init_keyboard();
|
---|
| 10 |
|
---|
| 11 | //debug LED - output
|
---|
| 12 | DDRD |= (1<<PD6);
|
---|
| 13 |
|
---|
| 14 | uint8_t key_code = 0;
|
---|
| 15 |
|
---|
| 16 | char str_buf[21];
|
---|
| 17 | uint8_t buf_pos = 0;
|
---|
| 18 |
|
---|
| 19 | str_buf[0] = str_buf[1] = 0x00;
|
---|
| 20 | USARTWriteChar('R');
|
---|
| 21 |
|
---|
| 22 | while(1) {
|
---|
| 23 | key_code = read_char();
|
---|
| 24 | USARTWriteChar(render_scan_code(key_code));
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | return 0;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.