Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #ifndef __I8042_H
  2. #define __I8042_H
  3.  
  4.  
  5. #define STAT_REG 0x64 //Read the KBC state
  6.  
  7. #define KBC_CMD_REG 0x64
  8.  
  9. #define OUT_BUF 0x60 //The processor OUT_BUF
  10.  
  11. #define IN_BUF 0x60 //The processor writes to the IN_BUF
  12.  
  13. #define KBD_IRQ 1
  14.  
  15. #define PAR_ERR BIT(7)//Parity error - invalid data
  16.  
  17. #define TO_ERR BIT(6)//Timeout error - invalid data
  18.  
  19. #define OBF BIT(0)
  20.  
  21. #define IBF BIT(1)
  22.  
  23. #define DELAY_US 20000
  24.  
  25. #define ESC_CODE 0x81
  26.  
  27. #define BIT(n) (0x01<<(n))
  28.  
  29. #define TWO_BYTE_SCANCODE 0xE0
  30.  
  31. #define NR_TRIES 6
  32.  
  33. #define RESET_KBD 0xFF
  34.  
  35.  
  36.  
  37. #define ENABLE_LEDS 0xED
  38.  
  39. #define ACK 0xFA
  40.  
  41. #define RESEND 0xFE
  42.  
  43. #define ERROR 0xFC
  44.  
  45.  
  46. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement