source: avrstuff/aktoserial/code/main.c@ b82c7b3

main
Last change on this file since b82c7b3 was b82c7b3, checked in by Adrien Destugues <pulkomandy@…>, 14 years ago
  • Initial import of amiga and ps/2 keyboard testers

git-svn-id: svn://pulkomandy.tk/avrstuff@1 c6672c3c-f6b6-47f9-9001-1fd6b12fecbe

  • Property mode set to 100644
File size: 497 bytes
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
8int 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.