2022-08-06 22:29:06 +02:00
|
|
|
// Copyright 2022 Joshua Diamond josh@windowoffire.com (@spidey3)
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
2020-03-23 05:11:41 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include QMK_KEYBOARD_H
|
|
|
|
|
|
|
|
#ifdef UNICODEMAP_ENABLE
|
2020-06-05 11:01:47 +02:00
|
|
|
# include "unicode.h"
|
2020-03-23 05:11:41 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
enum userspace_layers {
|
2020-06-05 11:01:47 +02:00
|
|
|
_BASE = 0,
|
|
|
|
_NUMPAD,
|
|
|
|
_FN,
|
2022-08-06 22:29:06 +02:00
|
|
|
_GLYPH,
|
2020-03-23 05:11:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enum custom_keycodes {
|
2022-09-01 01:39:16 +02:00
|
|
|
CH_CPNL = SAFE_RANGE, // AL Control Panel
|
|
|
|
CH_ASST, // AL Context-aware Desktop Assistant
|
|
|
|
CH_SUSP, // Suspend
|
2020-06-05 11:01:47 +02:00
|
|
|
|
|
|
|
SPI_NORMAL,
|
|
|
|
SPI_WIDE,
|
|
|
|
SPI_SCRIPT,
|
|
|
|
SPI_BLOCKS,
|
|
|
|
SPI_CIRCLE,
|
|
|
|
SPI_SQUARE,
|
|
|
|
SPI_PARENS,
|
|
|
|
SPI_FRAKTR,
|
2022-07-31 00:21:54 +02:00
|
|
|
SPI_BOLD,
|
|
|
|
SPI_MATH,
|
2020-06-05 11:01:47 +02:00
|
|
|
SPI_GFLOCK,
|
2021-02-06 22:04:25 +01:00
|
|
|
SPI_KP_00,
|
2022-07-31 00:31:31 +02:00
|
|
|
SPI_GLO,
|
2020-03-23 05:11:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef RGBLIGHT_ENABLE
|
2020-06-05 11:01:47 +02:00
|
|
|
|
|
|
|
enum layer_base {
|
|
|
|
LAYER_BASE_DEFAULT = _BASE,
|
|
|
|
LAYER_BASE_REGULAR = _NUMPAD,
|
|
|
|
LAYER_BASE_END = _FN + 1,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef enum layer_ack {
|
|
|
|
ACK_NO = 0,
|
|
|
|
ACK_YES,
|
|
|
|
ACK_MEH,
|
2021-02-06 22:04:25 +01:00
|
|
|
ACK_HUH,
|
2020-06-05 11:01:47 +02:00
|
|
|
} layer_ack_t;
|
|
|
|
|
|
|
|
# define RGB_LAYER_ACK_DURATION 500
|
|
|
|
|
|
|
|
void matrix_init_user_rgb(void);
|
2021-02-06 22:04:25 +01:00
|
|
|
void matrix_scan_user_rgb(void);
|
2020-06-05 11:01:47 +02:00
|
|
|
void keyboard_post_init_user_rgb(void);
|
|
|
|
bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record);
|
|
|
|
void post_process_record_user_rgb(uint16_t keycode, keyrecord_t *record);
|
2020-03-23 05:11:41 +01:00
|
|
|
layer_state_t layer_state_set_user_rgb(layer_state_t state);
|
|
|
|
layer_state_t default_layer_state_set_user_rgb(layer_state_t state);
|
2020-06-05 11:01:47 +02:00
|
|
|
bool led_update_user_rgb(led_t led_state);
|
|
|
|
void rgb_layer_ack(layer_ack_t n);
|
|
|
|
void rgb_layer_ack_yn(bool yn);
|
|
|
|
void clear_rgb_layers(void);
|
2021-02-06 22:04:25 +01:00
|
|
|
void shutdown_user_rgb(void);
|
2022-09-01 01:39:16 +02:00
|
|
|
|
|
|
|
# if defined(UNICODE_COMMON_ENABLE)
|
|
|
|
void unicode_input_mode_set_user_rgb(uint8_t input_mode);
|
|
|
|
# endif
|
|
|
|
|
2020-03-23 05:11:41 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef UNICODEMAP_ENABLE
|
|
|
|
void eeconfig_init_user_unicode(void);
|
|
|
|
#endif
|
|
|
|
|
2020-06-05 11:01:47 +02:00
|
|
|
#ifdef SPI_DEBUG_SCAN_RATE
|
|
|
|
# ifndef SPI_SCAN_RATE_INTERVAL
|
|
|
|
# define SPI_SCAN_RATE_INTERVAL 10
|
|
|
|
# endif
|
|
|
|
#endif
|