qmk_firmware

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

blackbowl.h (858B)


      1 // Copyright 2023 @frobiac
      2 // SPDX-License-Identifier: GPL-2.0-or-later
      3 
      4 #pragma once
      5 
      6 #include "quantum.h"
      7 #include <stdint.h>
      8 #include <stdbool.h>
      9 #include "i2c_master.h"
     10 #include "wait.h"
     11 
     12 extern uint8_t expander_status;
     13 extern uint8_t expander_input_pin_mask;
     14 extern bool    i2c_initialized;
     15 
     16 void init_blackbowl(void);
     17 void init_expander(void);
     18 
     19 // clang-format off
     20 #define I2C_TIMEOUT     100
     21 #define IODIRA          0x00            // i/o direction register
     22 #define IODIRB          0x01
     23 #define GPPUA           0x0C            // GPIO pull-up resistor register
     24 #define GPPUB           0x0D
     25 #define GPIOA           0x12            // general purpose i/o port register (write modifies OLAT)
     26 #define GPIOB           0x13
     27 #define OLATA           0x14            // output latch register
     28 #define OLATB           0x15
     29 
     30 #define xxx KC_NO
     31 
     32 // clang-format on