logo

qmk_firmware

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

sx60.h (750B)


  1. #pragma once
  2. #include "quantum.h"
  3. #include <stdint.h>
  4. #include <stdbool.h>
  5. #include "i2c_master.h"
  6. #include <util/delay.h>
  7. /* I2C aliases and register addresses (see "mcp23018.md") */
  8. #define I2C_ADDR (0b0100000 << 1)
  9. #define I2C_TIMEOUT 100
  10. #define IODIRA 0x00 /* i/o direction register */
  11. #define IODIRB 0x01
  12. #define GPPUA 0x0C /* GPIO pull-up resistor register */
  13. #define GPPUB 0x0D
  14. #define GPIOA 0x12 /* general purpose i/o port register (write modifies OLAT) */
  15. #define GPIOB 0x13
  16. #define OLATA 0x14 /* output latch register */
  17. #define OLATB 0x15
  18. extern uint8_t mcp23018_status;
  19. uint8_t init_mcp23018(void);