diff options
author | lalalademaxiya1 <2831039915@qq.com> | 2023-03-02 17:31:35 +0800 |
---|---|---|
committer | lalalademaxiya1 <2831039915@qq.com> | 2023-03-02 17:31:35 +0800 |
commit | 09c270ab0db52ad8564cc35952a243551860ea21 (patch) | |
tree | 1c6b6517651f460b9b612e3492a56c2392134d69 | |
parent | 77f3d1738b6c9cba7aa7aae840200317a2bad73e (diff) |
Add some new boards
Added k1_pro, k5_pro, k9_pro, k13_pro, q2_pro and q3_pro.
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 |