Add support to persist MD LED framework settings (#14980)
* Add support to persist MD LED framework settings * avoid out-of-bounds errors when SmartEEPROM is not enabled * Update brightness defaults * clang
This commit is contained in:
@@ -43,6 +43,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* Temporary solution for matrix delay */
|
||||
#define IGNORE_ATOMIC_BLOCK
|
||||
|
||||
/* Avoid out-of-bounds errors when SmartEEPROM is not enabled */
|
||||
#define EEPROM_SIZE 1024
|
||||
|
||||
/* MCU Port name definitions */
|
||||
#define PA 0
|
||||
#define PB 1
|
||||
|
@@ -61,6 +61,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
static uint32_t key_timer;
|
||||
static uint8_t scroll_effect = 0;
|
||||
|
||||
switch (keycode) {
|
||||
case L_BRI ... U_T_AGCR:
|
||||
if (record->event.pressed) {
|
||||
md_led_changed();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case L_BRI:
|
||||
if (record->event.pressed) {
|
||||
|
@@ -42,6 +42,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* Temporary solution for matrix delay */
|
||||
#define IGNORE_ATOMIC_BLOCK
|
||||
|
||||
/* Avoid out-of-bounds errors when SmartEEPROM is not enabled */
|
||||
#define EEPROM_SIZE 1024
|
||||
|
||||
/* MCU Port name definitions */
|
||||
#define PA 0
|
||||
#define PB 1
|
||||
|
@@ -64,6 +64,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
static uint32_t key_timer;
|
||||
static uint8_t scroll_effect = 0;
|
||||
|
||||
switch (keycode) {
|
||||
case L_BRI ... U_T_AGCR:
|
||||
if (record->event.pressed) {
|
||||
md_led_changed();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case L_BRI:
|
||||
if (record->event.pressed) {
|
||||
|
Reference in New Issue
Block a user