Browse Source

V3.0 Update

refactor(board): Update to z3.2

Major update to underlying code requires change to the repo, brought in line with zmk pr for commonality, fixed indentation to comply with zmk pre-commit formatting reqs

Update settings-reset, change RGB modes

Add Update instructions, Assets folder
V3.0
ReFil 3 years ago
parent
commit
771d68f3a6
  1. 62
      UPGRADE.md
  2. BIN
      assets/commit.jpg
  3. BIN
      assets/conflict.jpg
  4. BIN
      assets/json.jpg
  5. BIN
      assets/keymap.jpg
  6. BIN
      assets/merge.jpg
  7. 8
      config/boards/arm/adv360/Kconfig
  8. 10
      config/boards/arm/adv360/Kconfig.board
  9. 30
      config/boards/arm/adv360/Kconfig.defconfig
  10. 247
      config/boards/arm/adv360/adv360.dtsi
  11. 2
      config/boards/arm/adv360/adv360.yaml
  12. 16
      config/boards/arm/adv360/adv360.zmk.yml
  13. 56
      config/boards/arm/adv360/adv360_left.dts
  14. 36
      config/boards/arm/adv360/adv360_left_defconfig
  15. 30
      config/boards/arm/adv360/adv360_pinctrl.dtsi
  16. 64
      config/boards/arm/adv360/adv360_right.dts
  17. 27
      config/boards/arm/adv360/adv360_right_defconfig
  18. 2
      config/boards/arm/adv360/board.cmake
  19. 36
      config/boards/arm/adv360/macros.dtsi
  20. 6
      config/keymap.json
  21. 2
      config/west.yml
  22. BIN
      settings-reset.uf2

62
UPGRADE.md

