qmk-dactyl-manuform-a/keyboards/sowbug/ansi_tkl/ansi_tkl.c

62 lines
4.1 KiB
C
Raw Normal View History

/* Copyright 2021 Mike Tsao
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// ansi_tkl.c
#include "ansi_tkl.h"
#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = {{
// Key Matrix to LED Index
{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, NO_LED, NO_LED, NO_LED, NO_LED},
{63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, NO_LED, NO_LED, NO_LED, NO_LED},
{76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED}
},
{// LED Index to Physical Position
{0, 0}, {24, 0}, {36, 0}, {49, 0}, {61, 0}, {79, 0}, {92, 0}, {104, 0}, {116, 0}, {135, 0}, {147, 0}, {159, 0}, {171, 0}, {187, 0}, {199, 0}, {211, 0},
{0, 14}, {12, 14}, {24, 14}, {36, 14}, {49, 14}, {61, 14}, {73, 14}, {85, 14}, {98, 14}, {110, 14}, {122, 14}, {135, 14}, {147, 14}, {165, 14}, {187, 14}, {199, 14}, {211, 14},
{3, 24}, {18, 24}, {30, 24}, {42, 24}, {55, 24}, {67, 24}, {79, 24}, {92, 24}, {104, 24}, {116, 24}, {128, 24}, {141, 24}, {153, 24}, {168, 24}, {187, 24}, {199, 24}, {211, 24},
{4, 34}, {21, 34}, {33, 34}, {46, 34}, {58, 34}, {70, 34}, {82, 34}, {95, 34}, {107, 34}, {119, 34}, {131, 34}, {144, 34}, {164, 34},
{7, 44}, {27, 44}, {39, 44}, {52, 44}, {64, 44}, {76, 44}, {88, 44}, {101, 44}, {113, 44}, {125, 44}, {138, 44}, {161, 44}, {199, 44},
{1, 54}, {16, 54}, {32, 54}, {78, 54}, {124, 54}, {139, 54}, {154, 54}, {170, 54}, {187, 54}, {199, 54}, {211, 54}},
{// LED Index to Flag
LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT
}
};
void suspend_power_down_kb(void)
{
rgb_matrix_set_suspend_state(true);
}
void suspend_wakeup_init_kb(void)
{
rgb_matrix_set_suspend_state(false);
}
#endif // #ifdef RGB_MATRIX_ENABLE