X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Fprotocol%2Fibmpc.h;h=64bc2c8ad428040842d98a9a96e249a24b2c8bf0;hb=2b74203bd7ed7bec3cdf779a5752eb7495de4e02;hp=cb7534061408b876b4aaf7b50a5715c74ed030fa;hpb=7c3b669e6f7f449fa4ae58e028fcd07182cafa99;p=max%2Ftmk_keyboard.git diff --git a/tmk_core/protocol/ibmpc.h b/tmk_core/protocol/ibmpc.h index cb753406..64bc2c8a 100644 --- a/tmk_core/protocol/ibmpc.h +++ b/tmk_core/protocol/ibmpc.h @@ -71,10 +71,12 @@ POSSIBILITY OF SUCH DAMAGE. #define IBMPC_SET_LED 0xED #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 +#define IBMPC_PROTOCOL_AT 0x10 +#define IBMPC_PROTOCOL_AT_Z150 0x11 +#define IBMPC_PROTOCOL_XT 0x20 +#define IBMPC_PROTOCOL_XT_IBM 0x21 +#define IBMPC_PROTOCOL_XT_CLONE 0x22 +#define IBMPC_PROTOCOL_XT_ERROR 0x23 // Error numbers #define IBMPC_ERR_NONE 0 @@ -83,13 +85,14 @@ POSSIBILITY OF SUCH DAMAGE. #define IBMPC_ERR_TIMEOUT 0x20 #define IBMPC_ERR_FULL 0x40 #define IBMPC_ERR_ILLEGAL 0x80 -#define IBMPC_ERR_FF 0xFF +#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; @@ -185,11 +188,17 @@ static inline void idle(void) data_hi(); } -/* inhibit device to send */ +/* inhibit device to send(AT), soft reset(XT) */ static inline void inhibit(void) { clock_lo(); data_hi(); } +/* inhibit device to send(XT) */ +static inline void inhibit_xt(void) +{ + clock_hi(); + data_lo(); +} #endif