#include #include "ledmap.h" #include "debug.h" #ifdef LEDMAP_ENABLE static const uint8_t ledmaps[LED_COUNT] PROGMEM = { #if defined(GH60_REV_CHN) [0] = LEDMAP_CAPS_LOCK, // CapsLock - PB2 [1] = LEDMAP_BACKLIGHT, // PWM - PB6 #else [0] = LEDMAP_CAPS_LOCK, // CapsLock - PB2 [1] = LEDMAP_BACKLIGHT, // Esc - GPIO1 - PF6 [2] = LEDMAP_LAYER(1), // WASD - GPIO0 - PF7 [3] = LEDMAP_LAYER(2), // Sh/Al/Ct - GPIO3 - PF4 [4] = LEDMAP_LAYER(1), // Fn - GPIO2 - PF5 #endif }; uint8_t ledmap_get_code(uint8_t index) { return pgm_read_byte(&ledmaps[index]); } void ledmap_led_init(void) { DDRB |= (1<