LED Masking support for Shine

Introduce companion update to ledSetMask and ledClearMask.
In keymap `codetector` there is example of how to map caps_lock
to the caps_lock key light on the keyboard.
This commit is contained in:
codetector
2021-09-12 09:26:24 +02:00
committed by bwisn
parent fffa641adf
commit e60ea29c16
2 changed files with 17 additions and 1 deletions
+13 -1
View File
@@ -57,4 +57,16 @@ void annepro2LedNextProfile()
void annepro2LedPrevProfile()
{
sdPut(&SD0, CMD_LED_PREV_PROFILE);
}
}
void annepro2LedSetMask(uint8_t key)
{
sdPut(&SD0, CMD_LED_SET_MASK);
sdPut(&SD0, key);
}
void annepro2LedClearMask(uint8_t key)
{
sdPut(&SD0, CMD_LED_CLEAR_MASK);
sdPut(&SD0, key);
}
+4
View File
@@ -9,6 +9,8 @@
#define CMD_LED_PREV_PROFILE 0x7
#define CMD_LED_GET_PROFILE 0x8
#define CMD_LED_GET_NUM_PROFILES 0x9
#define CMD_LED_SET_MASK 0xA
#define CMD_LED_CLEAR_MASK 0xB
void annepro2LedDisable(void);
void annepro2LedEnable(void);
@@ -19,3 +21,5 @@ uint8_t annepro2LedGetProfile(void);
uint8_t annepro2LedGetNumProfiles(void);
void annepro2LedNextProfile(void);
void annepro2LedPrevProfile(void);
void annepro2LedSetMask(uint8_t key);
void annepro2LedClearMask(uint8_t key);