From 6459c9eb21435fc3a2d0f2bf32ce4b0021138baf Mon Sep 17 00:00:00 2001 From: Kyle McCreery Date: Fri, 2 Sep 2022 18:11:50 -0400 Subject: [PATCH] Working with pillbug v0.2 and OBE shield. --- app/boards/arm/pillbug/Kconfig | 2 +- app/boards/arm/pillbug/blackpill_pins.dtsi | 52 +++++++++---------- app/boards/arm/pillbug/pillbug.dts | 2 +- app/boards/shields/obe/boards/pillbug.overlay | 2 +- app/boards/shields/obe/obe.keymap | 3 +- 5 files changed, 31 insertions(+), 30 deletions(-) diff --git a/app/boards/arm/pillbug/Kconfig b/app/boards/arm/pillbug/Kconfig index 5ac58202..3d53e324 100644 --- a/app/boards/arm/pillbug/Kconfig +++ b/app/boards/arm/pillbug/Kconfig @@ -3,5 +3,5 @@ config BOARD_ENABLE_DCDC bool "Enable DCDC mode" select SOC_DCDC_NRF52X - default n + default y depends on (BOARD_PILLBUG) diff --git a/app/boards/arm/pillbug/blackpill_pins.dtsi b/app/boards/arm/pillbug/blackpill_pins.dtsi index 4a2f2f0c..226ad08f 100644 --- a/app/boards/arm/pillbug/blackpill_pins.dtsi +++ b/app/boards/arm/pillbug/blackpill_pins.dtsi @@ -13,34 +13,34 @@ gpio-map = <2 0 &gpio0 9 0> /* PC13 */ , <3 0 &gpio0 10 0> /* PC14 */ - , <4 0 &gpio1 5 0> /* PC15 */ - , <10 0 &gpio1 7 0> /* PA0 */ - , <11 0 &gpio1 10 0> /* PA1 */ - , <12 0 &gpio1 13 0> /* PA2 */ - , <13 0 &gpio1 15 0> /* PA3 */ - , <14 0 &gpio0 2 0> /* PA4 */ - , <15 0 &gpio0 29 0> /* PA5 */ - , <16 0 &gpio0 31 0> /* PA6 */ - , <17 0 &gpio1 11 0> /* PA7 */ - , <18 0 &gpio1 14 0> /* PB0 */ - , <19 0 &gpio0 30 0> /* PB1 */ - , <20 0 &gpio0 5 0> /* PB2 */ - , <21 0 &gpio1 8 0> /* PB10 */ - , <25 0 &gpio1 9 0> /* PB12 */ - , <26 0 &gpio0 12 0> /* PB13 */ - , <27 0 &gpio0 25 0> /* PB14 */ - , <28 0 &gpio1 1 0> /* PB15 */ - , <29 0 &gpio1 2 0> /* PA8 */ + , <4 0 &gpio1 6 0> /* PC15 */ + , <10 0 &gpio0 25 0> /* PA0 */ + , <11 0 &gpio0 5 0> /* PA1 */ + , <12 0 &gpio1 15 0> /* PA2 */ + , <13 0 &gpio0 2 0> /* PA3 */ + , <14 0 &gpio1 11 0> /* PA4 */ + , <15 0 &gpio1 8 0> /* PA5 */ + , <16 0 &gpio0 26 0> /* PA6 */ + , <17 0 &gpio0 11 0> /* PA7 */ + , <18 0 &gpio1 9 0> /* PB0 */ + , <19 0 &gpio1 14 0> /* PB1 */ + , <20 0 &gpio0 3 0> /* PB2 */ + , <21 0 &gpio0 31 0> /* PB10 */ + , <25 0 &gpio0 12 0> /* PB12 */ + , <26 0 &gpio0 19 0> /* PB13 */ + , <27 0 &gpio1 1 0> /* PB14 */ + , <28 0 &gpio0 29 0> /* PB15 */ + , <29 0 &gpio1 13 0> /* PA8 */ , <30 0 &gpio0 6 0> /* PA9 */ , <31 0 &gpio0 8 0> /* PA10 */ - , <38 0 &gpio0 13 0> /* PA15 */ - , <39 0 &gpio0 15 0> /* PB3 */ - , <40 0 &gpio0 17 0> /* PB4 */ - , <41 0 &gpio0 22 0> /* PB5 */ - , <42 0 &gpio0 24 0> /* PB6 */ - , <43 0 &gpio1 0 0> /* PB7 */ - , <45 0 &gpio1 4 0> /* PB8 */ - , <46 0 &gpio1 6 0> /* PB9 */ + , <38 0 &gpio1 0 0> /* PA15 */ + , <39 0 &gpio1 10 0> /* PB3 */ + , <40 0 &gpio1 2 0> /* PB4 */ + , <41 0 &gpio1 4 0> /* PB5 */ + , <42 0 &gpio0 13 0> /* PB6 */ + , <43 0 &gpio0 15 0> /* PB7 */ + , <45 0 &gpio0 17 0> /* PB8 */ + , <46 0 &gpio0 24 0> /* PB9 */ ; }; }; diff --git a/app/boards/arm/pillbug/pillbug.dts b/app/boards/arm/pillbug/pillbug.dts index ca5734d7..37f3aac7 100644 --- a/app/boards/arm/pillbug/pillbug.dts +++ b/app/boards/arm/pillbug/pillbug.dts @@ -15,7 +15,7 @@ ext-power { compatible = "zmk,ext-power-generic"; label = "EXT_POWER"; - control-gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; + control-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; init-delay-ms = <50>; }; diff --git a/app/boards/shields/obe/boards/pillbug.overlay b/app/boards/shields/obe/boards/pillbug.overlay index 66c165d0..241862af 100644 --- a/app/boards/shields/obe/boards/pillbug.overlay +++ b/app/boards/shields/obe/boards/pillbug.overlay @@ -9,7 +9,7 @@ &spi1 { compatible = "nordic,nrf-spim"; status = "okay"; - mosi-pin = <39>; + mosi-pin = <25>; // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. sck-pin = <27>; miso-pin = <28>; diff --git a/app/boards/shields/obe/obe.keymap b/app/boards/shields/obe/obe.keymap index c9fd0941..05889365 100644 --- a/app/boards/shields/obe/obe.keymap +++ b/app/boards/shields/obe/obe.keymap @@ -8,6 +8,7 @@ #include #include #include +#include #define TIMEOUT 300 @@ -70,7 +71,7 @@ &bootloader &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_NXT &kp CAPS &kp KP_NUM &kp SLCK &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &trans &kp HOME &trans &kp END + &trans &trans &rgb_ug RGB_BRD &rgb_ug RGB_EFR &ext_power EP_TOG &rgb_ug RGB_EFF &rgb_ug RGB_BRI &trans &kp HOME &trans &kp END >; sensor-bindings = <&inc_dec_kp PG_UP PG_DN>;