@ -0,0 +1,62 @@
# Advantage 360 Pro ZMK upgrade guide
The last V2.0 update and the new V3.0 branch have introduced changes into the keymap files that causes merge conflicts for people updating with custom keymaps. This guide covers what changed, why it changed and how to fix it.
## What changed and why
To resolve issues some users were encountering with out of matrix keypresses, as well as to streamline the keymap for all future updates, several keys that are unused were removed from the keymap and [matrix transform](https://zmk.dev/docs/config/kscan#matrix-transform). Formatting was also standardised to fall in line with ZMK formatting conventions. As a result the board definition for the Advantage 360 Pro as it stands to get merged into ZMK main [here](https://github.com/zmkfirmware/zmk/pull/1454) matches the one in this repository to the greatest extent possible.
These changes result in a merge conflict when two diverging git branches try to get added together in the updating procedure.
This sort of breaking change shouldn't happen again in the future.
## How to solve the merge conflict
In order to solve the merge conflict all that has to be done is for the conflicting key behaviours to be manually removed from two files.
- adv360.keymap
![The highlighted &none behaviours that need removing](/assets/keymap.jpg)
- keymap.json
![The highlighted &none behaviours that need removing](/assets/json.jpg)
These highlighted keys must be removed from each layer in both files. Be careful to preserve a comma in between every key behaviour in the keymap.json and at least one space between every behaviour in adv360.keymap or firmware builds will fail. The quotes need correctly preserving on the behaviours in keymap.json. Each behaviour needs to be wrapped in quotes. Whitespace within the quotes is ignored.
If you try to update your fork using the GitHub web interface you will see an error saying "This branch has merge conflicts and cannot be merged automatically" and you will be prompted to open a pull request instead. Solving the merge conflict this way is more challenging than doing it on GitHub desktop.
### Github Desktop
This assumes you already have [GitHub desktop](https://desktop.github.com/) downloaded, installed and you have logged in using the GitHub credentials for your account. Whilst it would be helpful to have an alternative text editor such as VSCode installed this task can be completed with notepad
1. Clone your repository
Navigate in the menu to File->Clone repository. Your fork of the Adv360-Pro-ZMK repository should be visible in the menu of repositories to choose from. Click the blue "Clone" button
2. Open the folder
Open the folder by using the "Show in your file manager" option and navigate to the "config" folder
3. Edit keymap.json
Open keymap.json, and for each layer remove the 8 highlighted &none behaviours including the quotes wrapping them, and the commas
4. Edit adv 360.keymap
Open adv360.keymap and remove the 8 highlighted &none behaviours in each later
5. Commit your changes
Returning to GitHub desktop you should see the changes you made in the bar on the left. Type an appropriate commit summary and click "Commit to *branch name*"
![The commit dialog of GitHub Desktop](/assets/commit.jpg)
6. Merge
Navigate to Branch->Merge into current branch and select "upstream/V2.0" or "upstream/V3.0". You will see a warning that there will be two conflicted files. Click "Create a merge commit".
![The merge dialog showing a warning of conflicts](/assets/merge.jpg)
7. Resolve Conflicts
The conflict resolution window has powerful options to soresolve the merge conflict, you will want to clik on the down arrow next to "Open in *your text editor*" and click use the modified file from *your branch name*. In the case of this example it is called V2.0-beta. Using the file from upstream/V2.0 or upstream/V3.0 will result in none of your keymap changes being preserved.
Do this for both files then you will be able to click the "Continue Merge" option
![The merge dialog showing a warning of conflicts](/assets/conflict.jpg)
8. Push
Once the merge is complete you should be able to click the "push origin" button in the top bar. At this point your changes should be uploaded to GitHub servers and the build should start
9. Test your firmware
When the build succeeds download the uf2 files and flash them as normal. Test the keymap, if keys are shifted one way or the other it's likely you deleted too many or not enough behaviours.

BIN
assets/commit.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/conflict.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
assets/json.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/keymap.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
assets/merge.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

8
config/boards/arm/adv360/Kconfig

@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
config BOARD_ENABLE_DCDC config BOARD_ENABLE_DCDC
bool "Enable DCDC mode" bool "Enable DCDC mode"
select SOC_DCDC_NRF52X select SOC_DCDC_NRF52X
default y default y
depends on BOARD_ADV360_LEFT || BOARD_ADV360_RIGHT depends on BOARD_ADV360_LEFT || BOARD_ADV360_RIGHT

10
config/boards/arm/adv360/Kconfig.board

@ -1,12 +1,12 @@
# #
# Copyright (c) 2021 Polarity Works # Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# #
config BOARD_ADV360_LEFT config BOARD_ADV360_LEFT
bool "adv360_left" bool "adv360_left"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA
config BOARD_ADV360_RIGHT config BOARD_ADV360_RIGHT
bool "adv360_right" bool "adv360_right"
depends on SOC_NRF52840_QIAA depends on SOC_NRF52840_QIAA

30
config/boards/arm/adv360/Kconfig.defconfig

@ -1,19 +1,21 @@
# #
# Copyright (c) 2021 Polarity Works # Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# #
if BOARD_ADV360_LEFT if BOARD_ADV360_LEFT
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "Adv360 Pro" default "Adv360 Pro"
config ZMK_SPLIT_ROLE_CENTRAL
default y
endif # BOARD_ADV360_LEFT endif # BOARD_ADV360_LEFT
if BOARD_ADV360_RIGHT if BOARD_ADV360_RIGHT
config ZMK_KEYBOARD_NAME config ZMK_KEYBOARD_NAME
default "Adv360 Pro rt" default "Adv360 Pro rt"
endif # BOARD_ADV360_RIGHT endif # BOARD_ADV360_RIGHT
@ -21,39 +23,39 @@ endif # BOARD_ADV360_RIGHT
if BOARD_ADV360_LEFT || BOARD_ADV360_RIGHT if BOARD_ADV360_LEFT || BOARD_ADV360_RIGHT
config BOARD config BOARD
default "adv360" default "adv360"
config ZMK_SPLIT config ZMK_SPLIT
default y default y
config SPI config SPI
bool bool
default y default y
config BT_CTLR config BT_CTLR
default BT default BT
config ZMK_BLE config ZMK_BLE
default y default y
config ZMK_USB config ZMK_USB
default y default y
if USB if USB
config USB_NRFX config USB_NRFX
default y default y
config USB_DEVICE_STACK config USB_DEVICE_STACK
default y default y
endif # USB endif # USB
config ZMK_BATTERY_VOLTAGE_DIVIDER config ZMK_BATTERY_VOLTAGE_DIVIDER
default y default y
config SPI config SPI
default y default y

247
config/boards/arm/adv360/adv360.dtsi

@ -11,171 +11,150 @@
#include <dt-bindings/led/led.h> #include <dt-bindings/led/led.h>
#include <dt-bindings/zmk/matrix_transform.h> #include <dt-bindings/zmk/matrix_transform.h>
#include "adv360_pinctrl.dtsi"
/ { / {
model = "Adv360"; model = "Adv360";
compatible = "adv360"; compatible = "kinesis,adv360";
chosen { chosen {
zephyr,code-partition = &code_partition; zephyr,code-partition = &code_partition;
zephyr,sram = &sram0; zephyr,sram = &sram0;
zephyr,flash = &flash0; zephyr,flash = &flash0;
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,underglow = &led_strip; zmk,backlight = &backlight;
zmk,backlight = &backlight; zmk,battery = &vbatt;
zmk,matrix_transform = &default_transform; zmk,matrix_transform = &default_transform;
zmk,battery = &vbatt; zmk,underglow = &led_strip;
zephyr,console = &cdc_acm_uart;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <20>;
rows = <5>;
map = <
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,13) RC(4,14) RC(4,15) RC(4,16) RC(4,17) RC(4,18) RC(4,19)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,13) RC(3,14) RC(3,15) RC(3,16) RC(3,17) RC(3,18) RC(3,19)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17) RC(2,18) RC(2,19)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,9) RC(1,10) RC(1,14) RC(1,15) RC(1,16) RC(1,17) RC(1,18) RC(1,19)
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,15) RC(0,16) RC(0,17) RC(0,18) RC(0,19)
>;
};
ext-power {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
backlight: pwmleds {
compatible = "pwm-leds";
label = "Backlight LEDs";
pwm_led_0 {
pwms = <&pwm0 17>;
label = "Backlight LED 0";
}; };
}; default_transform: keymap_transform_0 {
leds { compatible = "zmk,matrix-transform";
compatible = "gpio-leds"; columns = <20>;
blue_led: led_0 { rows = <5>;
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
}; map = <
}; RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,13) RC(4,14) RC(4,15) RC(4,16) RC(4,17) RC(4,18) RC(4,19)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,13) RC(3,14) RC(3,15) RC(3,16) RC(3,17) RC(3,18) RC(3,19)
vbatt: vbatt { RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17) RC(2,18) RC(2,19)
compatible = "zmk,battery-voltage-divider"; RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,9) RC(1,10) RC(1,14) RC(1,15) RC(1,16) RC(1,17) RC(1,18) RC(1,19)
label = "VBATT"; RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,15) RC(0,16) RC(0,17) RC(0,18) RC(0,19)
io-channels = <&adc 2>;
output-ohms = <100000>; >;
full-ohms = <(100000 + 100000)>; };
}; ext-power {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
io-channels = <&adc 2>;
output-ohms = <100000>;
full-ohms = <(100000 + 100000)>;
};
backlight: pwmleds {
compatible = "pwm-leds";
pwm_led_0 {
pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>;
};
};
}; };
&pwm0 { &pwm0 {
status = "okay"; status = "okay";
ch0-pin = <17>; pinctrl-0 = <&pwm0_default>;
pinctrl-1 = <&pwm0_sleep>;
pinctrl-names = "default", "sleep";
}; };
&adc { &adc {
status = "okay"; status = "okay";
}; };
&gpiote { &gpiote {
status = "okay"; status = "okay";
}; };
&gpio0 { &gpio0 {
status = "okay"; status = "okay";
}; };
&gpio1 { &gpio1 {
status = "okay"; status = "okay";
}; };
&usbd { &usbd {
status = "disabled"; status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};
&uart0 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
tx-pin = <39>;
rx-pin = <44>;
rts-pin = <34>;
cts-pin = <9>;
}; };
&flash0 { &flash0 {
/* /*
* For more information, see: * For more information, see:
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
*/ */
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
sd_partition: partition@0 { sd_partition: partition@0 {
label = "softdevice"; label = "softdevice";
reg = <0x00000000 0x00026000>; reg = <0x00000000 0x00026000>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
label = "code_partition"; label = "code_partition";
reg = <0x00026000 0x000c6000>; reg = <0x00026000 0x000c6000>;
}; };
/* /*
* The flash starting at 0x000ec000 and ending at * The flash starting at 0x000ec000 and ending at
* 0x000f3fff is reserved for use by the application. * 0x000f3fff is reserved for use by the application.
*/ */
/* /*
* Storage partition will be used by FCB/LittleFS/NVS * Storage partition will be used by FCB/LittleFS/NVS
* if enabled. * if enabled.
*/ */
storage_partition: partition@ec000 { storage_partition: partition@ec000 {
label = "storage"; label = "storage";
reg = <0x000ec000 0x00008000>; reg = <0x000ec000 0x00008000>;
}; };
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "adafruit_boot"; label = "adafruit_boot";
reg = <0x000f4000 0x0000c000>; reg = <0x000f4000 0x0000c000>;
}; };
}; };
}; };
&spi1 { &spi3 {
compatible = "nordic,nrf-spim"; compatible = "nordic,nrf-spim";
status = "okay"; status = "okay";
mosi-pin = <20>; pinctrl-0 = <&spi3_default>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. pinctrl-1 = <&spi3_sleep>;
sck-pin = <27>; pinctrl-names = "default", "sleep";
miso-pin = <8>;
led_strip: ws2812@0 { led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi"; compatible = "worldsemi,ws2812-spi";
label = "WS2812"; label = "WS2812";
/* SPI */ /* SPI */
reg = <0>; reg = <0>;
spi-max-frequency = <4000000>; spi-max-frequency = <4000000>;
/* WS2812 */ /* WS2812 */
chain-length = <3>; /* number of LEDs */ chain-length = <3>; /* number of LEDs */
spi-one-frame = <0x70>; spi-one-frame = <0x70>;
spi-zero-frame = <0x40>; spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN color-mapping = <LED_COLOR_ID_GREEN
LED_COLOR_ID_RED LED_COLOR_ID_RED
LED_COLOR_ID_BLUE>; LED_COLOR_ID_BLUE>;
}; };
}; };

