X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=ps2.h;h=a821acde4467e504b9292b4bdde385eb07eda98c;hb=d2b9489a5e19fabb5d6ec285192b19dc25b36d5e;hp=954e59d9f0743eff26d1dd48cc42dd5cb5e5dff1;hpb=2a562a4191a5b9e88731efb5eabd921821f25f7e;p=max%2Ftmk_keyboard.git diff --git a/ps2.h b/ps2.h index 954e59d9..a821acde 100644 --- a/ps2.h +++ b/ps2.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2010 Jun WAKO +Copyright (c) 2010,2011 Jun WAKO This software is licensed with a Modified BSD License. All of this is supposed to be Free Software, Open Source, DFSG-free, @@ -56,17 +56,27 @@ POSSIBILITY OF SUCH DAMAGE. # error "PS/2 data port setting is required in config.h" #endif +#define PS2_ACK 0xFA +#define PS2_RESEND 0xFE +#define PS2_SET_LED 0xED + #define PS2_ERR_NONE 0 #define PS2_ERR_PARITY 0x10 +#define PS2_LED_SCROLL_LOCK 0 +#define PS2_LED_NUM_LOCK 1 +#define PS2_LED_CAPS_LOCK 2 + extern uint8_t ps2_error; -/* host side */ +/* host role */ void ps2_host_init(void); -uint8_t ps2_host_send(uint8_t); +uint8_t ps2_host_send(uint8_t data); +uint8_t ps2_host_recv_response(void); uint8_t ps2_host_recv(void); +void ps2_host_set_led(uint8_t usb_led); -/* TODO: device side */ +/* device role */ #endif