CrossR
4 years ago
58 changed files with 873 additions and 77 deletions
@ -1,8 +1,8 @@
@@ -1,8 +1,8 @@
|
||||
# BlueMicro52840_V1 board configuration |
||||
# BlueMicro840 board configuration |
||||
|
||||
# Copyright (c) 2020 Pete Johanson, Derek Schmell |
||||
# SPDX-License-Identifier: MIT |
||||
|
||||
config BOARD_BLUEMICRO52840_V1 |
||||
bool "BlueMicro52840_V1" |
||||
config BOARD_BLUEMICRO840_V1 |
||||
bool "BlueMicro840_V1" |
||||
depends on SOC_NRF52840_QIAA |
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
||||
identifier: bluemicro52840_v1 |
||||
name: BlueMicro52840_V1 |
||||
identifier: bluemicro840_v1 |
||||
name: BlueMicro840_V1 |
||||
type: mcu |
||||
arch: arm |
||||
toolchain: |
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands |
||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py |
||||
-c |
||||
-b 0x26000 |
||||
-f 0xADA52840 |
||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2 |
||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin |
||||
) |
||||
|
||||
if(CONFIG_PINMUX) |
||||
zephyr_library() |
||||
zephyr_library_sources(pinmux.c) |
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers) |
||||
endif() |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
config BOARD_ENABLE_DCDC |
||||
bool "Enable DCDC mode" |
||||
select SOC_DCDC_NRF52X |
||||
default y |
||||
depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13) |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
# nrfmicro board configuration |
||||
|
||||
# Copyright (c) 2020 Okke Formsma, joric |
||||
# SPDX-License-Identifier: MIT |
||||
|
||||
config BOARD_NRFMICRO_11 |
||||
bool "nrfmicro_11" |
||||
depends on SOC_NRF52840_QIAA |
||||
|
||||
config BOARD_NRFMICRO_11_FLIPPED |
||||
bool "nrfmicro_11_flipped" |
||||
depends on SOC_NRF52840_QIAA |
||||
|
||||
config BOARD_NRFMICRO_13 |
||||
bool "nrfmicro_13" |
||||
depends on SOC_NRF52840_QIAA |
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
# Electronut Labs Papyr board configuration |
||||
|
||||
# Copyright (c) 2020 Okke Formsma, joric |
||||
# SPDX-License-Identifier: MIT |
||||
|
||||
if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 |
||||
|
||||
config BOARD |
||||
default "nrfmicro" |
||||
|
||||
if USB |
||||
|
||||
config USB_NRFX |
||||
default y |
||||
|
||||
config USB_DEVICE_STACK |
||||
default y |
||||
|
||||
endif # USB |
||||
|
||||
config BT_CTLR |
||||
default BT |
||||
|
||||
config ZMK_BLE |
||||
default y |
||||
|
||||
config ZMK_USB |
||||
default y |
||||
|
||||
config PINMUX |
||||
default y |
||||
|
||||
endif # BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 |
@ -0,0 +1,54 @@
@@ -0,0 +1,54 @@
|
||||
/* |
||||
* Copyright (c) 2020 Okke Formsma, joric |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
|
||||
/ { |
||||
pro_micro_d: connector_d { |
||||
compatible = "arduino-pro-micro"; |
||||
#gpio-cells = <2>; |
||||
gpio-map-mask = <0xffffffff 0xffffffc0>; |
||||
gpio-map-pass-thru = <0 0x3f>; |
||||
gpio-map |
||||
= <0 0 &gpio0 8 0> /* D0 */ |
||||
, <1 0 &gpio0 6 0> /* D1 */ |
||||
, <2 0 &gpio0 15 0> /* D2 */ |
||||
, <3 0 &gpio0 17 0> /* D3 */ |
||||
, <4 0 &gpio0 20 0> /* D4/A6 */ |
||||
, <5 0 &gpio0 13 0> /* D5 */ |
||||
, <6 0 &gpio0 24 0> /* D6/A7 */ |
||||
, <7 0 &gpio0 9 0> /* D7 */ |
||||
, <8 0 &gpio0 10 0> /* D8/A8 */ |
||||
, <9 0 &gpio1 6 0> /* D9/A9 */ |
||||
, <10 0 &gpio1 11 0> /* D10/A10 */ |
||||
, <16 0 &gpio0 28 0> /* D16 */ |
||||
, <14 0 &gpio0 3 0> /* D14 */ |
||||
, <15 0 &gpio1 13 0> /* D15 */ |
||||
; |
||||
}; |
||||
|
||||
pro_micro_a: connector_a { |
||||
compatible = "arduino-pro-micro"; |
||||
#gpio-cells = <2>; |
||||
gpio-map-mask = <0xffffffff 0xffffffc0>; |
||||
gpio-map-pass-thru = <0 0x3f>; |
||||
gpio-map |
||||
= <0 0 &gpio0 2 0> /* A0 */ |
||||
, <1 0 &gpio0 29 0> /* A1 */ |
||||
, <2 0 &gpio0 31 0> /* A2 */ |
||||
, <3 0 &gpio0 30 0> /* A3 */ |
||||
, <6 0 &gpio0 20 0> /* D4/A6 */ |
||||
, <7 0 &gpio0 24 0> /* D6/A7 */ |
||||
, <8 0 &gpio0 10 0> /* D8/A8 */ |
||||
, <9 0 &gpio1 6 0> /* D9/A9 */ |
||||
, <10 0 &gpio1 11 0> /* D10/A10 */ |
||||
; |
||||
}; |
||||
}; |
||||
|
||||
|
||||
pro_micro_i2c: &i2c0 {}; |
||||
pro_micro_spi: &spi0 {}; |
||||
pro_micro_serial: &uart0 {}; |
@ -0,0 +1,52 @@
@@ -0,0 +1,52 @@
|
||||
/* |
||||
* Copyright (c) 2020 Okke Formsma, joric |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
/ { |
||||
pro_micro_d: connector_d { |
||||
compatible = "arduino-pro-micro"; |
||||
#gpio-cells = <2>; |
||||
gpio-map-mask = <0xffffffff 0xffffffc0>; |
||||
gpio-map-pass-thru = <0 0x3f>; |
||||
gpio-map |
||||
= <0 0 &gpio0 8 0> /* D0 */ |
||||
, <1 0 &gpio0 6 0> /* D1 */ |
||||
, <2 0 &gpio0 30 0> /* D2 */ |
||||
, <3 0 &gpio0 31 0> /* D3 */ |
||||
, <4 0 &gpio0 29 0> /* D4/A6 */ |
||||
, <5 0 &gpio0 2 0> /* D5 */ |
||||
, <6 0 &gpio1 13 0> /* D6/A7 */ |
||||
, <7 0 &gpio0 3 0> /* D7 */ |
||||
, <8 0 &gpio0 28 0> /* D8/A8 */ |
||||
, <9 0 &gpio1 11 0> /* D9/A9 */ |
||||
, <10 0 &gpio1 6 0> /* D10/A10 */ |
||||
, <16 0 &gpio0 10 0> /* D16 */ |
||||
, <14 0 &gpio0 9 0> /* D14 */ |
||||
, <15 0 &gpio0 24 0> /* D15 */ |
||||
; |
||||
}; |
||||
|
||||
pro_micro_a: connector_a { |
||||
compatible = "arduino-pro-micro"; |
||||
#gpio-cells = <2>; |
||||
gpio-map-mask = <0xffffffff 0xffffffc0>; |
||||
gpio-map-pass-thru = <0 0x3f>; |
||||
gpio-map |
||||
= <0 0 &gpio0 13 0> /* A0 */ |
||||
, <1 0 &gpio0 20 0> /* A1 */ |
||||
, <2 0 &gpio0 17 0> /* A2 */ |
||||
, <3 0 &gpio0 15 0> /* A3 */ |
||||
, <6 0 &gpio0 29 0> /* D4/A6 */ |
||||
, <7 0 &gpio1 13 0> /* D6/A7 */ |
||||
, <8 0 &gpio0 28 0> /* D8/A8 */ |
||||
, <9 0 &gpio1 11 0> /* D9/A9 */ |
||||
, <10 0 &gpio1 6 0> /* D10/A10 */ |
||||
; |
||||
}; |
||||
}; |
||||
|
||||
pro_micro_i2c: &i2c0 {}; |
||||
pro_micro_spi: &spi0 {}; |
||||
pro_micro_serial: &uart0 {}; |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
# 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) |
@ -0,0 +1,93 @@
@@ -0,0 +1,93 @@
|
||||
/* |
||||
* Copyright (c) 2020 Okke Formsma, joric |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
/dts-v1/; |
||||
#include <nordic/nrf52840_qiaa.dtsi> |
||||
#include "arduino_pro_micro_pins.dtsi" |
||||
|
||||
/ { |
||||
model = "nrfmicro"; |
||||
compatible = "joric,nrfmicro"; |
||||
|
||||
chosen { |
||||
zephyr,code-partition = &code_partition; |
||||
zephyr,sram = &sram0; |
||||
zephyr,flash = &flash0; |
||||
}; |
||||
|
||||
leds { |
||||
compatible = "gpio-leds"; |
||||
blue_led: led_0 { |
||||
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; |
||||
label = "Blue LED"; |
||||
}; |
||||
}; |
||||
|
||||
}; |
||||
|
||||
&gpio0 { |
||||
status = "okay"; |
||||
}; |
||||
|
||||
&gpio1 { |
||||
status = "okay"; |
||||
}; |
||||
|
||||
&i2c0 { |
||||
compatible = "nordic,nrf-twi"; |
||||
sda-pin = <15>; |
||||
scl-pin = <17>; |
||||
}; |
||||
|
||||
&uart0 { |
||||
compatible = "nordic,nrf-uarte"; |
||||
status = "okay"; |
||||
current-speed = <115200>; |
||||
tx-pin = <39>; |
||||
rx-pin = <34>; |
||||
rts-pin = <33>; |
||||
cts-pin = <12>; |
||||
}; |
||||
|
||||
&usbd { |
||||
status = "okay"; |
||||
}; |
||||
|
||||
|
||||
&flash0 { |
||||
/* |
||||
* For more information, see: |
||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html |
||||
*/ |
||||
partitions { |
||||
compatible = "fixed-partitions"; |
||||
#address-cells = <1>; |
||||
#size-cells = <1>; |
||||
|
||||
boot_partition: partition@0 { |
||||
label = "adafruit_boot"; |
||||
reg = <0x000000000 0x0000C000>; |
||||
}; |
||||
code_partition: partition@26000 { |
||||
label = "code_partition"; |
||||
reg = <0x00026000 0x000d2000>; |
||||
}; |
||||
|
||||
/* |
||||
* The flash starting at 0x000f8000 and ending at |
||||
* 0x000fffff is reserved for use by the application. |
||||
*/ |
||||
|
||||
/* |
||||
* Storage partition will be used by FCB/LittleFS/NVS |
||||
* if enabled. |
||||
*/ |
||||
storage_partition: partition@f8000 { |
||||
label = "storage"; |
||||
reg = <0x000f8000 0x00008000>; |
||||
}; |
||||
}; |
||||
}; |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
identifier: nrfmicro_11 |
||||
name: nrfmicro_11 |
||||
type: mcu |
||||
arch: arm |
||||
toolchain: |
||||
- zephyr |
||||
- gnuarmemb |
||||
- xtools |
||||
supported: |
||||
- adc |
||||
- usb_device |
||||
- ble |
||||
- ieee802154 |
||||
- pwm |
||||
- watchdog |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
# SPDX-License-Identifier: MIT |
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y |
||||
CONFIG_SOC_NRF52840_QIAA=y |
||||
CONFIG_BOARD_NRFMICRO_11=y |
||||
|
||||
# Enable MPU |
||||
CONFIG_ARM_MPU=y |
||||
|
||||
# enable GPIO |
||||
CONFIG_GPIO=y |
||||
|
||||
CONFIG_USE_DT_CODE_PARTITION=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 |
||||
CONFIG_CLOCK_CONTROL_NRF=y |
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y |
@ -0,0 +1,93 @@
@@ -0,0 +1,93 @@
|
||||
/* |
||||
* Copyright (c) 2020 Okke Formsma, joric |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
/dts-v1/; |
||||
#include <nordic/nrf52840_qiaa.dtsi> |
||||
#include "arduino_pro_micro_pins_flipped.dtsi" |
||||
|
||||
/ { |
||||
model = "nrfmicro"; |
||||
compatible = "joric,nrfmicro"; |
||||
|
||||
chosen { |
||||
zephyr,code-partition = &code_partition; |
||||
zephyr,sram = &sram0; |
||||
zephyr,flash = &flash0; |
||||
}; |
||||
|
||||
leds { |
||||
compatible = "gpio-leds"; |
||||
blue_led: led_0 { |
||||
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; |
||||
label = "Blue LED"; |
||||
}; |
||||
}; |
||||
|
||||
}; |
||||
|
||||
&gpio0 { |
||||
status = "okay"; |
||||
}; |
||||
|
||||
&gpio1 { |
||||
status = "okay"; |
||||
}; |
||||
|
||||
&i2c0 { |
||||
compatible = "nordic,nrf-twi"; |
||||
sda-pin = <30>; |
||||
scl-pin = <31>; |
||||
}; |
||||
|
||||
&uart0 { |
||||
compatible = "nordic,nrf-uarte"; |
||||
status = "okay"; |
||||
current-speed = <115200>; |
||||
tx-pin = <39>; |
||||
rx-pin = <34>; |
||||
rts-pin = <33>; |
||||
cts-pin = <12>; |
||||
}; |
||||
|
||||
&usbd { |
||||
status = "okay"; |
||||
}; |
||||
|
||||
|
||||
&flash0 { |
||||
/* |
||||
* For more information, see: |
||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html |
||||
*/ |
||||
partitions { |
||||
compatible = "fixed-partitions"; |
||||
#address-cells = <1>; |
||||
#size-cells = <1>; |
||||
|
||||
boot_partition: partition@0 { |
||||
label = "adafruit_boot"; |
||||
reg = <0x000000000 0x0000C000>; |
||||
}; |
||||
code_partition: partition@26000 { |
||||
label = "code_partition"; |
||||
reg = <0x00026000 0x000d2000>; |
||||
}; |
||||
|
||||
/* |
||||
* The flash starting at 0x000f8000 and ending at |
||||
* 0x000fffff is reserved for use by the application. |
||||
*/ |
||||
|
||||
/* |
||||
* Storage partition will be used by FCB/LittleFS/NVS |
||||
* if enabled. |
||||
*/ |
||||
storage_partition: partition@f8000 { |
||||
label = "storage"; |
||||
reg = <0x000f8000 0x00008000>; |
||||
}; |
||||
}; |
||||
}; |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
identifier: nrfmicro_11_flipped |
||||
name: nrfmicro_11_flipped |
||||
type: mcu |
||||
arch: arm |
||||
toolchain: |
||||
- zephyr |
||||
- gnuarmemb |
||||
- xtools |
||||
supported: |
||||
- adc |
||||
- usb_device |
||||
- ble |
||||
- ieee802154 |
||||
- pwm |
||||
- watchdog |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
# SPDX-License-Identifier: MIT |
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y |
||||
CONFIG_SOC_NRF52840_QIAA=y |
||||
CONFIG_BOARD_NRFMICRO_11_FLIPPED=y |
||||
|
||||
# Enable MPU |
||||
CONFIG_ARM_MPU=y |
||||
|
||||
# enable GPIO |
||||
CONFIG_GPIO=y |
||||
|
||||
CONFIG_USE_DT_CODE_PARTITION=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 |
||||
CONFIG_CLOCK_CONTROL_NRF=y |
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y |
@ -0,0 +1,93 @@
@@ -0,0 +1,93 @@
|
||||
/* |
||||
* Copyright (c) 2020 Okke Formsma, joric |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
/dts-v1/; |
||||
#include <nordic/nrf52840_qiaa.dtsi> |
||||
#include "arduino_pro_micro_pins.dtsi" |
||||
|
||||
/ { |
||||
model = "nrfmicro"; |
||||
compatible = "joric,nrfmicro"; |
||||
|
||||
chosen { |
||||
zephyr,code-partition = &code_partition; |
||||
zephyr,sram = &sram0; |
||||
zephyr,flash = &flash0; |
||||
}; |
||||
|
||||
leds { |
||||
compatible = "gpio-leds"; |
||||
blue_led: led_0 { |
||||
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; |
||||
label = "Blue LED"; |
||||
}; |
||||
}; |
||||
|
||||
}; |
||||
|
||||
&gpio0 { |
||||
status = "okay"; |
||||
}; |
||||
|
||||
&gpio1 { |
||||
status = "okay"; |
||||
}; |
||||
|
||||
&i2c0 { |
||||
compatible = "nordic,nrf-twi"; |
||||
sda-pin = <15>; |
||||
scl-pin = <17>; |
||||
}; |
||||
|
||||
&uart0 { |
||||
compatible = "nordic,nrf-uarte"; |
||||
status = "okay"; |
||||
current-speed = <115200>; |
||||
tx-pin = <39>; |
||||
rx-pin = <34>; |
||||
rts-pin = <33>; |
||||
cts-pin = <12>; |
||||
}; |
||||
|
||||
&usbd { |
||||
status = "okay"; |
||||
}; |
||||
|
||||
|
||||
&flash0 { |
||||
/* |
||||
* For more information, see: |
||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html |
||||
*/ |
||||
partitions { |
||||
compatible = "fixed-partitions"; |
||||
#address-cells = <1>; |
||||
#size-cells = <1>; |
||||
|
||||
boot_partition: partition@0 { |
||||
label = "adafruit_boot"; |
||||
reg = <0x000000000 0x0000C000>; |
||||
}; |
||||
code_partition: partition@26000 { |
||||
label = "code_partition"; |
||||
reg = <0x00026000 0x000d2000>; |
||||
}; |
||||
|
||||
/* |
||||
* The flash starting at 0x000f8000 and ending at |
||||
* 0x000fffff is reserved for use by the application. |
||||
*/ |
||||
|
||||
/* |
||||
* Storage partition will be used by FCB/LittleFS/NVS |
||||
* if enabled. |
||||
*/ |
||||
storage_partition: partition@f8000 { |
||||
label = "storage"; |
||||
reg = <0x000f8000 0x00008000>; |
||||
}; |
||||
}; |
||||
}; |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
identifier: nrfmicro_13 |
||||
name: nrfmicro_13 |
||||
type: mcu |
||||
arch: arm |
||||
toolchain: |
||||
- zephyr |
||||
- gnuarmemb |
||||
- xtools |
||||
supported: |
||||
- adc |
||||
- usb_device |
||||
- ble |
||||
- ieee802154 |
||||
- pwm |
||||
- watchdog |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
# SPDX-License-Identifier: MIT |
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y |
||||
CONFIG_SOC_NRF52840_QIAA=y |
||||
CONFIG_BOARD_NRFMICRO_13=y |
||||
|
||||
# Enable MPU |
||||
CONFIG_ARM_MPU=y |
||||
|
||||
# enable GPIO |
||||
CONFIG_GPIO=y |
||||
|
||||
CONFIG_USE_DT_CODE_PARTITION=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 |
||||
CONFIG_CLOCK_CONTROL_NRF=y |
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y |
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Okke Formsma, joric |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#include <kernel.h> |
||||
#include <device.h> |
||||
#include <init.h> |
||||
#include <drivers/gpio.h> |
||||
#include <sys/sys_io.h> |
||||
#include <devicetree.h> |
||||
|
||||
static int pinmux_nrfmicro_init(struct device *port) |
||||
{ |
||||
ARG_UNUSED(port); |
||||
|
||||
struct device *p1 = device_get_binding("GPIO_1"); |
||||
|
||||
#if CONFIG_BOARD_NRFMICRO_13 |
||||
struct device *p0 = device_get_binding("GPIO_0"); |
||||
// enable EXT_VCC (use 0 for nRFMicro 1.3, use 1 for nRFMicro 1.1)
|
||||
gpio_pin_configure(p1, 9, GPIO_OUTPUT); |
||||
gpio_pin_set(p1, 9, 0); |
||||
|
||||
// enable charger (nRFMicro 1.3 only)
|
||||
gpio_pin_configure(p0, 5, GPIO_OUTPUT); |
||||
gpio_pin_set(p0, 5, 0); |
||||
#else |
||||
// enable EXT_VCC (use 0 for nRFMicro 1.3, use 1 for nRFMicro 1.1)
|
||||
gpio_pin_configure(p1, 9, GPIO_OUTPUT); |
||||
gpio_pin_set(p1, 9, 1); |
||||
#endif |
||||
return 0; |
||||
} |
||||
|
||||
SYS_INIT(pinmux_nrfmicro_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); |
@ -1,3 +1,2 @@
@@ -1,3 +1,2 @@
|
||||
CONFIG_ZMK_SPLIT=y |
||||
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y |
||||
CONFIG_ZMK_BLE_UNPAIR_COMBO=y |
@ -1,3 +1,2 @@
@@ -1,3 +1,2 @@
|
||||
CONFIG_ZMK_SPLIT=y |
||||
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y |
||||
CONFIG_ZMK_BLE_UNPAIR_COMBO=y |
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
&spi1 { |
||||
compatible = "nordic,nrf-spi"; |
||||
status = "okay"; |
||||
mosi-pin = <6>; |
||||
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. |
||||
sck-pin = <12>; // 0.12 is not broken out on the nRFMicro |
||||
miso-pin = <22>; // 0.22 is not broken out on the nRFMicro |
||||
|
||||
led_strip: ws2812@0 { |
||||
compatible = "worldsemi,ws2812-spi"; |
||||
label = "WS2812"; |
||||
|
||||
/* SPI */ |
||||
reg = <0>; /* ignored, but necessary for SPI bindings */ |
||||
spi-max-frequency = <4000000>; |
||||
|
||||
/* WS2812 */ |
||||
chain-length = <10>; /* arbitrary; change at will */ |
||||
spi-one-frame = <0x70>; |
||||
spi-zero-frame = <0x40>; |
||||
}; |
||||
}; |
||||
|
||||
/ { |
||||
chosen { |
||||
zmk,underglow = &led_strip; |
||||
}; |
||||
}; |
||||
|
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
&spi1 { |
||||
compatible = "nordic,nrf-spi"; |
||||
status = "okay"; |
||||
mosi-pin = <6>; |
||||
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. |
||||
sck-pin = <12>; // 0.12 is not broken out on the nRFMicro |
||||
miso-pin = <22>; // 0.22 is not broken out on the nRFMicro |
||||
|
||||
led_strip: ws2812@0 { |
||||
compatible = "worldsemi,ws2812-spi"; |
||||
label = "WS2812"; |
||||
|
||||
/* SPI */ |
||||
reg = <0>; /* ignored, but necessary for SPI bindings */ |
||||
spi-max-frequency = <4000000>; |
||||
|
||||
/* WS2812 */ |
||||
chain-length = <10>; /* arbitrary; change at will */ |
||||
spi-one-frame = <0x70>; |
||||
spi-zero-frame = <0x40>; |
||||
}; |
||||
}; |
||||
|
||||
/ { |
||||
chosen { |
||||
zmk,underglow = &led_strip; |
||||
}; |
||||
}; |
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
&spi1 { |
||||
compatible = "nordic,nrf-spi"; |
||||
status = "okay"; |
||||
mosi-pin = <6>; |
||||
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. |
||||
sck-pin = <12>; // 0.12 is not broken out on the nRFMicro |
||||
miso-pin = <22>; // 0.22 is not broken out on the nRFMicro |
||||
|
||||
led_strip: ws2812@0 { |
||||
compatible = "worldsemi,ws2812-spi"; |
||||
label = "WS2812"; |
||||
|
||||
/* SPI */ |
||||
reg = <0>; /* ignored, but necessary for SPI bindings */ |
||||
spi-max-frequency = <4000000>; |
||||
|
||||
/* WS2812 */ |
||||
chain-length = <10>; /* arbitrary; change at will */ |
||||
spi-one-frame = <0x70>; |
||||
spi-zero-frame = <0x40>; |
||||
}; |
||||
}; |
||||
|
||||
/ { |
||||
chosen { |
||||
zmk,underglow = &led_strip; |
||||
}; |
||||
}; |
@ -1,3 +1,2 @@
@@ -1,3 +1,2 @@
|
||||
CONFIG_ZMK_SPLIT=y |
||||
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y |
||||
CONFIG_ZMK_BLE_UNPAIR_COMBO=y |
@ -1,3 +1,2 @@
@@ -1,3 +1,2 @@
|
||||
CONFIG_ZMK_SPLIT=y |
||||
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y |
||||
CONFIG_ZMK_BLE_UNPAIR_COMBO=y |
@ -1,3 +1,2 @@
@@ -1,3 +1,2 @@
|
||||
CONFIG_ZMK_SPLIT=y |
||||
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y |
||||
CONFIG_ZMK_BLE_UNPAIR_COMBO=y |
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com> |
||||
* |
||||
* SPDX-License-Identifier: MIT |
||||
*/ |
||||
|
||||
#define RST_WARM 0x00 |
||||
#define RST_COLD 0x01 |
||||
|
||||
// AdaFruit nrf52 Bootloader Specific. See https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/d6b28e66053eea467166f44875e3c7ec741cb471/src/main.c#L107
|
||||
|
||||
#define RST_UF2 0x57 |
After Width: | Height: | Size: 144 KiB |
After Width: | Height: | Size: 137 KiB |
@ -0,0 +1,43 @@
@@ -0,0 +1,43 @@
|
||||
--- |
||||
title: Reset Behaviors |
||||
sidebar_label: Reset |
||||
--- |
||||
|
||||
## Summary |
||||
|
||||
There are two available behaviors that can be used to trigger a reset of the keyboard. |
||||
The first is a soft reset, that will simply reset and re-run the currently flashed |
||||
firmware; the second when triggered will reset into the bootloader, allowing you to |
||||
flash a new firmware to the keyboard. |
||||
|
||||
## Reset |
||||
|
||||
The basic reset behavior will reset the keyboard and re-run the firmware flashed |
||||
to the device |
||||
|
||||
### Behavior Binding |
||||
|
||||
- Reference: `&reset` |
||||
- Parameters: None |
||||
|
||||
Example: |
||||
|
||||
``` |
||||
&reset |
||||
``` |
||||
|
||||
## Bootloader Reset |
||||
|
||||
The bootloader reset behavior will reset the keyboard and put it into bootloader mode, allowing |
||||
you to flash a new firmware. |
||||
|
||||
### Behavior Binding |
||||
|
||||
- Reference: `&bootloader` |
||||
- Parameters: None |
||||
|
||||
Example: |
||||
|
||||
``` |
||||
&bootloader |
||||
``` |
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
--- |
||||
id: bond-reset |
||||
title: Reset BLE Connections |
||||
sidebar_label: BLE Reset |
||||
--- |
||||
|
||||
Known as a 'bond reset', a special key combination, that is not related to the user defined key map, which |
||||
clears all wireless connection configurations. The keys must be held for 3 to 5 seconds after the device is |
||||
reset. |
||||
|
||||
:::warning |
||||
Currently, ZMK only supports a single BLE host. If you remove the keyboard from the host's bluetooth devices |
||||
list, you will need to clear the bonds. |
||||
::: |
||||
|
||||
### Split Keyboards |
||||
|
||||
Split keyboards will need to be cleared on both halves. For best results try to reset them at the same time. |
||||
|
||||
|
||||
## Kyria |
||||
|
||||
![Kyria bond-reset combo](assets/bond-clearing/kyria.jpg) |
||||
|
||||
## Corne |
||||
|
||||
![Corne bond-reset combo](assets/bond-clearing/corne.jpg) |
Loading…
Reference in new issue