2
config/boards/arm/adv360/adv360.yaml

@ -1,5 +1,5 @@
identifier: adv360 identifier: adv360
name: Adv360 name: Advantage 360 Pro
type: keyboard type: keyboard
arch: arm arch: arm
toolchain: toolchain:

16
config/boards/arm/adv360/adv360.zmk.yml

@ -0,0 +1,16 @@
file_format: "1"
id: adv360
name: Advantage 360 Pro
type: board
url: https://kinesis-ergo.com/keyboards/advantage360
arch: arm
features:
- keys
- underglow
- backlight
outputs:
- usb
- ble
siblings:
- adv360pro_left
- adv360pro_right

56
config/boards/arm/adv360/adv360_left.dts

@ -8,39 +8,29 @@
#include "adv360.dtsi" #include "adv360.dtsi"
/{ /{
kscan0: kscan { kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row"; diode-direction = "col2row";
row-gpios row-gpios
= <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> = <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
; ;
col-gpios
= <&gpio0 25 GPIO_ACTIVE_HIGH>
, <&gpio0 11 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 30 GPIO_ACTIVE_HIGH>
, <&gpio0 31 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 12 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH>
;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
col-gpios
= <&gpio0 25 GPIO_ACTIVE_HIGH>
, <&gpio0 11 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio0 30 GPIO_ACTIVE_HIGH>
, <&gpio0 31 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio0 12 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH>
;
};
}; };

