mirror of https://github.com/zmkfirmware/zmk.git
refactor(boards): Move Puchi BLE to ZMK variant by default
Make the standard Puchi BLE board ID be `puchi_ble/nrf52840/zmk` or `puchi_ble//zmk` by shorthand.
This commit is contained in:
parent
4b330229ca
commit
18ed95bff9
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
if BOARD_PUCHI_BLE
|
||||
|
||||
config BOARD
|
||||
default "puchi_ble"
|
||||
|
||||
if USB_DEVICE_STACK
|
||||
|
||||
config USB_NRFX
|
||||
|
|
@ -13,7 +10,4 @@ config USB_NRFX
|
|||
|
||||
endif # USB_DEVICE_STACK
|
||||
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
endif # BOARD_PUCHI_BLE
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@
|
|||
|
||||
config BOARD_PUCHI_BLE
|
||||
select SOC_NRF52840_QIAA
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
imply RETAINED_MEM if BOARD_PUCHI_BLE_NRF52840_ZMK
|
||||
imply RETENTION if BOARD_PUCHI_BLE_NRF52840_ZMK
|
||||
imply RETENTION_BOOT_MODE if BOARD_PUCHI_BLE_NRF52840_ZMK
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
board:
|
||||
name: puchi_ble
|
||||
vendor: keycapsss
|
||||
socs:
|
||||
- name: nrf52840
|
||||
extend: puchi_ble
|
||||
variants:
|
||||
- name: zmk
|
||||
qualifier: nrf52840
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
file_format: "1"
|
||||
id: puchi_ble
|
||||
id: puchi_ble//zmk
|
||||
name: Puchi-BLE V1
|
||||
type: board
|
||||
arch: arm
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2026 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <../boards/keycapsss/puchi_ble/puchi_ble.dts>
|
||||
#include <common/nordic/nrf52840_uf2_boot_mode.dtsi>
|
||||
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
// Node name must match original "EXT_POWER" label to preserve user settings.
|
||||
EXT_POWER {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
io-channels = <&adc 2>;
|
||||
output-ohms = <2000000>;
|
||||
full-ohms = <(2000000 + 820000)>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if BOARD_PUCHI_BLE
|
||||
|
||||
config BOARD
|
||||
default "puchi_ble"
|
||||
|
||||
if USB_DEVICE_STACK
|
||||
|
||||
config USB_NRFX
|
||||
default y
|
||||
|
||||
endif # USB_DEVICE_STACK
|
||||
|
||||
endif # BOARD_PUCHI_BLE
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# Puchi-BLE board configuration
|
||||
|
||||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_PUCHI_BLE
|
||||
select SOC_NRF52840_QIAA
|
||||
imply RETAINED_MEM
|
||||
imply RETENTION
|
||||
imply RETENTION_BOOT_MODE
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
board:
|
||||
name: puchi_ble
|
||||
vendor: keycapsss
|
||||
socs:
|
||||
- name: nrf52840
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
|
||||
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
|
||||
|
||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
file_format: "1"
|
||||
id: puchi_ble
|
||||
name: Puchi-BLE V1
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
url: https://keycapsss.com/keyboard-parts/mcu-controller/202/puchi-ble-wireless-microcontroller
|
||||
exposes: [pro_micro]
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# Copyright (c) 2026 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Use pinctrl
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
|
||||
Loading…
Reference in New Issue