QMK/keyboards/betalupi_ergodox/keymaps/default/layers/layers.h

42 lines
1006 B
C
Raw Normal View History

2022-07-20 19:09:10 -07:00
#pragma once
// This header declares custom keycodes
#include "keymap.h"
#define LAYER_INCLUDE_FILE "definitions/layers.inc"
// Generate layer ids
#define BETA_LAYER_KEYS
#define BETA_LAYER(name) LAYER_##name,
enum layer_indices {
#include LAYER_INCLUDE_FILE
X_LAYER_MAX
};
#undef BETA_LAYER
#undef BETA_LAYER_KEYS
// Generate RGBMatrix ids
// We don't use the same id for layers and layer colors
// to save memory. Not every layer has colors!
#define BETA_LAYER_LEDS
#define BETA_LAYER(name) LAYER_##name##_LEDS,
enum led_indices {
#include LAYER_INCLUDE_FILE
X_LAYER_LEDS_MAX
};
#undef BETA_LAYER
#undef BETA_LAYER_LEDS
// We don't need these in the header,
// they shouldn't be used anywhere else.
//const uint16_t PROGMEM keymaps[X_LAYER_MAX][MATRIX_ROWS][MATRIX_COLS];
//const uint8_t PROGMEM ledmaps[X_LAYER_LEDS_MAX][DRIVER_LED_TOTAL][3];
extern uint8_t layer_layouts[];
void set_layer_color(int layer);
void rgb_matrix_indicators_user(void);
uint32_t set_layer_colors(uint32_t state);