36
config/boards/arm/adv360/adv360_left_defconfig

@ -1,15 +1,11 @@
# #
# Copyright (c) 2021 Polarity Works # Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# #
CONFIG_SOC_SERIES_NRF52X=y CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_ADV360_LEFT=y CONFIG_BOARD_ADV360_LEFT=y
CONFIG_ZMK_BLE=y
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_ROLE_CENTRAL=y
# Enable MPU # Enable MPU
CONFIG_ARM_MPU=y CONFIG_ARM_MPU=y
@ -17,10 +13,9 @@ CONFIG_ARM_MPU=y
# enable GPIO # enable GPIO
CONFIG_GPIO=y CONFIG_GPIO=y
# Enable SPI for LEDS
# Enable SPI CONFIG_PINCTRL=y
CONFIG_SPI=y CONFIG_SPI=y
CONFIG_SPI_NRFX=y CONFIG_SPI_NRFX=y
# Enable writing to flash # Enable writing to flash
@ -34,28 +29,37 @@ CONFIG_FLASH_MAP=y
# Enable 32kHz crystal # Enable 32kHz crystal
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
#RGB leds config
CONFIG_WS2812_STRIP=y
CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=4 CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=4
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# Use the STRIP config specific to the LEDs you're using #Backlighting configuration
CONFIG_WS2812_STRIP=y
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_PWM=y CONFIG_PWM=y
CONFIG_LED_PWM=y CONFIG_LED_PWM=y
CONFIG_ZMK_BACKLIGHT=y CONFIG_ZMK_BACKLIGHT=y
CONFIG_ZMK_BACKLIGHT_BRT_START=20
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y #BT configuration
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_BT_DIS_MANUF="Kinesis Corporation"
CONFIG_BT_PRIVACY=y
CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=y
CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=600
CONFIG_BT_PERIPHERAL_PREF_MIN_INT=12
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=24
CONFIG_BT_PERIPHERAL_PREF_LATENCY=30
#Misc configuration
CONFIG_USB_DEVICE_VID=0x29EA CONFIG_USB_DEVICE_VID=0x29EA
CONFIG_USB_DEVICE_PID=0x0362 CONFIG_USB_DEVICE_PID=0x0362
CONFIG_USB_DEVICE_MANUFACTURER="Kinesis Corporation" CONFIG_USB_DEVICE_MANUFACTURER="Kinesis Corporation"
CONFIG_BT_DIS_MANUF="Kinesis Corporation" CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
CONFIG_BUILD_OUTPUT_UF2=y CONFIG_BUILD_OUTPUT_UF2=y

