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