qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

georgi.h (786B)


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