source: avrstuff/ps2toserial/code/main.c@ d3f2c17

main
Last change on this file since d3f2c17 was d3f2c17, checked in by Adrien Destugues <pulkomandy@…>, 14 years ago

Maj pour utilisation dans le svn

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

  • Property mode set to 100644
File size: 495 bytes
Line 
1#include <avr/io.h>
2
3#include "../../libs/ps2_keyboard/ps2_keyboard.h"
4#include "../../libs/usart/usart.h"
5
6int 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.