initially add configuration

This commit is contained in:
DonPavlov 2024-03-27 12:05:58 +00:00
parent 94c3b9a246
commit 0b5820522d
8 changed files with 253 additions and 0 deletions

View file

@ -0,0 +1,8 @@
# BlueHand board configuration
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
config BOARD_BLUEHAND
bool "BlueHand"
depends on SOC_NRF52840_QIAA

View file

@ -0,0 +1,27 @@
# BlueHand keyboard configuration
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
if BOARD_BLUEHAND
config ZMK_KEYBOARD_NAME
default "BlueHand"
if USB_DEVICE_STACK
config USB_NRFX
default y
endif # USB_DEVICE_STACK
config BT_CTLR
default BT
config ZMK_BLE
default y
config ZMK_USB
default y
endif # BOARD_BLUEHAND

View file

@ -0,0 +1,116 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
/ {
model = "BlueHand";
compatible = "blue,hand";
chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;
zmk,kscan = &kscan0;
zmk,battery = &vbatt;
};
kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-direct";
label = "KSCAN";
input-gpios
= <&gpio0 29 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 28 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};
leds {
compatible = "gpio-leds";
powerled: led_r {
gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
label = "PWR LED";
};
activityled: led_b {
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
vbatt: vbatt {
compatible = "zmk,battery-nrf-vddh";
};
};
&adc {
status = "okay";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
sd_partition: partition@0 {
label = "softdevice";
reg = <0x00000000 0x00026000>;
};
code_partition: partition@26000 {
label = "code_partition";
reg = <0x00026000 0x000c6000>;
};
/*
* The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application.
*/
/*
* Storage partition will be used by FCB/LittleFS/NVS
* if enabled.
*/
storage_partition: partition@ec000 {
label = "storage";
reg = <0x000ec000 0x00008000>;
};
boot_partition: partition@f4000 {
label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>;
};
};
};

View file

@ -0,0 +1,48 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
// -------------------
// | ALT+V | F13 | F14 | ALT+A |
// | MO(1) | F15 | F16 | F17 |
// ----------------------
bindings = <
&kp LA(V) &kp F13 &kp F14 &kp LA(A)
&mo 1 &kp F15 &kp F16 &kp F17
>;
};
nav_layer {
// -----------------------
// | F18 | F19 | F20 | F21 |
// | - | MO(2) | BT_SEL 0 | BT_SEL 1|
// -----------------------
bindings = <
&kp F18 &kp F19 &kp F20 &kp F21
&trans &mo 2 &bt BT_SEL 0 &bt BT_SEL 1
>;
};
other_layer {
// -----------------------
// | - | - | - | BT_CLR SEL |
// | - | - | - | - |
// -----------------------
bindings = <
&trans &trans &trans &bt BT_CLR
&trans &trans &trans &trans
>;
};
};
};

View file

@ -0,0 +1,15 @@
identifier: bluehand
name: BlueHand
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- ble
- ieee802154
- pwm
- watchdog

View file

@ -0,0 +1,11 @@
file_format: "1"
id: bluehand
name: BlueHand
type: board
arch: arm
outputs:
- usb
- ble
url: https://nrf52.jpconstantineau.com/docs/macropad/bluehand/
features:
- keys

View file

@ -0,0 +1,22 @@
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_BLUEHAND=y
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

View file

@ -0,0 +1,6 @@
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)