This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
avr-snake/kbd.h

26 lines
482 B
C
Raw Normal View History

2012-12-11 23:06:23 +01:00
#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_ */