summaryrefslogtreecommitdiffstats
path: root/keyboards/keychron
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/keychron')
-rwxr-xr-x[-rw-r--r--]keyboards/keychron/bluetooth/battery.c6
-rwxr-xr-x[-rw-r--r--]keyboards/keychron/bluetooth/bluetooth.c54
-rw-r--r--keyboards/keychron/bluetooth/factory_test.c10
-rw-r--r--keyboards/keychron/bluetooth/indicator.c32
-rw-r--r--keyboards/keychron/bluetooth/indicator.h2
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/rgb/config.h107
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/rgb/info.json109
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/rgb/keymaps/default/keymap.c59
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/rgb/keymaps/via/keymap.c59
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/rgb/keymaps/via/rules.mk1
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/rgb/rgb.c156
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/rgb/rules.mk2
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/white/config.h82
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/white/info.json109
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/white/keymaps/default/keymap.c59
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/white/keymaps/via/keymap.c59
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/white/keymaps/via/rules.mk1
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/white/rules.mk2
-rwxr-xr-xkeyboards/keychron/k13_pro/ansi/white/white.c154
-rwxr-xr-xkeyboards/keychron/k13_pro/config.h97
-rwxr-xr-xkeyboards/keychron/k13_pro/halconf.h27
-rwxr-xr-xkeyboards/keychron/k13_pro/k13_pro.c300
-rwxr-xr-xkeyboards/keychron/k13_pro/k13_pro.h52
-rwxr-xr-xkeyboards/keychron/k13_pro/matrix.c197
-rwxr-xr-xkeyboards/keychron/k13_pro/mcuconf.h39
-rwxr-xr-xkeyboards/keychron/k13_pro/readme.md19
-rwxr-xr-xkeyboards/keychron/k13_pro/rules.mk27
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/rgb/config.h107
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/rgb/info.json111
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/rgb/keymaps/default/keymap.c59
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/rgb/keymaps/via/keymap.c59
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/rgb/keymaps/via/rules.mk1
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/rgb/rgb.c154
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/rgb/rules.mk2
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/white/config.h82
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/white/info.json111
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/white/keymaps/default/keymap.c59
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/white/keymaps/via/keymap.c59
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/white/keymaps/via/rules.mk1
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/white/rules.mk2
-rwxr-xr-xkeyboards/keychron/k1_pro/ansi/white/white.c152
-rwxr-xr-xkeyboards/keychron/k1_pro/config.h97
-rwxr-xr-xkeyboards/keychron/k1_pro/halconf.h27
-rwxr-xr-xkeyboards/keychron/k1_pro/k1_pro.c300
-rwxr-xr-xkeyboards/keychron/k1_pro/k1_pro.h52
-rwxr-xr-xkeyboards/keychron/k1_pro/matrix.c197
-rwxr-xr-xkeyboards/keychron/k1_pro/mcuconf.h39
-rwxr-xr-xkeyboards/keychron/k1_pro/readme.md19
-rwxr-xr-xkeyboards/keychron/k1_pro/rules.mk27
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/rgb/config.h106
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/rgb/info.json132
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/rgb/keymaps/default/keymap.c59
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/rgb/keymaps/via/keymap.c59
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/rgb/keymaps/via/rules.mk1
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/rgb/rgb.c174
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/rgb/rules.mk2
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/white/config.h82
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/white/info.json132
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/white/keymaps/default/keymap.c59
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/white/keymaps/via/keymap.c59
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/white/keymaps/via/rules.mk1
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/white/rules.mk2
-rwxr-xr-xkeyboards/keychron/k5_pro/ansi/white/white.c172
-rwxr-xr-xkeyboards/keychron/k5_pro/config.h96
-rwxr-xr-xkeyboards/keychron/k5_pro/halconf.h27
-rwxr-xr-xkeyboards/keychron/k5_pro/k5_pro.c300
-rwxr-xr-xkeyboards/keychron/k5_pro/k5_pro.h52
-rwxr-xr-xkeyboards/keychron/k5_pro/matrix.c195
-rwxr-xr-xkeyboards/keychron/k5_pro/mcuconf.h36
-rwxr-xr-xkeyboards/keychron/k5_pro/readme.md19
-rwxr-xr-xkeyboards/keychron/k5_pro/rules.mk27
-rwxr-xr-xkeyboards/keychron/k5_pro/via_json/k5_pro_ansi_rgb_v1.00.json398
-rwxr-xr-xkeyboards/keychron/k5_pro/via_json/k5_pro_ansi_white_v1.00.json337
-rwxr-xr-xkeyboards/keychron/k9_pro/ansi/rgb/config.h105
-rwxr-xr-xkeyboards/keychron/k9_pro/ansi/rgb/info.json84
-rwxr-xr-xkeyboards/keychron/k9_pro/ansi/rgb/keymaps/default/keymap.c64
-rwxr-xr-xkeyboards/keychron/k9_pro/ansi/rgb/keymaps/via/keymap.c63
-rwxr-xr-xkeyboards/keychron/k9_pro/ansi/rgb/keymaps/via/rules.mk2
-rwxr-xr-xkeyboards/keychron/k9_pro/ansi/rgb/rgb.c123
-rwxr-xr-xkeyboards/keychron/k9_pro/ansi/rgb/rules.mk2
-rwxr-xr-xkeyboards/keychron/k9_pro/config.h92
-rwxr-xr-xkeyboards/keychron/k9_pro/halconf.h27
-rwxr-xr-xkeyboards/keychron/k9_pro/k9_pro.c291
-rwxr-xr-xkeyboards/keychron/k9_pro/k9_pro.h50
-rwxr-xr-xkeyboards/keychron/k9_pro/matrix.c195
-rwxr-xr-xkeyboards/keychron/k9_pro/mcuconf.h37
-rwxr-xr-xkeyboards/keychron/k9_pro/readme.md19
-rwxr-xr-xkeyboards/keychron/k9_pro/rules.mk27
-rwxr-xr-xkeyboards/keychron/q2_pro/ansi_encoder/ansi_encoder.c128
-rwxr-xr-xkeyboards/keychron/q2_pro/ansi_encoder/config.h113
-rwxr-xr-xkeyboards/keychron/q2_pro/ansi_encoder/info.json96
-rwxr-xr-xkeyboards/keychron/q2_pro/ansi_encoder/keymaps/default/keymap.c75
-rwxr-xr-xkeyboards/keychron/q2_pro/ansi_encoder/keymaps/default/rules.mk1
-rwxr-xr-xkeyboards/keychron/q2_pro/ansi_encoder/keymaps/via/keymap.c76
-rwxr-xr-xkeyboards/keychron/q2_pro/ansi_encoder/keymaps/via/rules.mk3
-rwxr-xr-xkeyboards/keychron/q2_pro/ansi_encoder/rules.mk3
-rwxr-xr-xkeyboards/keychron/q2_pro/chconf.h30
-rwxr-xr-xkeyboards/keychron/q2_pro/config.h84
-rwxr-xr-xkeyboards/keychron/q2_pro/halconf.h27
-rwxr-xr-xkeyboards/keychron/q2_pro/matrix.c197
-rwxr-xr-xkeyboards/keychron/q2_pro/mcuconf.h41
-rwxr-xr-xkeyboards/keychron/q2_pro/q2_pro.c275
-rwxr-xr-xkeyboards/keychron/q2_pro/q2_pro.h49
-rwxr-xr-xkeyboards/keychron/q2_pro/readme.md19
-rwxr-xr-xkeyboards/keychron/q2_pro/rules.mk26
-rwxr-xr-xkeyboards/keychron/q3_pro/ansi_encoder/ansi_encoder.c158
-rwxr-xr-xkeyboards/keychron/q3_pro/ansi_encoder/config.h108
-rwxr-xr-xkeyboards/keychron/q3_pro/ansi_encoder/info.json126
-rwxr-xr-xkeyboards/keychron/q3_pro/ansi_encoder/keymaps/default/keymap.c69
-rwxr-xr-xkeyboards/keychron/q3_pro/ansi_encoder/keymaps/default/rules.mk1
-rwxr-xr-xkeyboards/keychron/q3_pro/ansi_encoder/keymaps/via/keymap.c69
-rwxr-xr-xkeyboards/keychron/q3_pro/ansi_encoder/keymaps/via/rules.mk2
-rwxr-xr-xkeyboards/keychron/q3_pro/ansi_encoder/rules.mk2
-rwxr-xr-xkeyboards/keychron/q3_pro/config.h95
-rwxr-xr-xkeyboards/keychron/q3_pro/halconf.h27
-rwxr-xr-xkeyboards/keychron/q3_pro/matrix.c270
-rwxr-xr-xkeyboards/keychron/q3_pro/mcuconf.h37
-rwxr-xr-xkeyboards/keychron/q3_pro/q3_pro.c280
-rwxr-xr-xkeyboards/keychron/q3_pro/q3_pro.h49
-rwxr-xr-xkeyboards/keychron/q3_pro/readme.md19
-rwxr-xr-xkeyboards/keychron/q3_pro/rules.mk27
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};