Add Lemokey L1

This commit is contained in:
lokher 2024-04-25 10:43:50 +08:00
commit fd0426237f
23 changed files with 1322 additions and 11 deletions

View file

@ -123,16 +123,20 @@ const snled27351_led_t g_snled27351_leds[RGB_MATRIX_LED_COUNT] = {
{1, G_2, I_2, H_2}
};
#define __ NO_LED
led_config_t g_led_config = {
{
{ NO_LED, NO_LED, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, },
{ NO_LED, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, },
{ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, },
{ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, NO_LED, 64, NO_LED, NO_LED, NO_LED, },
{ 65, 66, NO_LED, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, NO_LED, 77, NO_LED, 78, NO_LED, },
{ 79, 80, 81, 82, NO_LED, NO_LED, NO_LED, 83, NO_LED, NO_LED, NO_LED, 84, 85, 86, 87, 88, 89, 90, }
// Key Matrix to LED Index
{ __, __, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, },
{ __, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, },
{ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, },
{ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, __, 64, __, __, __, },
{ 65, 66, __, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, __, 77, __, 78, __, },
{ 79, 80, 81, 82, __, __, __, 83, __, __, __, 84, 85, 86, 87, 88, 89, 90, }
},
{
// LED Index to Physical Position
{21, 0}, {44, 0}, {56, 0}, {68, 0}, {79, 0}, { 97, 0}, {109, 0}, {120, 0}, {132, 0}, {150, 0}, {162, 0}, {173, 0}, {185, 0}, {200, 0}, {212, 0}, {224, 0},
{21,15}, {32,15}, {44,15}, {56,15}, {68,15}, {79,15}, { 91, 15}, {103, 15}, {115, 15}, {126, 15}, {138, 15}, {150, 15}, {162, 15}, {179, 15}, {200, 15}, {212, 15}, {224, 15},
{0,27}, {24,27}, {38,27}, {50,27}, {62,27}, {73,27}, {85,27}, { 97, 27}, {109, 27}, {121, 27}, {132, 27}, {144, 27}, {156, 27}, {168, 27}, {182, 27}, {200, 27}, {212, 27}, {224, 27},
@ -141,6 +145,7 @@ led_config_t g_led_config = {
{0,64}, {22,64}, {37,64}, {51,64}, { 96, 64}, {140, 64}, {154, 64}, {169, 64}, {184, 64}, {200, 64}, {212, 64}, {224, 64}
},
{
// RGB LED Index to Flag
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,

View file

@ -33,11 +33,11 @@
# define SPI_DRIVER SPID1
/* Scan phase of led driver set as MSKPHASE_9CHANNEL(defined as 0x03 in snled27351.h) */
# define PHASE_CHANNEL MSKPHASE_9CHANNEL
# define SNLED27351_PHASE_CHANNEL MSKPHASE_9CHANNEL
/* Set LED driver current */
# define SNLED27351_CURRENT_TUNE \
{ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20 }
{ 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C }
/* Set to infinit, which is use in USB mode by default */
# define RGB_MATRIX_TIMEOUT RGB_MATRIX_TIMEOUT_INFINITE

View file

@ -17,6 +17,8 @@
#include QMK_KEYBOARD_H
#include "lemokey_common.h"
// clang-format off
enum layer_names {
BASE = 0,
FN,
@ -39,6 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, BAT_LVL, NK_TOGG, _______, _______, _______, _______, _______, _______,
_______, _______, GUI_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______),
};
// clang-format on
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][1][2] = {

View file

@ -0,0 +1 @@
# This file intentionally left blank