qmk_firmware

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

voyager.h (936B)


      1 // Copyright 2023 ZSA Technology Labs, Inc <@zsa>
      2 // Copyright 2023 Christopher Courtney, aka Drashna Jael're  (@drashna) <drashna@live.com>
      3 // SPDX-License-Identifier: GPL-2.0-or-later
      4 
      5 #pragma once
      6 
      7 #include "quantum.h"
      8 
      9 extern bool mcp23018_leds[];
     10 
     11 #define MCP23018_DEFAULT_ADDRESS 0b0100000
     12 
     13 #define STATUS_LED_1(status) gpio_write_pin(B5, (bool)(status))
     14 #define STATUS_LED_2(status) gpio_write_pin(B4, (bool)(status))
     15 #define STATUS_LED_3(status) mcp23018_leds[0] = (bool)(status)
     16 #define STATUS_LED_4(status) mcp23018_leds[1] = (bool)(status)
     17 
     18 enum voyager_keycodes {
     19     TOGGLE_LAYER_COLOR = QK_KB,
     20     LED_LEVEL,
     21 };
     22 
     23 typedef union {
     24     uint32_t raw;
     25     struct {
     26         bool    disable_layer_led : 1;
     27         bool    placeholder : 1;
     28         bool    led_level : 1;
     29         uint8_t led_level_res : 2; // DO NOT REMOVE
     30     };
     31 } keyboard_config_t;
     32 
     33 extern keyboard_config_t keyboard_config;
     34 
     35 bool is_transport_connected(void);