solderable.h (1778B)
1 /* Copyright 2021 datafx 2 * 3 * This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */ 16 17 #define u8 uint8_t 18 #define u16 uint16_t 19 20 #pragma once 21 22 #include "quantum.h" 23 24 #define KEYLED_ROWS 6 25 #define KEYLED_COLS 16 26 27 #define XaxisMax 18 28 #define YaxisMax 6 29 30 #define RhythmLedColumMax 18 31 32 typedef struct{ 33 u8 onf; 34 u8 hightLevel; 35 u8 ColumHeight[RhythmLedColumMax]; 36 } 37 38 RhythmLed_; 39 40 typedef struct{ 41 u8 r,g,b; 42 } 43 44 rgb_; 45 #define colorAGSize 10 46 #define colorBGSize RGBLIGHT_LED_COUNT-10 47 48 typedef struct{ 49 rgb_ colorAG[colorAGSize]; 50 rgb_ colorBG[RGBLIGHT_LED_COUNT-10]; 51 } 52 53 backLedRgbG_; 54 55 #define Lseg0 E5 56 #define Lseg1 B4 57 #define Lseg2 B5 58 #define Lseg3 F0 59 #define Lseg4 C6 60 #define Lseg5 D5 61 62 #define Lcom0 C4 63 #define Lcom1 C2 64 #define Lcom2 C0 65 #define Lcom3 E0 66 #define Lcom4 D4 67 #define Lcom5 E4 68 #define Lcom6 B6 69 #define Lcom7 B2 70 #define Lcom8 F4 71 #define Lcom9 A0 72 #define Lcom10 F2 73 #define Lcom11 A4 74 #define Lcom12 F1 75 #define Lcom13 A7 76 #define Lcom14 D3 77 #define Lcom15 A3 78 79 extern void keyLedDriver(void); 80 extern void KeyLedCom(void); 81 u8 getKeyLedIndexForXY(u8 x,u8 y); 82 83 extern void ledCapsSet(bool onf); 84 extern void ledNumSet(bool onf); 85 extern void ledSollSet(bool onf); 86 void reflashLedState(void);