Merge remote-tracking branch 'origin/halcyon' into halcyon-elora-rev2

This commit is contained in:
VeyPatch 2024-12-10 16:14:27 +01:00
commit a6d8b455a7
21 changed files with 116 additions and 99 deletions

View file

@ -1,13 +1,9 @@
// Copyright 2024 splitkb.com (support@splitkb.com)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
#include "halcyon.h"
#include "transactions.h"
#include "print.h"
#include "split_util.h"
#include "pointing_device.h"
__attribute__((weak)) bool module_post_init_kb(void) {
return module_post_init_user();
@ -29,6 +25,7 @@ __attribute__((weak)) bool display_module_housekeeping_task_user(bool second_dis
return true;
}
module_t module_master;
module_t module;
#ifdef HLC_NONE
module_t module = hlc_none;
@ -49,6 +46,9 @@ bool backlight_off = false;
void backlight_wakeup(void) {
backlight_off = false;
backlight_enable();
if (get_backlight_level() == 0) {
backlight_level(BACKLIGHT_LEVELS);
}
}
// Timeout handling
@ -79,6 +79,8 @@ void housekeeping_task_kb(void) {
static bool synced = 0;
if(is_transport_connected() && synced == 0) {
transaction_rpc_send(MODULE_SYNC, sizeof(module), &module); // Sync to slave
// Good moment to make sure the backlight wakes up after boot for both halves
backlight_wakeup();
synced = 1;
}
display_module_housekeeping_task_kb(false); // Is master so can never be the second display
@ -90,7 +92,7 @@ void housekeeping_task_kb(void) {
display_module_housekeeping_task_kb(false); // Otherwise be the main display
}
}
// Backlight feature
if (backlight_off && last_input_activity_elapsed() <= HLC_BACKLIGHT_TIMEOUT) {
backlight_wakeup();
@ -194,4 +196,4 @@ const matrix_row_t matrix_mask[] = {
0b0011111,
};
#endif
#endif
#endif