logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

left.h (1219B)


  1. #pragma once
  2. #include <stdint.h>
  3. #include "i2c_master.h"
  4. #define MCP23017
  5. #define MCP23017_A0 0
  6. #define MCP23017_A1 0
  7. #define MCP23017_A2 0
  8. #define I2C_ADDR ((0x20) << 1)
  9. #define MCP23017_B0_IODIRA 0x00
  10. #define MCP23017_B0_IODIRB 0x01
  11. #define MCP23017_B0_IPOLA 0x02
  12. #define MCP23017_B0_IPOLB 0x03
  13. #define MCP23017_B0_GPINTENA 0x04
  14. #define MCP23017_B0_GPINTENB 0x05
  15. #define MCP23017_B0_DEFVALA 0x06
  16. #define MCP23017_B0_DEFVALB 0x07
  17. #define MCP23017_B0_INTCONA 0x08
  18. #define MCP23017_B0_INTCONB 0x09
  19. #define MCP23017_B0_IOCONA 0x0A
  20. #define MCP23017_B0_IOCONB 0x0B
  21. #define MCP23017_B0_GPPUA 0x0C
  22. #define MCP23017_B0_GPPUB 0x0D
  23. #define MCP23017_B0_INTFA 0x0E
  24. #define MCP23017_B0_INTFB 0x0F
  25. #define MCP23017_B0_INTCAPA 0x10
  26. #define MCP23017_B0_INTCAPB 0x11
  27. #define MCP23017_B0_GPIOA 0x12
  28. #define MCP23017_B0_GPIOB 0x13
  29. #define MCP23017_B0_OLATA 0x14
  30. #define MCP23017_B0_OLATB 0x15
  31. #define HOTDOX_I2C_TIMEOUT 100
  32. void left_init(void);
  33. void left_scan(void);
  34. uint8_t left_read_cols(void);
  35. uint8_t left_get_col(uint8_t col);
  36. void left_unselect_rows(void);
  37. void left_select_row(uint8_t row);
  38. uint8_t init_mcp23017(void);