30
config/boards/arm/adv360/adv360_pinctrl.dtsi

@ -0,0 +1,30 @@
/*
* Copyright (c) 2023 The ZMK Contributors
* SPDX-License-Identifier: MIT
*/
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
low-power-enable;
};
};
pwm0_default: pwm0_default {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
};
};
pwm0_sleep: pwm0_sleep {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
low-power-enable;
};
};
};

64
config/boards/arm/adv360/adv360_right.dts

@ -11,43 +11,33 @@
kscan0: kscan { kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix"; compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
diode-direction = "col2row"; row-gpios
row-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ;
;
col-gpios
col-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>
= <&gpio0 12 GPIO_ACTIVE_HIGH> , <&gpio1 9 GPIO_ACTIVE_HIGH>
, <&gpio1 9 GPIO_ACTIVE_HIGH> , <&gpio0 7 GPIO_ACTIVE_HIGH>
, <&gpio0 7 GPIO_ACTIVE_HIGH> , <&gpio1 11 GPIO_ACTIVE_HIGH>
, <&gpio1 11 GPIO_ACTIVE_HIGH> , <&gpio1 10 GPIO_ACTIVE_HIGH>
, <&gpio1 10 GPIO_ACTIVE_HIGH> , <&gpio1 13 GPIO_ACTIVE_HIGH>
, <&gpio1 13 GPIO_ACTIVE_HIGH> , <&gpio1 15 GPIO_ACTIVE_HIGH>
, <&gpio1 15 GPIO_ACTIVE_HIGH> , <&gpio0 3 GPIO_ACTIVE_HIGH>
, <&gpio0 3 GPIO_ACTIVE_HIGH> , <&gpio0 2 GPIO_ACTIVE_HIGH>
, <&gpio0 2 GPIO_ACTIVE_HIGH> , <&gpio0 28 GPIO_ACTIVE_HIGH>
, <&gpio0 28 GPIO_ACTIVE_HIGH> ;
; };
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
label = "Blue LED";
};
};
}; };
&default_transform { &default_transform {
col-offset = <10>; col-offset = <10>;
}; };

27
config/boards/arm/adv360/adv360_right_defconfig

@ -1,14 +1,11 @@
# #
# Copyright (c) 2021 Polarity Works # Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# #
CONFIG_SOC_SERIES_NRF52X=y CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_ADV360_RIGHT=y CONFIG_BOARD_ADV360_RIGHT=y
CONFIG_ZMK_BLE=y
CONFIG_ZMK_SPLIT=y
# Enable MPU # Enable MPU
CONFIG_ARM_MPU=y CONFIG_ARM_MPU=y
@ -16,9 +13,8 @@ CONFIG_ARM_MPU=y
# enable GPIO # enable GPIO
CONFIG_GPIO=y CONFIG_GPIO=y
# Enable SPI for LEDS
CONFIG_PINCTRL=y
# Enable SPI
CONFIG_SPI=y CONFIG_SPI=y
CONFIG_SPI_NRFX=y CONFIG_SPI_NRFX=y
@ -33,27 +29,28 @@ CONFIG_FLASH_MAP=y
# Enable 32kHz crystal # Enable 32kHz crystal
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
#RGB leds config
CONFIG_WS2812_STRIP=y
CONFIG_ZMK_RGB_UNDERGLOW=y CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=4 CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=4
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# Use the STRIP config specific to the LEDs you're using #Backlighting configuration
CONFIG_WS2812_STRIP=y
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_PWM=y CONFIG_PWM=y
CONFIG_LED_PWM=y CONFIG_LED_PWM=y
CONFIG_ZMK_BACKLIGHT=y CONFIG_ZMK_BACKLIGHT=y
CONFIG_ZMK_BACKLIGHT_BRT_START=20
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y #Misc configuration
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
CONFIG_USB_DEVICE_VID=0x29EA CONFIG_USB_DEVICE_VID=0x29EA
CONFIG_USB_DEVICE_PID=0x0362 CONFIG_USB_DEVICE_PID=0x0362
CONFIG_USB_DEVICE_MANUFACTURER="Kinesis Corporation" CONFIG_USB_DEVICE_MANUFACTURER="Kinesis Corporation"
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
CONFIG_BUILD_OUTPUT_UF2=y CONFIG_BUILD_OUTPUT_UF2=y

