main
Line | |
---|
1 | #define F_CPU 16000000UL
|
---|
2 |
|
---|
3 | #include <avr/io.h>
|
---|
4 |
|
---|
5 | #include "amiga_keyboard/amiga_keyboard.h"
|
---|
6 | #include "usart/usart.h"
|
---|
7 |
|
---|
8 | int main() {
|
---|
9 | //debug LED - output
|
---|
10 | DDRD |= (1<<PD6);
|
---|
11 |
|
---|
12 | USARTInit(51);
|
---|
13 | ak_init_keyboard();
|
---|
14 |
|
---|
15 | uint8_t key_code = 0;
|
---|
16 |
|
---|
17 | // Ready!
|
---|
18 | USARTWriteChar('R');
|
---|
19 |
|
---|
20 | while(1) {
|
---|
21 | key_code = ak_read_scancode();
|
---|
22 | //USARTWriteChar(ak_scancode_to_ascii(key_code));
|
---|
23 | USARTWriteHex((key_code >> 1) |(key_code << 7));
|
---|
24 | USARTWriteChar(' ');
|
---|
25 | }
|
---|
26 |
|
---|
27 | return 0;
|
---|
28 | }
|
---|
29 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.