25 lines
482 B
C
25 lines
482 B
C
#ifndef _AVR_KBD_H_
|
|
#define _AVR_KBD_H_
|
|
|
|
#include <avr/io.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#define KBD_FLAG_ERROR (_BV(0))
|
|
#define KBD_FLAG_BREAK (_BV(1))
|
|
#define KBD_FLAG_EXT (_BV(2))
|
|
|
|
#define KBD_CODE_UP 0xe075
|
|
#define KBD_CODE_LEFT 0xe06b
|
|
#define KBD_CODE_DOWN 0xe072
|
|
#define KBD_CODE_RIGHT 0xe074
|
|
|
|
#define KBD_CMD_RESET 0xff
|
|
|
|
|
|
void kbd_handle(uint16_t code, bool make);
|
|
|
|
void kbd_send(uint8_t command);
|
|
void kbd_init(void);
|
|
|
|
#endif /* _AVR_KBD_H_ */
|