1
0
Fork 0

[keyboard] annepro2 Add and use functions to directly control led colors (#17196)

This commit is contained in:
zv0n 2022-06-10 05:25:48 +02:00 committed by GitHub
parent 9316023290
commit 9da1b86d71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 5 deletions

View file

@ -40,6 +40,7 @@ typedef union {
/* Local copy of led_mask, used to override colors on the board */
extern ap2_led_t led_mask[KEY_COUNT];
extern ap2_led_t led_colors[KEY_COUNT];
extern uint8_t rgb_row_changed[NUM_ROW];
/* Handle incoming messages */
@ -66,6 +67,18 @@ void ap2_led_mask_set_all(void);
/* Set all keys to a given color */
void ap2_led_mask_set_mono(ap2_led_t color);
/* Set single key to a given color; alpha controls which is displayed */
void ap2_led_colors_set_key(uint8_t row, uint8_t col, ap2_led_t color);
/* Push a whole local row to the shine */
void ap2_led_colors_set_row(uint8_t row);
/* Synchronize all rows */
void ap2_led_colors_set_all(void);
/* Set all keys to a given color */
void ap2_led_colors_set_mono(ap2_led_t color);
void ap2_led_set_manual_control(uint8_t manual);
/* Blink given key `count` times by masking it with a `color`. Blink takes `hundredths` of a second */
void ap2_led_blink(uint8_t row, uint8_t col, ap2_led_t color, uint8_t count, uint8_t hundredths);