diff options
Diffstat (limited to 'keyboards/keychron')
121 files changed, 9787 insertions, 41 deletions
diff --git a/keyboards/keychron/bluetooth/battery.c b/keyboards/keychron/bluetooth/battery.c index bc463f9336..8c6438d4c5 100644..100755 --- a/keyboards/keychron/bluetooth/battery.c +++ b/keyboards/keychron/bluetooth/battery.c @@ -34,7 +34,7 @@ static uint8_t bat_state; static uint8_t power_on_sample = 0; void battery_init(void) { - bat_state = BAT_NOT_CHARGING; + bat_state = BAT_NOT_CHARGING; } __attribute__((weak)) void battery_measure(void) { ckbt51_read_state_reg(0x05, 0x02); @@ -76,7 +76,7 @@ void battery_check_empty(void) { if (voltage < EMPTY_VOLTAGE_VALUE) { if (bat_empty <= BATTERY_EMPTY_COUNT) { if (++bat_empty > BATTERY_EMPTY_COUNT) { -#ifdef BAT_LOW_LED_PIN +#if defined(BAT_LOW_LED_PIN) || defined(BAT_LOW_LED_PIN_STATE) indicator_battery_low_enable(true); #endif #if defined(LOW_BAT_IND_INDEX) @@ -130,7 +130,7 @@ void battery_task(void) { if ((bat_empty || critical_low) && usb_power_connected()) { bat_empty = false; critical_low = false; -#ifdef BAT_LOW_LED_PIN +#if defined(BAT_LOW_LED_PIN) || defined(BAT_LOW_LED_PIN_STATE) indicator_battery_low_enable(false); #endif #if defined(LOW_BAT_IND_INDEX) diff --git a/keyboards/keychron/bluetooth/bluetooth.c b/keyboards/keychron/bluetooth/bluetooth.c index ad133bc9b0..3220fbc77f 100644..100755 --- a/keyboards/keychron/bluetooth/bluetooth.c +++ b/keyboards/keychron/bluetooth/bluetooth.c @@ -14,6 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "action.h" #include "quantum.h" #include "bluetooth.h" #include "report_buffer.h" @@ -37,15 +38,15 @@ static uint8_t host_index = 0; static uint8_t led_state = 0; extern bluetooth_transport_t bluetooth_transport; -static bluetooth_state_t bt_state = BLUETOOTH_RESET; -static bool pincodeEntry = false; -uint8_t bluetooth_report_protocol = true; +static bluetooth_state_t bt_state = BLUETOOTH_RESET; +static bool pincodeEntry = false; +uint8_t bluetooth_report_protocol = true; /* declarations */ uint8_t bluetooth_keyboard_leds(void); void bluetooth_send_keyboard(report_keyboard_t *report); void bluetooth_send_mouse(report_mouse_t *report); -void bluetooth_send_extra(report_extra_t *report); +void bluetooth_send_extra(report_extra_t *report); /* host struct */ host_driver_t bluetooth_driver = {bluetooth_keyboard_leds, bluetooth_send_keyboard, bluetooth_send_mouse, bluetooth_send_extra}; |