Skip to content

Commit 2dc034b

Browse files
committed
feat: rebase to rev C
2 parents 5d9da33 + 26a2503 commit 2dc034b

File tree

9 files changed

+76
-27
lines changed

9 files changed

+76
-27
lines changed

config/boards/arm/whkb_pro2/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
if BOARD_WHKB_PRO2
55

66
config ZMK_KEYBOARD_NAME
7-
default "WHKB Pro2 Rev A"
7+
default "WHKB Pro2"
88

99
config BOARD
1010
default "whkb_pro2"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
board_check_revision(FORMAT LETTER
2+
DEFAULT_REVISION C
3+
)

config/boards/arm/whkb_pro2/whkb_pro2.dts

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,16 @@
1919
zephyr,console = &cdc_acm_uart;
2020
zmk,battery = &vbatt0;
2121
};
22-
23-
vbatt0: vbatt0 {
24-
compatible = "zmk,battery-voltage-divider";
25-
io-channels = <&adc 1>; // P0.03
26-
output-ohms = <2000000>;
27-
full-ohms = <(1000000 + 2000000)>;
28-
power-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; // P0.02
29-
};
30-
31-
hhkb_pro2_connector: hhkb_pro2_connector {
32-
compatible = "zmk,hhkb-pro2-header";
33-
#gpio-cells = <2>;
34-
gpio-map-mask = <0xffffffff 0xffffffc0>;
35-
gpio-map-pass-thru = <0 0x3f>;
36-
gpio-map = <0 0 &gpio0 31 NRF_GPIO_DRIVE_S0H1>,
37-
<1 0 &gpio0 4 0>,
38-
<2 0 &gpio0 5 0>,
39-
<3 0 &gpio0 22 0>,
40-
<4 0 &gpio0 7 0>,
41-
<5 0 &gpio1 9 0>,
42-
<6 0 &gpio0 12 0>,
43-
<7 0 &gpio0 23 0>,
44-
<8 0 &gpio0 21 0>,
45-
<9 0 &gpio0 19 0>;
46-
};
4722
};
4823

4924
&adc {
5025
status = "okay";
5126
};
5227

28+
&gpiote {
29+
status = "okay";
30+
};
31+
5332
&gpio0 {
5433
status = "okay";
5534
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ZMK_KEYBOARD_NAME="WHKB Pro2 Rev A"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2021 The ZMK Contributors
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*/
6+
7+
#include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
8+
9+
/ {
10+
vbatt0: vbatt0 {
11+
compatible = "zmk,battery-voltage-divider";
12+
io-channels = <&adc 1>; // P0.03
13+
output-ohms = <2000000>;
14+
full-ohms = <(1000000 + 2000000)>;
15+
power-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; // P0.02
16+
};
17+
18+
hhkb_pro2_connector: hhkb_pro2_connector {
19+
compatible = "zmk,hhkb-pro2-header";
20+
#gpio-cells = <2>;
21+
gpio-map-mask = <0xffffffff 0xffffffc0>;
22+
gpio-map-pass-thru = <0 0x3f>;
23+
gpio-map = <0 0 &gpio0 31 NRF_GPIO_DRIVE_S0H1>,
24+
<1 0 &gpio0 4 0>,
25+
<2 0 &gpio0 5 0>,
26+
<3 0 &gpio0 22 0>,
27+
<4 0 &gpio0 7 0>,
28+
<5 0 &gpio1 9 0>,
29+
<6 0 &gpio0 12 0>,
30+
<7 0 &gpio0 23 0>,
31+
<8 0 &gpio0 21 0>,
32+
<9 0 &gpio0 19 0>;
33+
};
34+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ZMK_KEYBOARD_NAME="WHKB Pro2 Rev C"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (c) 2021 The ZMK Contributors
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*/
6+
7+
#include <zephyr/dt-bindings/gpio/nordic-nrf-gpio.h>
8+
9+
/ {
10+
vbatt0: vbatt0 {
11+
compatible = "zmk,battery-nrf-vddh";
12+
};
13+
14+
hhkb_pro2_connector: hhkb_pro2_connector {
15+
compatible = "zmk,hhkb-pro2-header";
16+
#gpio-cells = <2>;
17+
gpio-map-mask = <0xffffffff 0xffffffc0>;
18+
gpio-map-pass-thru = <0 0x3f>;
19+
gpio-map = <0 0 &gpio0 29 0>, // LDO_ENABLE
20+
<1 0 &gpio0 13 0>,
21+
<2 0 &gpio0 20 0>,
22+
<3 0 &gpio0 17 0>,
23+
<4 0 &gpio0 15 0>,
24+
<5 0 &gpio0 7 0>,
25+
<6 0 &gpio0 12 0>,
26+
<7 0 &gpio0 4 0>,
27+
<8 0 &gpio0 8 0>,
28+
<9 0 &gpio0 6 0>;
29+
};
30+
};

config/zephyr/kscan/kscan_hhkb_pro2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ static const struct kscan_driver_api kscan_hhkb_pro2_api = {
235235
NULL, \
236236
&kscan_hhkb_pro2_data##inst, \
237237
&kscan_hhkb_pro2_config##inst, \
238-
APPLICATION, \
238+
POST_KERNEL, \
239239
CONFIG_APPLICATION_INIT_PRIORITY, \
240240
&kscan_hhkb_pro2_api);
241241

0 commit comments

Comments
 (0)