-
-
Save mcrosson/47851965d862c60bcc2c2f5a3959e4f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@6ea1c0f41c65:/workspaces/zmk/app# west build -p --board nice_nano -- -DSHIELD=tidbit_19key -- west build: making build dir /workspaces/zmk/app/build pristine | |
| -- west build: generating a build system | |
| -- Using keymap file: /workspaces/zmk/app/boards/shields/tidbit/tidbit_19key.keymap | |
| Including boilerplate (Zephyr base): /workspaces/zmk/zephyr/cmake/app/boilerplate.cmake | |
| -- Application: /workspaces/zmk/app | |
| -- Zephyr version: 2.3.0 (/workspaces/zmk/zephyr) | |
| -- Found Python3: /usr/bin/python3.7 (found suitable exact version "3.7.3") found components: Interpreter | |
| -- git describe failed: fatal: No tags can describe 'e5610344b9b22a4e547563067fa6772a2666b540'. | |
| Try --always, or create some tags.; | |
| BUILD_VERSION is left undefined | |
| -- Board: nice_nano | |
| -- Found toolchain: zephyr (/opt/toolchains/zephyr-toolchain-arm-0.11.2) | |
| -- Found west: /usr/local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1") | |
| -- Found dtc: /opt/toolchains/zephyr-toolchain-arm-0.11.2/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6") | |
| -- Found BOARD.dts: /workspaces/zmk/app/boards/arm/nice_nano/nice_nano.dts | |
| -- Found devicetree overlay: /workspaces/zmk/app/boards/shields/tidbit/tidbit_19key.overlay | |
| -- Found devicetree overlay: /workspaces/zmk/app/boards/shields/tidbit/boards/nice_nano.overlay | |
| -- Found devicetree overlay: /workspaces/zmk/app/boards/shields/tidbit/tidbit_19key.keymap | |
| devicetree error: <Node /soc/gpio@50000000 in 'nice_nano.dts.pre.tmp'> lacks #binding-cells | |
| CMake Error at /workspaces/zmk/zephyr/cmake/dts.cmake:229 (message): | |
| gen_defines.py failed with return code: 1 | |
| Call Stack (most recent call first): | |
| /workspaces/zmk/zephyr/cmake/app/boilerplate.cmake:510 (include) | |
| /workspaces/zmk/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include) | |
| /workspaces/zmk/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate) | |
| CMakeLists.txt:18 (find_package) | |
| -- Configuring incomplete, errors occurred! | |
| FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -B/workspaces/zmk/app/build -S/workspaces/zmk/app -GNinja -DBOARD=nice_nano -DSHIELD=tidbit_19key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /dts-v1/; | |
| / { | |
| #address-cells = <1>; | |
| #size-cells = <1>; | |
| chosen { }; | |
| aliases { }; | |
| }; | |
| / { | |
| soc { | |
| #address-cells = <1>; | |
| #size-cells = <1>; | |
| compatible = "simple-bus"; | |
| interrupt-parent = <&nvic>; | |
| ranges; | |
| nvic: interrupt-controller@e000e100 { | |
| compatible = "arm,v7m-nvic"; | |
| reg = <0xe000e100 0xc00>; | |
| interrupt-controller; | |
| #interrupt-cells = <2>; | |
| }; | |
| systick: timer@e000e010 { | |
| compatible = "arm,armv7m-systick"; | |
| reg = <0xe000e010 0x10>; | |
| status = "disabled"; | |
| }; | |
| }; | |
| }; | |
| / { | |
| sw_pwm: sw-pwm { | |
| compatible = "nordic,nrf-sw-pwm"; | |
| status = "disabled"; | |
| label = "SW_PWM"; | |
| }; | |
| }; | |
| / { | |
| chosen { | |
| zephyr,entropy = &rng; | |
| zephyr,flash-controller = &flash_controller; | |
| }; | |
| cpus { | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| cpu@0 { | |
| device_type = "cpu"; | |
| compatible = "arm,cortex-m4f"; | |
| reg = <0>; | |
| }; | |
| }; | |
| aliases { | |
| i2c-0 = &i2c0; | |
| i2c-1 = &i2c1; | |
| spi-0 = &spi0; | |
| spi-1 = &spi1; | |
| spi-2 = &spi2; | |
| spi-3 = &spi3; | |
| qspi-0 = &qspi; | |
| uart-0 = &uart0; | |
| uart-1 = &uart1; | |
| adc-0 = &adc; | |
| gpio-0 = &gpio0; | |
| gpio-1 = &gpio1; | |
| gpiote-0 = &gpiote; | |
| wdt-0 = &wdt; | |
| usbd-0 = &usbd; | |
| cc310 = &cryptocell; | |
| arm-cryptocell-310 = &cryptocell310; | |
| pwm-0 = &pwm0; | |
| pwm-1 = &pwm1; | |
| pwm-2 = &pwm2; | |
| pwm-3 = &pwm3; | |
| qdec-0 = &qdec; | |
| rtc-0 = &rtc0; | |
| rtc-1 = &rtc1; | |
| rtc-2 = &rtc2; | |
| timer-0 = &timer0; | |
| timer-1 = &timer1; | |
| timer-2 = &timer2; | |
| timer-3 = &timer3; | |
| timer-4 = &timer4; | |
| }; | |
| soc { | |
| flash_controller: flash-controller@4001e000 { | |
| compatible = "nordic,nrf52-flash-controller"; | |
| reg = <0x4001e000 0x1000>; | |
| #address-cells = <1>; | |
| #size-cells = <1>; | |
| label="NRF_FLASH_DRV_NAME"; | |
| flash0: flash@0 { | |
| compatible = "soc-nv-flash"; | |
| label = "NRF_FLASH"; | |
| erase-block-size = <4096>; | |
| write-block-size = <4>; | |
| }; | |
| }; | |
| sram0: memory@20000000 { | |
| compatible = "mmio-sram"; | |
| }; | |
| adc: adc@40007000 { | |
| compatible = "nordic,nrf-saadc"; | |
| reg = <0x40007000 0x1000>; | |
| interrupts = <7 1>; | |
| status = "disabled"; | |
| label = "ADC_0"; | |
| #io-channel-cells = <1>; | |
| }; | |
| clock: clock@40000000 { | |
| compatible = "nordic,nrf-clock"; | |
| reg = <0x40000000 0x1000>; | |
| interrupts = <0 1>; | |
| status = "okay"; | |
| label = "CLOCK"; | |
| }; | |
| uart0: uart@40002000 { | |
| reg = <0x40002000 0x1000>; | |
| interrupts = <2 1>; | |
| status = "disabled"; | |
| label = "UART_0"; | |
| }; | |
| uart1: uart@40028000 { | |
| compatible = "nordic,nrf-uarte"; | |
| reg = <0x40028000 0x1000>; | |
| interrupts = <40 1>; | |
| status = "disabled"; | |
| label = "UART_1"; | |
| }; | |
| gpiote: gpiote@40006000 { | |
| compatible = "nordic,nrf-gpiote"; | |
| reg = <0x40006000 0x1000>; | |
| interrupts = <6 5>; | |
| status = "disabled"; | |
| label = "GPIOTE_0"; | |
| }; | |
| gpio0: gpio@50000000 { | |
| compatible = "nordic,nrf-gpio"; | |
| gpio-controller; | |
| reg = <0x50000000 0x200 | |
| 0x50000500 0x300>; | |
| #gpio-cells = <2>; | |
| label = "GPIO_0"; | |
| status = "disabled"; | |
| }; | |
| gpio1: gpio@50000300 { | |
| compatible = "nordic,nrf-gpio"; | |
| gpio-controller; | |
| reg = <0x50000300 0x200 | |
| 0x50000800 0x300>; | |
| #gpio-cells = <2>; | |
| ngpios = <16>; | |
| label = "GPIO_1"; | |
| status = "disabled"; | |
| }; | |
| i2c0: i2c@40003000 { | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| reg = <0x40003000 0x1000>; | |
| clock-frequency = <100000>; | |
| interrupts = <3 1>; | |
| status = "disabled"; | |
| label = "I2C_0"; | |
| }; | |
| i2c1: i2c@40004000 { | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| reg = <0x40004000 0x1000>; | |
| clock-frequency = <100000>; | |
| interrupts = <4 1>; | |
| status = "disabled"; | |
| label = "I2C_1"; | |
| }; | |
| pwm0: pwm@4001c000 { | |
| compatible = "nordic,nrf-pwm"; | |
| reg = <0x4001c000 0x1000>; | |
| interrupts = <28 1>; | |
| status = "disabled"; | |
| label = "PWM_0"; | |
| #pwm-cells = <1>; | |
| }; | |
| pwm1: pwm@40021000 { | |
| compatible = "nordic,nrf-pwm"; | |
| reg = <0x40021000 0x1000>; | |
| interrupts = <33 1>; | |
| status = "disabled"; | |
| label = "PWM_1"; | |
| #pwm-cells = <1>; | |
| }; | |
| pwm2: pwm@40022000 { | |
| compatible = "nordic,nrf-pwm"; | |
| reg = <0x40022000 0x1000>; | |
| interrupts = <34 1>; | |
| status = "disabled"; | |
| label = "PWM_2"; | |
| #pwm-cells = <1>; | |
| }; | |
| pwm3: pwm@4002d000 { | |
| compatible = "nordic,nrf-pwm"; | |
| reg = <0x4002d000 0x1000>; | |
| interrupts = <45 1>; | |
| status = "disabled"; | |
| label = "PWM_3"; | |
| #pwm-cells = <1>; | |
| }; | |
| qdec: qdec@40012000 { | |
| compatible = "nordic,nrf-qdec"; | |
| reg = <0x40012000 0x1000>; | |
| interrupts = <18 1>; | |
| status = "disabled"; | |
| label = "QDEC"; | |
| }; | |
| rng: random@4000d000 { | |
| compatible = "nordic,nrf-rng"; | |
| reg = <0x4000d000 0x1000>; | |
| interrupts = <13 1>; | |
| status = "okay"; | |
| label = "RNG"; | |
| }; | |
| spi0: spi@40003000 { | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| reg = <0x40003000 0x1000>; | |
| interrupts = <3 1>; | |
| status = "disabled"; | |
| label = "SPI_0"; | |
| }; | |
| spi1: spi@40004000 { | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| reg = <0x40004000 0x1000>; | |
| interrupts = <4 1>; | |
| status = "disabled"; | |
| label = "SPI_1"; | |
| }; | |
| spi2: spi@40023000 { | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| reg = <0x40023000 0x1000>; | |
| interrupts = <35 1>; | |
| status = "disabled"; | |
| label = "SPI_2"; | |
| }; | |
| spi3: spi@4002f000 { | |
| compatible = "nordic,nrf-spim"; | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| reg = <0x4002f000 0x1000>; | |
| interrupts = <47 1>; | |
| status = "disabled"; | |
| label = "SPI_3"; | |
| }; | |
| qspi: qspi@40029000 { | |
| compatible = "nordic,nrf-qspi"; | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| reg = <0x40029000 0x1000>; | |
| interrupts = <41 1>; | |
| status = "disabled"; | |
| label = "QSPI"; | |
| }; | |
| rtc0: rtc@4000b000 { | |
| compatible = "nordic,nrf-rtc"; | |
| reg = <0x4000b000 0x1000>; | |
| interrupts = <11 1>; | |
| status = "okay"; | |
| clock-frequency = <32768>; | |
| prescaler = <1>; | |
| label = "RTC_0"; | |
| }; | |
| rtc1: rtc@40011000 { | |
| compatible = "nordic,nrf-rtc"; | |
| reg = <0x40011000 0x1000>; | |
| interrupts = <17 1>; | |
| status = "okay"; | |
| clock-frequency = <32768>; | |
| prescaler = <1>; | |
| label = "RTC_1"; | |
| }; | |
| rtc2: rtc@40024000 { | |
| compatible = "nordic,nrf-rtc"; | |
| reg = <0x40024000 0x1000>; | |
| interrupts = <36 1>; | |
| status = "okay"; | |
| clock-frequency = <32768>; | |
| prescaler = <1>; | |
| label = "RTC_2"; | |
| }; | |
| timer0: timer@40008000 { | |
| compatible = "nordic,nrf-timer"; | |
| status = "okay"; | |
| reg = <0x40008000 0x1000>; | |
| interrupts = <8 1>; | |
| prescaler = <0>; | |
| label = "TIMER_0"; | |
| }; | |
| timer1: timer@40009000 { | |
| compatible = "nordic,nrf-timer"; | |
| status = "okay"; | |
| reg = <0x40009000 0x1000>; | |
| interrupts = <9 1>; | |
| prescaler = <0>; | |
| label = "TIMER_1"; | |
| }; | |
| timer2: timer@4000a000 { | |
| compatible = "nordic,nrf-timer"; | |
| status = "okay"; | |
| reg = <0x4000a000 0x1000>; | |
| interrupts = <10 1>; | |
| prescaler = <0>; | |
| label = "TIMER_2"; | |
| }; | |
| timer3: timer@4001a000 { | |
| compatible = "nordic,nrf-timer"; | |
| status = "okay"; | |
| reg = <0x4001a000 0x1000>; | |
| interrupts = <26 1>; | |
| prescaler = <0>; | |
| label = "TIMER_3"; | |
| }; | |
| timer4: timer@4001b000 { | |
| compatible = "nordic,nrf-timer"; | |
| status = "okay"; | |
| reg = <0x4001b000 0x1000>; | |
| interrupts = <27 1>; | |
| prescaler = <0>; | |
| label = "TIMER_4"; | |
| }; | |
| temp: temp@4000c000 { | |
| compatible = "nordic,nrf-temp"; | |
| reg = <0x4000c000 0x1000>; | |
| interrupts = <12 1>; | |
| status = "okay"; | |
| label = "TEMP_0"; | |
| }; | |
| usbd: usbd@40027000 { | |
| compatible = "nordic,nrf-usbd"; | |
| reg = <0x40027000 0x1000>; | |
| interrupts = <39 1>; | |
| num-bidir-endpoints = <1>; | |
| num-in-endpoints = <7>; | |
| num-out-endpoints = <7>; | |
| num-isoin-endpoints = <1>; | |
| num-isoout-endpoints = <1>; | |
| status = "disabled"; | |
| label = "USBD"; | |
| }; | |
| wdt: wdt0: watchdog@40010000 { | |
| compatible = "nordic,nrf-watchdog"; | |
| reg = <0x40010000 0x1000>; | |
| interrupts = <16 1>; | |
| status = "okay"; | |
| label = "WDT"; | |
| }; | |
| cryptocell: crypto@5002a000 { | |
| compatible = "nordic,nrf-cc310"; | |
| reg = <0x5002A000 0x1000>; | |
| label = "CRYPTOCELL"; | |
| status = "okay"; | |
| #address-cells = <1>; | |
| #size-cells = <1>; | |
| cryptocell310: crypto@5002b000 { | |
| compatible = "arm,cryptocell-310"; | |
| reg = <0x5002B000 0x1000>; | |
| interrupts = <42 1>; | |
| label = "CRYPTOCELL310"; | |
| }; | |
| }; | |
| }; | |
| }; | |
| &nvic { | |
| arm,num-irq-priority-bits = <3>; | |
| }; | |
| &sw_pwm { | |
| timer-instance = <2>; | |
| channel-count = <3>; | |
| clock-prescaler = <0>; | |
| ppi-base = <14>; | |
| gpiote-base = <0>; | |
| #pwm-cells = <1>; | |
| }; | |
| &flash0 { | |
| reg = <0x00000000 ((1024) * 1024)>; | |
| }; | |
| &sram0 { | |
| reg = <0x20000000 ((256) * 1024)>; | |
| }; | |
| / { | |
| soc { | |
| compatible = "nordic,nRF52840-QIAA", "nordic,nRF52840", "nordic,nRF52", "simple-bus"; | |
| }; | |
| }; | |
| / { | |
| 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> | |
| , <1 0 &gpio0 6 0> | |
| , <2 0 &gpio0 17 0> | |
| , <3 0 &gpio0 20 0> | |
| , <4 0 &gpio0 22 0> | |
| , <5 0 &gpio0 24 0> | |
| , <6 0 &gpio1 0 0> | |
| , <7 0 &gpio0 11 0> | |
| , <8 0 &gpio1 4 0> | |
| , <9 0 &gpio1 6 0> | |
| , <10 0 &gpio0 9 0> | |
| , <16 0 &gpio0 10 0> | |
| , <14 0 &gpio1 11 0> | |
| , <15 0 &gpio1 13 0> | |
| ; | |
| }; | |
| 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 &gpio1 15 0> | |
| , <1 0 &gpio0 2 0> | |
| , <2 0 &gpio0 29 0> | |
| , <3 0 &gpio0 31 0> | |
| , <6 0 &gpio0 22 0> | |
| , <7 0 &gpio1 0 0> | |
| , <8 0 &gpio1 4 0> | |
| , <9 0 &gpio1 6 0> | |
| , <10 0 &gpio0 9 0> | |
| ; | |
| }; | |
| }; | |
| pro_micro_i2c: &i2c0 {}; | |
| pro_micro_spi: &spi0 {}; | |
| pro_micro_serial: &uart0 {}; | |
| / { | |
| model = "nice!nano"; | |
| compatible = "nice,nano"; | |
| chosen { | |
| zephyr,code-partition = &code_partition; | |
| zephyr,sram = &sram0; | |
| zephyr,flash = &flash0; | |
| }; | |
| leds { | |
| compatible = "gpio-leds"; | |
| blue_led: led_0 { | |
| gpios = <&gpio0 15 (0 << 0)>; | |
| label = "Blue LED"; | |
| }; | |
| }; | |
| ext-power { | |
| compatible = "zmk,ext-power-generic"; | |
| label = "EXT_POWER"; | |
| control-gpios = <&gpio0 13 (1 << 0)>; | |
| }; | |
| vbatt { | |
| compatible = "zmk,battery-voltage-divider"; | |
| label = "BATTERY"; | |
| io-channels = <&adc 2>; | |
| output-ohms = <2000000>; | |
| full-ohms = <(2000000 + 806000)>; | |
| }; | |
| }; | |
| &adc { | |
| status = "okay"; | |
| }; | |
| &gpiote { | |
| status = "okay"; | |
| }; | |
| &gpio0 { | |
| status = "okay"; | |
| }; | |
| &gpio1 { | |
| status = "okay"; | |
| }; | |
| &i2c0 { | |
| compatible = "nordic,nrf-twi"; | |
| sda-pin = <17>; | |
| scl-pin = <20>; | |
| }; | |
| &uart0 { | |
| compatible = "nordic,nrf-uarte"; | |
| status = "okay"; | |
| current-speed = <115200>; | |
| tx-pin = <19>; | |
| rx-pin = <21>; | |
| rts-pin = <23>; | |
| cts-pin = <25>; | |
| }; | |
| &usbd { | |
| status = "okay"; | |
| }; | |
| &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>; | |
| }; | |
| storage_partition: partition@ec000 { | |
| label = "storage"; | |
| reg = <0x000ec000 0x00008000>; | |
| }; | |
| boot_partition: partition@f4000 { | |
| label = "adafruit_boot"; | |
| reg = <0x000f4000 0x0000c000>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| kscan0: kscan { | |
| compatible = "zmk,kscan-gpio-matrix"; | |
| label = "KSCAN"; | |
| diode-direction = "row2col"; | |
| row-gpios | |
| = <&pro_micro_d 15 ((0 << 0) | (1 << 5))> | |
| , <&pro_micro_d 7 ((0 << 0) | (1 << 5))> | |
| , <&pro_micro_d 6 ((0 << 0) | (1 << 5))> | |
| , <&pro_micro_d 5 ((0 << 0) | (1 << 5))> | |
| , <&pro_micro_d 4 ((0 << 0) | (1 << 5))> | |
| ; | |
| col-gpios | |
| = <&pro_micro_a 3 ((0 << 0) | (1 << 5))> | |
| , <&pro_micro_a 2 ((0 << 0) | (1 << 5))> | |
| , <&pro_micro_a 1 ((0 << 0) | (1 << 5))> | |
| , <&pro_micro_a 0 ((0 << 0) | (1 << 5))> | |
| ; | |
| }; | |
| default_transform: keymap_transform_0 { | |
| compatible = "zmk,matrix-transform"; | |
| columns = <4>; | |
| rows = <5>; | |
| map = < | |
| (((0) << 8) + (1)) (((0) << 8) + (2)) (((0) << 8) + (3)) | |
| (((1) << 8) + (0)) (((1) << 8) + (1)) (((1) << 8) + (2)) (((1) << 8) + (3)) | |
| (((2) << 8) + (0)) (((2) << 8) + (1)) (((2) << 8) + (2)) (((2) << 8) + (3)) | |
| (((3) << 8) + (0)) (((3) << 8) + (1)) (((3) << 8) + (2)) (((3) << 8) + (3)) | |
| (((4) << 8) + (0)) (((4) << 8) + (1)) (((4) << 8) + (2)) (((4) << 8) + (3)) | |
| >; | |
| }; | |
| encoder_1_top_row: encoder_1_top_row { | |
| compatible = "alps,ec11"; | |
| label = "Top Row Encoder"; | |
| a-gpios = <&pro_micro_d 16 ((1 << 0) | (1 << 4))>; | |
| b-gpios = <&pro_micro_d 14 ((1 << 0) | (1 << 4))>; | |
| resolution = <4>; | |
| status = "disabled"; | |
| }; | |
| encoder_1: encoder_1 { | |
| compatible = "alps,ec11"; | |
| label = "Encoder 1"; | |
| a-gpios = <&pro_micro_d 14 ((1 << 0) | (1 << 4))>; | |
| b-gpios = <&pro_micro_d 16 ((1 << 0) | (1 << 4))>; | |
| resolution = <4>; | |
| status = "disabled"; | |
| }; | |
| encoder_2: encoder_2 { | |
| compatible = "alps,ec11"; | |
| label = "Encoder 2"; | |
| a-gpios = <&pro_micro_d 8 ((1 << 0) | (1 << 4))>; | |
| b-gpios = <&pro_micro_d 9 ((1 << 0) | (1 << 4))>; | |
| resolution = <4>; | |
| status = "disabled"; | |
| }; | |
| encoder_3: encoder_3 { | |
| compatible = "alps,ec11"; | |
| label = "Encoder 3"; | |
| a-gpios = <&pro_micro_d 3 ((1 << 0) | (1 << 4))>; | |
| b-gpios = <&pro_micro_d 2 ((1 << 0) | (1 << 4))>; | |
| resolution = <4>; | |
| status = "disabled"; | |
| }; | |
| encoder_4: encoder_4 { | |
| compatible = "alps,ec11"; | |
| label = "Encoder 4"; | |
| a-gpios = <&pro_micro_d 1 ((1 << 0) | (1 << 4))>; | |
| b-gpios = <&pro_micro_d 0 ((1 << 0) | (1 << 4))>; | |
| resolution = <4>; | |
| status = "disabled"; | |
| }; | |
| chosen { | |
| zmk,kscan = &kscan0; | |
| zmk,matrix_transform = &default_transform; | |
| }; | |
| }; | |
| &pro_micro_i2c { | |
| status = "disabled"; | |
| oled: ssd1306@3c { | |
| compatible = "solomon,ssd1306fb"; | |
| reg = <0x3c>; | |
| label = "DISPLAY"; | |
| width = <128>; | |
| height = <32>; | |
| segment-offset = <0>; | |
| page-offset = <0>; | |
| display-offset = <0>; | |
| multiplex-ratio = <31>; | |
| segment-remap; | |
| com-invdir; | |
| com-sequential; | |
| prechargep = <0x22>; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| cp: kp: behavior_key_press { | |
| compatible = "zmk,behavior-key-press"; | |
| label = "KEY_PRESS"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| trans: behavior_transparent { | |
| compatible = "zmk,behavior-transparent"; | |
| label = "TRANS"; | |
| #binding-cells = <0>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| none: behavior_none { | |
| compatible = "zmk,behavior-none"; | |
| label = "NONE"; | |
| #binding-cells = <0>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| mt: behavior_mod_tap { | |
| compatible = "zmk,behavior-hold-tap"; | |
| label = "MOD_TAP"; | |
| #binding-cells = <2>; | |
| flavor = "hold-preferred"; | |
| tapping_term_ms = <200>; | |
| bindings = <&kp>, <&kp>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| lt: behavior_layer_tap { | |
| compatible = "zmk,behavior-hold-tap"; | |
| label = "LAYER_TAP"; | |
| #binding-cells = <2>; | |
| flavor = "tap-preferred"; | |
| tapping_term_ms = <200>; | |
| bindings = <&mo>, <&kp>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| sk: behavior_sticky_key { | |
| compatible = "zmk,behavior-sticky-key"; | |
| label = "STICKY_KEY"; | |
| #binding-cells = <1>; | |
| release-after-ms = <1000>; | |
| bindings = <&kp>; | |
| }; | |
| sl: behavior_sticky_layer { | |
| compatible = "zmk,behavior-sticky-key"; | |
| label = "STICKY_LAYER"; | |
| #binding-cells = <1>; | |
| release-after-ms = <1000>; | |
| bindings = <&mo>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| mo: behavior_momentary_layer { | |
| compatible = "zmk,behavior-momentary-layer"; | |
| label = "MO"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| tog: behavior_toggle_layer { | |
| compatible = "zmk,behavior-toggle-layer"; | |
| label = "TOGGLE_LAYER"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| reset: behavior_reset { | |
| compatible = "zmk,behavior-reset"; | |
| label = "RESET"; | |
| #binding-cells = <0>; | |
| }; | |
| bootloader: behavior_reset_dfu { | |
| compatible = "zmk,behavior-reset"; | |
| label = "BOOTLOADER_RESET"; | |
| type = <0x57>; | |
| #binding-cells = <0>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| inc_dec_cp: inc_dec_kp: behavior_sensor_rotate_key_press { | |
| compatible = "zmk,behavior-sensor-rotate-key-press"; | |
| label = "ENC_KEY_PRESS"; | |
| #sensor-binding-cells = <2>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| rgb_ug: behavior_rgb_underglow { | |
| compatible = "zmk,behavior-rgb-underglow"; | |
| label = "RGB_UNDERGLOW"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| bt: behavior_bluetooth { | |
| compatible = "zmk,behavior-bluetooth"; | |
| label = "BLUETOOTH"; | |
| #binding-cells = <2>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| ext_power: behavior_ext_power { | |
| compatible = "zmk,behavior-ext-power"; | |
| label = "EXT_POWER_BEHAVIOR"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| out: behavior_outputs { | |
| compatible = "zmk,behavior-outputs"; | |
| label = "OUTPUTS"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| &encoder_4 { | |
| status = "okay"; | |
| }; | |
| &pro_micro_i2c { | |
| status = "okay"; | |
| }; | |
| / { | |
| sensors { | |
| compatible = "zmk,keymap-sensors"; | |
| sensors = <&encoder_4>; | |
| }; | |
| keymap { | |
| compatible = "zmk,keymap"; | |
| default_layer { | |
| bindings = < | |
| &tog 1 &kp ((((0x07) << 16) | (0x53))) &kp (((((0x07) << 16) | (0x54)))) | |
| &kp ((((0x07) << 16) | (0x5F))) &kp ((((0x07) << 16) | (0x60))) &kp ((((0x07) << 16) | (0x61))) &kp (((((0x07) << 16) | (0x55)))) | |
| &kp ((((0x07) << 16) | (0x5C))) &kp ((((0x07) << 16) | (0x5D))) &kp ((((0x07) << 16) | (0x5E))) &kp ((((0x07) << 16) | (0x56))) | |
| &kp ((((0x07) << 16) | (0x59))) &kp ((((0x07) << 16) | (0x5A))) &kp ((((0x07) << 16) | (0x5B))) &kp ((((0x07) << 16) | (0x57))) | |
| &kp ((((0x0C) << 16) | (0xE2))) &kp ((((0x07) << 16) | (0x62))) &kp ((((0x07) << 16) | (0x63))) &kp ((((0x07) << 16) | (0x58))) | |
| >; | |
| sensor-bindings = <&inc_dec_kp ((((0x0C) << 16) | (0xE9))) ((((0x0C) << 16) | (0xEA)))>; | |
| }; | |
| func_layer { | |
| bindings = < | |
| &tog 0 &reset &bootloader | |
| &out 0 &out 1 &out 2 &none | |
| &bt 3 &bt 2 0 &bt 1 0 &bt 0 0 | |
| &rgb_ug 0 &rgb_ug 1 &rgb_ug 3 &rgb_ug 5 | |
| &kp ((((0x0C) << 16) | (0xE2))) &rgb_ug 9 &rgb_ug 7 &none | |
| >; | |
| sensor-bindings = <&inc_dec_kp ((((0x0C) << 16) | (0xE9))) ((((0x0C) << 16) | (0xEA)))>; | |
| }; | |
| }; | |
| }; | |
| &spi1 { | |
| compatible = "nordic,nrf-spim"; | |
| status = "okay"; | |
| mosi-pin = <9>; | |
| sck-pin = <5>; | |
| miso-pin = <7>; | |
| led_strip: ws2812@0 { | |
| compatible = "worldsemi,ws2812-spi"; | |
| label = "WS2812"; | |
| reg = <0>; | |
| spi-max-frequency = <4000000>; | |
| chain-length = <8>; | |
| spi-one-frame = <0x70>; | |
| spi-zero-frame = <0x40>; | |
| }; | |
| }; | |
| / { | |
| chosen { | |
| zmk,underglow = &led_strip; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| cp: kp: behavior_key_press { | |
| compatible = "zmk,behavior-key-press"; | |
| label = "KEY_PRESS"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| trans: behavior_transparent { | |
| compatible = "zmk,behavior-transparent"; | |
| label = "TRANS"; | |
| #binding-cells = <0>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| none: behavior_none { | |
| compatible = "zmk,behavior-none"; | |
| label = "NONE"; | |
| #binding-cells = <0>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| mt: behavior_mod_tap { | |
| compatible = "zmk,behavior-hold-tap"; | |
| label = "MOD_TAP"; | |
| #binding-cells = <2>; | |
| flavor = "hold-preferred"; | |
| tapping_term_ms = <200>; | |
| bindings = <&kp>, <&kp>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| lt: behavior_layer_tap { | |
| compatible = "zmk,behavior-hold-tap"; | |
| label = "LAYER_TAP"; | |
| #binding-cells = <2>; | |
| flavor = "tap-preferred"; | |
| tapping_term_ms = <200>; | |
| bindings = <&mo>, <&kp>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| sk: behavior_sticky_key { | |
| compatible = "zmk,behavior-sticky-key"; | |
| label = "STICKY_KEY"; | |
| #binding-cells = <1>; | |
| release-after-ms = <1000>; | |
| bindings = <&kp>; | |
| }; | |
| sl: behavior_sticky_layer { | |
| compatible = "zmk,behavior-sticky-key"; | |
| label = "STICKY_LAYER"; | |
| #binding-cells = <1>; | |
| release-after-ms = <1000>; | |
| bindings = <&mo>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| mo: behavior_momentary_layer { | |
| compatible = "zmk,behavior-momentary-layer"; | |
| label = "MO"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| tog: behavior_toggle_layer { | |
| compatible = "zmk,behavior-toggle-layer"; | |
| label = "TOGGLE_LAYER"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| reset: behavior_reset { | |
| compatible = "zmk,behavior-reset"; | |
| label = "RESET"; | |
| #binding-cells = <0>; | |
| }; | |
| bootloader: behavior_reset_dfu { | |
| compatible = "zmk,behavior-reset"; | |
| label = "BOOTLOADER_RESET"; | |
| type = <0x57>; | |
| #binding-cells = <0>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| inc_dec_cp: inc_dec_kp: behavior_sensor_rotate_key_press { | |
| compatible = "zmk,behavior-sensor-rotate-key-press"; | |
| label = "ENC_KEY_PRESS"; | |
| #sensor-binding-cells = <2>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| rgb_ug: behavior_rgb_underglow { | |
| compatible = "zmk,behavior-rgb-underglow"; | |
| label = "RGB_UNDERGLOW"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| bt: behavior_bluetooth { | |
| compatible = "zmk,behavior-bluetooth"; | |
| label = "BLUETOOTH"; | |
| #binding-cells = <2>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| ext_power: behavior_ext_power { | |
| compatible = "zmk,behavior-ext-power"; | |
| label = "EXT_POWER_BEHAVIOR"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| / { | |
| behaviors { | |
| out: behavior_outputs { | |
| compatible = "zmk,behavior-outputs"; | |
| label = "OUTPUTS"; | |
| #binding-cells = <1>; | |
| }; | |
| }; | |
| }; | |
| &encoder_4 { | |
| status = "okay"; | |
| }; | |
| &pro_micro_i2c { | |
| status = "okay"; | |
| }; | |
| / { | |
| sensors { | |
| compatible = "zmk,keymap-sensors"; | |
| sensors = <&encoder_4>; | |
| }; | |
| keymap { | |
| compatible = "zmk,keymap"; | |
| default_layer { | |
| bindings = < | |
| &tog 1 &kp ((((0x07) << 16) | (0x53))) &kp (((((0x07) << 16) | (0x54)))) | |
| &kp ((((0x07) << 16) | (0x5F))) &kp ((((0x07) << 16) | (0x60))) &kp ((((0x07) << 16) | (0x61))) &kp (((((0x07) << 16) | (0x55)))) | |
| &kp ((((0x07) << 16) | (0x5C))) &kp ((((0x07) << 16) | (0x5D))) &kp ((((0x07) << 16) | (0x5E))) &kp ((((0x07) << 16) | (0x56))) | |
| &kp ((((0x07) << 16) | (0x59))) &kp ((((0x07) << 16) | (0x5A))) &kp ((((0x07) << 16) | (0x5B))) &kp ((((0x07) << 16) | (0x57))) | |
| &kp ((((0x0C) << 16) | (0xE2))) &kp ((((0x07) << 16) | (0x62))) &kp ((((0x07) << 16) | (0x63))) &kp ((((0x07) << 16) | (0x58))) | |
| >; | |
| sensor-bindings = <&inc_dec_kp ((((0x0C) << 16) | (0xE9))) ((((0x0C) << 16) | (0xEA)))>; | |
| }; | |
| func_layer { | |
| bindings = < | |
| &tog 0 &reset &bootloader | |
| &out 0 &out 1 &out 2 &none | |
| &bt 3 &bt 2 0 &bt 1 0 &bt 0 0 | |
| &rgb_ug 0 &rgb_ug 1 &rgb_ug 3 &rgb_ug 5 | |
| &kp ((((0x0C) << 16) | (0xE2))) &rgb_ug 9 &rgb_ug 7 &none | |
| >; | |
| sensor-bindings = <&inc_dec_kp ((((0x0C) << 16) | (0xE9))) ((((0x0C) << 16) | (0xEA)))>; | |
| }; | |
| }; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2020 The ZMK Contributors | |
| * | |
| * SPDX-License-Identifier: MIT | |
| */ | |
| #include <behaviors.dtsi> | |
| #include <dt-bindings/zmk/bt.h> | |
| #include <dt-bindings/zmk/outputs.h> | |
| #include <dt-bindings/zmk/rgb.h> | |
| #include <dt-bindings/zmk/keys.h> | |
| &encoder_4 { | |
| status = "okay"; | |
| }; | |
| &pro_micro_i2c { | |
| status = "okay"; | |
| }; | |
| / { | |
| sensors { | |
| compatible = "zmk,keymap-sensors"; | |
| sensors = <&encoder_4>; | |
| }; | |
| keymap { | |
| compatible = "zmk,keymap"; | |
| default_layer { | |
| bindings = < | |
| &tog 1 &kp KP_NUMLOCK &kp KP_SLASH | |
| &kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_ASTERISK | |
| &kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &kp KP_MINUS | |
| &kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 &kp KP_PLUS | |
| &kp C_MUTE &kp KP_NUMBER_0 &kp KP_DOT &kp KP_ENTER | |
| >; | |
| sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; | |
| }; | |
| func_layer { | |
| bindings = < | |
| &tog 0 &reset &bootloader | |
| &out OUT_TOG &out OUT_USB &out OUT_BLE &none | |
| &bt BT_SEL &bt BT_PRV &bt BT_NXT &bt BT_CLR | |
| &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI | |
| &kp C_MUTE &rgb_ug RGB_EFF &rgb_ug RGB_SPI &none | |
| >; | |
| sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; | |
| }; | |
| }; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment