logo

qmk_firmware

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

dactyl.h (767B)


  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. #define I2C_ADDR (0b0100000 << 1)
  8. #define I2C_TIMEOUT 100
  9. #define IODIRA 0x00 // i/o direction register
  10. #define IODIRB 0x01
  11. #define GPPUA 0x0C // GPIO pull-up resistor register
  12. #define GPPUB 0x0D
  13. #define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
  14. #define GPIOB 0x13
  15. #define OLATA 0x14 // output latch register
  16. #define OLATB 0x15
  17. extern uint8_t expander_status;
  18. extern uint8_t expander_input_pin_mask;
  19. extern bool i2c_initialized;
  20. void init_dactyl(void);
  21. void init_expander(void);