X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Fprotocol%2Fibmpc.h;h=9039b89b1199adbc38b483aa90394dedb0285398;hb=4028b200be6c8bfd1026af59d1db85a2706b8f74;hp=47e71e27e60288607b425bf29f4bd7b499db8787;hpb=c4b8b36950a0b936c4b699afaecd77cdc642d471;p=max%2Ftmk_keyboard.git diff --git a/tmk_core/protocol/ibmpc.h b/tmk_core/protocol/ibmpc.h index 47e71e27..9039b89b 100644 --- a/tmk_core/protocol/ibmpc.h +++ b/tmk_core/protocol/ibmpc.h @@ -70,28 +70,37 @@ POSSIBILITY OF SUCH DAMAGE. #define IBMPC_RESEND 0xFE #define IBMPC_SET_LED 0xED -#define IBMPC_PROTOCOL_AT 0 -#define IBMPC_PROTOCOL_XT 1 +#define IBMPC_PROTOCOL_NO 0 +#define IBMPC_PROTOCOL_AT 1 +#define IBMPC_PROTOCOL_XT_IBM 2 +#define IBMPC_PROTOCOL_XT_CLONE 3 +#define IBMPC_PROTOCOL_XT_ERROR 4 -// TODO: error numbers +// Error numbers #define IBMPC_ERR_NONE 0 #define IBMPC_ERR_RECV 0x00 #define IBMPC_ERR_SEND 0x10 #define IBMPC_ERR_TIMEOUT 0x20 #define IBMPC_ERR_FULL 0x40 +#define IBMPC_ERR_ILLEGAL 0x80 +#define IBMPC_ERR_FF 0xF0 #define IBMPC_LED_SCROLL_LOCK 0 #define IBMPC_LED_NUM_LOCK 1 #define IBMPC_LED_CAPS_LOCK 2 +extern volatile uint16_t ibmpc_isr_debug; extern volatile uint8_t ibmpc_protocol; extern volatile uint8_t ibmpc_error; void ibmpc_host_init(void); +void ibmpc_host_enable(void); +void ibmpc_host_disable(void); int16_t ibmpc_host_send(uint8_t data); int16_t ibmpc_host_recv_response(void); int16_t ibmpc_host_recv(void); +void ibmpc_host_isr_clear(void); void ibmpc_host_set_led(uint8_t usb_led); @@ -102,12 +111,6 @@ void ibmpc_host_set_led(uint8_t usb_led); /* * Clock */ -static inline void clock_init(void) -{ - IBMPC_CLOCK_PORT &= ~(1<