qmk_firmware

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

dactyl.h (767B)


      1 #pragma once
      2 
      3 #include "quantum.h"
      4 #include <stdint.h>
      5 #include <stdbool.h>
      6 #include "i2c_master.h"
      7 #include <util/delay.h>
      8 
      9 #define I2C_ADDR        (0b0100000 << 1)
     10 #define I2C_TIMEOUT     100
     11 #define IODIRA          0x00            // i/o direction register
     12 #define IODIRB          0x01
     13 #define GPPUA           0x0C            // GPIO pull-up resistor register
     14 #define GPPUB           0x0D
     15 #define GPIOA           0x12            // general purpose i/o port register (write modifies OLAT)
     16 #define GPIOB           0x13
     17 #define OLATA           0x14            // output latch register
     18 #define OLATB           0x15
     19 
     20 extern uint8_t expander_status;
     21 extern uint8_t expander_input_pin_mask;
     22 extern bool i2c_initialized;
     23 
     24 void init_dactyl(void);
     25 void init_expander(void);