2
config/boards/arm/adv360/board.cmake

@ -1,5 +1,5 @@
# #
# Copyright (c) 2021 Polarity Works # Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# #

36
config/boards/arm/adv360/macros.dtsi

@ -0,0 +1,36 @@
macro_quotes: macro_quotes {
compatible = "zmk,behavior-macro";
label = "macro_quotes";
#binding-cells = <0>;
bindings = <&kp SQT>, <&kp SQT>, <&kp LEFT>;
};
macro_dquotes: macro_dquotes {
compatible = "zmk,behavior-macro";
label = "macro_dquotes";
#binding-cells = <0>;
bindings = <&kp DQT>, <&kp DQT>, <&kp LEFT>;
};
macro_braces: macro_braces {
compatible = "zmk,behavior-macro";
label = "macro_braces";
#binding-cells = <0>;
bindings = <&kp LBRC>, <&kp RBRC>, <&kp LEFT>;
};
macro_parens: macro_parens {
compatible = "zmk,behavior-macro";
label = "macro_parens";
#binding-cells = <0>;
bindings = <&kp LPAR>, <&kp RPAR>, <&kp LEFT>;
};
macro_brackets: macro_brackets {
compatible = "zmk,behavior-macro";
label = "macro_brackets";
#binding-cells = <0>;
bindings = <&kp LBKT>, <&kp RBKT>, <&kp LEFT>;
};
macro_kinesis: macro_kinesis {
compatible = "zmk,behavior-macro";
label = "macro_kinesis";
#binding-cells = <0>;
bindings = <&kp K>, <&kp I>, <&kp N>, <&kp E>, <&kp S>, <&kp I>, <&kp S>;
};

6
config/keymap.json

@ -30,9 +30,9 @@
], [ ], [
"&none ", "&bt BT_SEL 0 ", "&bt BT_SEL 1 ", "&bt BT_SEL 2 ", "&bt BT_SEL 3 ", "&bt BT_SEL 4 ", "&none ", "&trans ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none", "&none ", "&bt BT_SEL 0 ", "&bt BT_SEL 1 ", "&bt BT_SEL 2 ", "&bt BT_SEL 3 ", "&bt BT_SEL 4 ", "&none ", "&trans ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none",
"&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&bootloader ", "&bootloader ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&bootloader ", "&bootloader ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none",
"&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&rgb_ug RGB_MEFS_CMD 5 ", "&none", "&bt BT_CLR ", "&bt BT_CLR ", "&bt BT_CLR ", "&rgb_ug RGB_MEFS_CMD 5 ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none", "&none ", "&bt BT_CLR ", "&none ", "&rgb_ug RGB_MEFS_CMD 5 ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none",
"&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none ", "&none",
"&none ", "&none ", "&none ", "&bl BL_INC ", "&bl BL_DEC ", "&none ", "&bl BL_TOG ", "&none ", "&none ", "&bl BL_TOG ", "&rgb_ug RGB_TOG ", "&bl BL_INC ", "&bl BL_DEC ", "&none ", "&none ", "&none" "&none ", "&none ", "&none ", "&none ", "&none ", "&none", "&none", "&none ", "&none ", "&bl BL_TOG ", "&rgb_ug RGB_TOG ", "&bl BL_INC ", "&bl BL_DEC ", "&none ", "&none ", "&none"
] ]
] ]
} }

2
config/west.yml

@ -7,7 +7,7 @@ manifest:
projects: projects:
- name: zmk - name: zmk
remote: refil remote: refil
revision: adv360-z3 revision: adv360-z3.2
import: app/west.yml import: app/west.yml
self: self:
path: config path: config

BIN
settings-reset.uf2

Binary file not shown.
Loading…
Cancel
Save