gpioregs.h 711 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __GPIOREGS_H__
  2. #define __GPIOREGS_H__
  3. // ssegment display
  4. #define PORT_80 0x80
  5. // buzzer
  6. #define BUZZER_PORT 0x61
  7. #define BUZZER_CHANNEL 0x43
  8. #define BUZZER_CHAN_1 0X41
  9. #define BUZZER_FREQ 0X42
  10. #define SSEGMENT_POINT 0xFD6A0960
  11. #define EC_CMD_PORT 0x66
  12. #define EC_DATA_PORT 0x62
  13. #define EC_VERSION_WEC 0x81
  14. #define EC_VERSION_REC 0x80
  15. #define EC_OBF 0x01 // Output Buffer Full
  16. #define EC_IBF 0x02 // Input Buffer Full
  17. #define CMD_READ_RAM 0x97
  18. #define CMD_WRITE_RAM 0x98
  19. #define OFFSET_COLOR_CTL 0x01
  20. #define OFFSET_BLINK_TIME 0x02
  21. #define OFFSET_BLINK_CTL 0x03
  22. #define OFFSET_TURNOFF_CTL 0x04
  23. #define BIT0 (1 << 0)
  24. #define TIMEOUT_LOOPS 100000
  25. #endif