fixup! lotus: Add RGB factory commands

This commit is contained in:
Daniel Schaefer 2023-01-07 13:31:44 +08:00
parent 229d5eebe2
commit 8990a17d32
2 changed files with 5 additions and 2 deletions

View File

@ -2,9 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
#include "raw_hid.h"
#include "matrix.h"
#include "rgb_matrix.h"
enum factory_commands {
f_bootloader = 0x00,
@ -48,6 +46,7 @@ void handle_factory_command(uint8_t *data) {
case f_adc:
trigger_adc();
break;
#ifdef RGB_MATRIX_ENABLE
case f_rgb_enable:
print("rgb factory enable&solid\n");
rgb_matrix_enable();
@ -85,6 +84,7 @@ void handle_factory_command(uint8_t *data) {
print("rgb_matrix_step_reverse\n");
rgb_matrix_step_reverse();
break;
#endif
default:
uprintf("Unknown factory command: %u\n", factory_command_id);
break;

View File

@ -30,8 +30,11 @@ void keyboard_pre_init_user(void) {
writePinHigh(BOOT_DONE_GPIO);
// TODO: Do we ever need to disable it to save power?
#ifdef RGB_MATRIX_ENABLE
//// TODO: Do we ever need to disable it to save power?
setPinOutput(IS31FL3743A_ENABLE_GPIO);
writePinHigh(IS31FL3743A_ENABLE_GPIO);
#endif
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {