Merge remote-tracking branch 'upstream/main' into advantage360
This commit is contained in:
commit
21938b7fd4
262 changed files with 3590 additions and 814 deletions
22
.github/workflows/build-user-config.yml
vendored
22
.github/workflows/build-user-config.yml
vendored
|
@ -97,7 +97,27 @@ jobs:
|
|||
run: west build -s zmk/app -b "${{ matrix.board }}" -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/${{ inputs.config_path }}" ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
|
||||
|
||||
- name: ${{ env.display_name }} Kconfig file
|
||||
run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort
|
||||
run: |
|
||||
if [ -f build/zephyr/.config ]
|
||||
then
|
||||
grep -v -e "^#" -e "^$" build/zephyr/.config | sort
|
||||
else
|
||||
echo "No Kconfig output"
|
||||
fi
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
- name: ${{ env.display_name }} Devicetree file
|
||||
run: |
|
||||
if [ -f build/zephyr/zephyr.dts ]
|
||||
then
|
||||
cat build/zephyr/zephyr.dts
|
||||
elif [ -f build/zephyr/zephyr.dts.pre ]
|
||||
then
|
||||
cat -s build/zephyr/zephyr.dts.pre
|
||||
else
|
||||
echo "No Devicetree output"
|
||||
fi
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
- name: Rename artifacts
|
||||
shell: sh -x {0}
|
||||
|
|
|
@ -59,7 +59,7 @@ if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
|||
target_sources(app PRIVATE src/behavior_queue.c)
|
||||
target_sources(app PRIVATE src/conditional_layer.c)
|
||||
target_sources(app PRIVATE src/endpoints.c)
|
||||
target_sources(app PRIVATE src/events/endpoint_selection_changed.c)
|
||||
target_sources(app PRIVATE src/events/endpoint_changed.c)
|
||||
target_sources(app PRIVATE src/hid_listener.c)
|
||||
target_sources(app PRIVATE src/keymap.c)
|
||||
target_sources(app PRIVATE src/events/layer_state_changed.c)
|
||||
|
|
|
@ -91,10 +91,18 @@ menu "Output Types"
|
|||
|
||||
config ZMK_USB
|
||||
bool "USB"
|
||||
depends on (!ZMK_SPLIT || (ZMK_SPLIT && ZMK_SPLIT_ROLE_CENTRAL))
|
||||
select USB
|
||||
select USB_DEVICE_STACK
|
||||
select USB_DEVICE_HID
|
||||
|
||||
config ZMK_USB_BOOT
|
||||
bool "USB Boot Protocol Support"
|
||||
default y
|
||||
depends on ZMK_USB
|
||||
select USB_HID_BOOT_PROTOCOL
|
||||
select USB_DEVICE_SOF
|
||||
|
||||
if ZMK_USB
|
||||
|
||||
config USB_NUMOF_EP_WRITE_RETRIES
|
||||
|
@ -575,4 +583,3 @@ osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield"
|
|||
|
||||
|
||||
source "Kconfig.zephyr"
|
||||
|
||||
|
|
|
@ -11,9 +11,6 @@ config BOARD
|
|||
config ZMK_KEYBOARD_NAME
|
||||
default "BDN9 Rev2"
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config ZMK_RGB_UNDERGLOW
|
||||
select SPI
|
||||
select WS2812_STRIP
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
mid_encoder: encoder_mid {
|
||||
|
@ -51,7 +51,7 @@
|
|||
label = "MID_ENCODER";
|
||||
a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
right_encoder: encoder_right {
|
||||
|
@ -59,7 +59,7 @@
|
|||
label = "RIGHT_ENCODER";
|
||||
a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -67,6 +67,7 @@
|
|||
compatible = "zmk,keymap-sensors";
|
||||
status = "disabled";
|
||||
sensors = <>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -23,3 +23,4 @@ CONFIG_HEAP_MEM_POOL_SIZE=1024
|
|||
# clock configuration
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
|
@ -18,10 +18,4 @@ endif # USB_DEVICE_STACK
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_BLUEMICRO840_V1
|
||||
|
|
|
@ -21,3 +21,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
|
|
@ -19,12 +19,6 @@ endif # USB
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "BT60"
|
||||
|
||||
|
|
|
@ -22,9 +22,10 @@
|
|||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
|
||||
|
@ -34,7 +35,7 @@
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -25,10 +25,4 @@ endif # USB
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
|
||||
|
|
|
@ -36,3 +36,6 @@ CONFIG_WS2812_STRIP=y
|
|||
CONFIG_SPI=y
|
||||
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
|
|
@ -36,3 +36,6 @@ CONFIG_WS2812_STRIP=y
|
|||
CONFIG_SPI=y
|
||||
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -36,3 +36,6 @@ CONFIG_WS2812_STRIP=y
|
|||
CONFIG_SPI=y
|
||||
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -26,9 +26,10 @@
|
|||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder_1>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
kscan0: kscan_0 {
|
||||
|
@ -76,7 +77,7 @@
|
|||
label = "ENCODER_ONE";
|
||||
a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -85,7 +86,7 @@
|
|||
label = "ENCODER_TWO";
|
||||
a-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -94,7 +95,7 @@
|
|||
label = "encoder_3";
|
||||
a-gpios = <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -25,12 +25,6 @@ config ZMK_SPLIT
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
if USB
|
||||
|
||||
config USB_NRFX
|
||||
|
|
|
@ -39,6 +39,9 @@ CONFIG_FLASH_MAP=y
|
|||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
|
|
|
@ -39,6 +39,9 @@ CONFIG_FLASH_MAP=y
|
|||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
|
|
|
@ -35,6 +35,9 @@ CONFIG_FLASH_MAP=y
|
|||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
|
|
|
@ -35,6 +35,9 @@ CONFIG_FLASH_MAP=y
|
|||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
||||
# enable display drivers
|
||||
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
|
||||
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
|
||||
|
|
|
@ -14,9 +14,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|||
#include <zmk/display.h>
|
||||
#include "output_status.h"
|
||||
#include <zmk/event_manager.h>
|
||||
#include <zmk/events/usb_conn_state_changed.h>
|
||||
#include <zmk/events/ble_active_profile_changed.h>
|
||||
#include <zmk/events/endpoint_selection_changed.h>
|
||||
#include <zmk/events/endpoint_changed.h>
|
||||
#include <zmk/usb.h>
|
||||
#include <zmk/ble.h>
|
||||
#include <zmk/endpoints.h>
|
||||
|
@ -39,31 +38,29 @@ LV_IMG_DECLARE(USB_connected);
|
|||
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
|
||||
|
||||
struct output_status_state {
|
||||
enum zmk_endpoint selected_endpoint;
|
||||
struct zmk_endpoint_instance selected_endpoint;
|
||||
bool active_profile_connected;
|
||||
bool active_profile_bonded;
|
||||
uint8_t active_profile_index;
|
||||
};
|
||||
|
||||
static struct output_status_state get_state(const zmk_event_t *_eh) {
|
||||
return (struct output_status_state){.selected_endpoint = zmk_endpoints_selected(),
|
||||
.active_profile_connected =
|
||||
zmk_ble_active_profile_is_connected(),
|
||||
.active_profile_bonded = !zmk_ble_active_profile_is_open(),
|
||||
.active_profile_index = zmk_ble_active_profile_index()};
|
||||
;
|
||||
return (struct output_status_state){
|
||||
.selected_endpoint = zmk_endpoints_selected(),
|
||||
.active_profile_connected = zmk_ble_active_profile_is_connected(),
|
||||
.active_profile_bonded = !zmk_ble_active_profile_is_open(),
|
||||
};
|
||||
}
|
||||
|
||||
static void set_status_symbol(lv_obj_t *icon, struct output_status_state state) {
|
||||
switch (state.selected_endpoint) {
|
||||
case ZMK_ENDPOINT_USB:
|
||||
switch (state.selected_endpoint.transport) {
|
||||
case ZMK_TRANSPORT_USB:
|
||||
lv_img_set_src(icon, &USB_connected);
|
||||
break;
|
||||
case ZMK_ENDPOINT_BLE:
|
||||
case ZMK_TRANSPORT_BLE:
|
||||
if (state.active_profile_bonded) {
|
||||
if (state.active_profile_connected) {
|
||||
// sprintf(text, LV_SYMBOL_BLUETOOTH "%i " LV_SYMBOL_OK, active_profile_index);
|
||||
switch (state.active_profile_index) {
|
||||
switch (state.selected_endpoint.ble.profile_index) {
|
||||
case 0:
|
||||
lv_img_set_src(icon, &bluetooth_connected_1);
|
||||
break;
|
||||
|
@ -84,7 +81,7 @@ static void set_status_symbol(lv_obj_t *icon, struct output_status_state state)
|
|||
lv_img_set_src(icon, &bluetooth_disconnected_right);
|
||||
}
|
||||
} else {
|
||||
switch (state.active_profile_index) {
|
||||
switch (state.selected_endpoint.ble.profile_index) {
|
||||
case 0:
|
||||
lv_img_set_src(icon, &bluetooth_advertising_1);
|
||||
break;
|
||||
|
@ -113,11 +110,9 @@ static void output_status_update_cb(struct output_status_state state) {
|
|||
|
||||
ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state,
|
||||
output_status_update_cb, get_state)
|
||||
ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_selection_changed);
|
||||
|
||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
||||
ZMK_SUBSCRIPTION(widget_output_status, zmk_usb_conn_state_changed);
|
||||
#endif
|
||||
ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_changed);
|
||||
// We don't get an endpoint changed event when the active profile connects/disconnects
|
||||
// but there wasn't another endpoint to switch from/to, so update on BLE events too.
|
||||
#if defined(CONFIG_ZMK_BLE)
|
||||
ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed);
|
||||
#endif
|
||||
|
|
|
@ -8,7 +8,4 @@ if BOARD_DZ60RGB_REV1
|
|||
config ZMK_KEYBOARD_NAME
|
||||
default "DZ60RGB Rev 1"
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_DZ60RGB_REV1
|
||||
|
|
|
@ -25,3 +25,5 @@ CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9
|
|||
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
||||
CONFIG_CLOCK_STM32_APB1_PRESCALER=2
|
||||
CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
||||
|
||||
CONFIG_ZMK_USB=y
|
|
@ -11,9 +11,6 @@ config BOARD
|
|||
config ZMK_KEYBOARD_NAME
|
||||
default "Ferris rev 0.2"
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config ZMK_KSCAN_MATRIX_POLLING
|
||||
default y
|
||||
|
||||
|
|
|
@ -9,7 +9,4 @@ config ZMK_KEYBOARD_NAME
|
|||
config RP2_FLASH_W25Q080
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_KBDFANS_TOFU65_V2
|
||||
|
|
|
@ -18,3 +18,5 @@ CONFIG_USE_DT_CODE_PARTITION=y
|
|||
|
||||
# Output UF2 by default, native bootloader supports it.
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
|
@ -21,12 +21,6 @@ endif # USB
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config PINMUX
|
||||
default y
|
||||
|
||||
|
|
|
@ -21,3 +21,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_NICE60
|
||||
|
|
|
@ -28,3 +28,7 @@ CONFIG_WS2812_STRIP=y
|
|||
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
|
||||
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2
|
||||
|
|
|
@ -22,3 +22,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -22,3 +22,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_BLE=y
|
||||
CONFIG_ZMK_USB=y
|
|
@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_NRF52840_M2
|
||||
|
|
|
@ -20,3 +20,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -18,12 +18,6 @@ endif # USB_DEVICE_STACK
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config PINMUX
|
||||
default y
|
||||
|
||||
|
|
|
@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y
|
|||
CONFIG_FLASH_MAP=y
|
||||
CONFIG_CLOCK_CONTROL_NRF=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y
|
|||
CONFIG_FLASH_MAP=y
|
||||
CONFIG_CLOCK_CONTROL_NRF=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y
|
|||
CONFIG_FLASH_MAP=y
|
||||
CONFIG_CLOCK_CONTROL_NRF=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -23,3 +23,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y
|
|||
CONFIG_FLASH_MAP=y
|
||||
CONFIG_CLOCK_CONTROL_NRF=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -16,10 +16,4 @@ endif # USB_DEVICE_STACK
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_PILLBUG
|
||||
|
|
|
@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -8,9 +8,6 @@ if BOARD_PLANCK_REV6
|
|||
config ZMK_KEYBOARD_NAME
|
||||
default "Planck V6"
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config ZMK_KSCAN_MATRIX_POLLING
|
||||
default y
|
||||
|
||||
|
|
|
@ -15,3 +15,5 @@ CONFIG_GPIO=y
|
|||
|
||||
# clock configuration
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
|
|
|
@ -8,9 +8,6 @@ if BOARD_PREONIC_REV3
|
|||
config ZMK_KEYBOARD_NAME
|
||||
default "Preonic V3"
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config ZMK_KSCAN_MATRIX_POLLING
|
||||
default y
|
||||
|
||||
|
|
|
@ -13,3 +13,5 @@ CONFIG_GPIO=y
|
|||
|
||||
# clock configuration
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
|
@ -8,7 +8,4 @@ if BOARD_QMK_PROTON_C
|
|||
config BOARD
|
||||
default "proton_c"
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_QMK_PROTON_C
|
||||
|
|
|
@ -17,3 +17,4 @@ CONFIG_GPIO=y
|
|||
# clock configuration
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
|
@ -16,12 +16,6 @@ endif # USB_DEVICE_STACK
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config PINMUX
|
||||
default y
|
||||
|
||||
|
|
|
@ -25,3 +25,6 @@ CONFIG_FLASH_PAGE_LAYOUT=y
|
|||
CONFIG_FLASH_MAP=y
|
||||
CONFIG_CLOCK_CONTROL_NRF=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -19,10 +19,4 @@ endif # USB
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_S40NC
|
||||
|
|
|
@ -20,3 +20,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -18,7 +18,7 @@
|
|||
flavor = "tap-preferred";
|
||||
tapping-term-ms = <220>;
|
||||
quick-tap-ms = <150>;
|
||||
global-quick-tap;
|
||||
require-prior-idle-ms = <100>;
|
||||
bindings = <&kp>, <&kp>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
label = "TOP_ENCODER";
|
||||
a-gpios = <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -48,13 +48,14 @@
|
|||
label = "BOTTOM_ENCODER";
|
||||
a-gpios = <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&top_encoder &bottom_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -23,20 +23,21 @@
|
|||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
right_encoder: encoder_right {
|
||||
compatible = "alps,ec11";
|
||||
label = "RIGHT_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
// TODO: RGB node(s)
|
||||
|
|
|
@ -48,7 +48,8 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(3,4) RC(3,5) RC(2,5) RC(2,6) RC(2,7)
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <120>;
|
||||
status = "disabled";
|
||||
steps = <60>;
|
||||
};
|
||||
|
||||
right_encoder: right_encoder {
|
||||
|
@ -56,7 +57,8 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(3,4) RC(3,5) RC(2,5) RC(2,6) RC(2,7)
|
|||
label = "RIGHT_ENCODER";
|
||||
a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <120>;
|
||||
status = "disabled";
|
||||
steps = <60>;
|
||||
};
|
||||
|
||||
sensors {
|
||||
|
|
|
@ -51,12 +51,13 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7)
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -59,13 +59,14 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7
|
|||
label = "RIGHT_ENCODER";
|
||||
a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder &right_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) 2020 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if SHIELD_MICRODOX_LEFT
|
||||
if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_V2_LEFT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Microdox"
|
||||
|
@ -11,7 +11,7 @@ config ZMK_SPLIT_ROLE_CENTRAL
|
|||
|
||||
endif
|
||||
|
||||
if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_RIGHT
|
||||
if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_RIGHT || SHIELD_MICRODOX_V2_LEFT || SHIELD_MICRODOX_V2_RIGHT
|
||||
|
||||
config ZMK_SPLIT
|
||||
default y
|
||||
|
|
|
@ -6,3 +6,9 @@ config SHIELD_MICRODOX_LEFT
|
|||
|
||||
config SHIELD_MICRODOX_RIGHT
|
||||
def_bool $(shields_list_contains,microdox_right)
|
||||
|
||||
config SHIELD_MICRODOX_V2_LEFT
|
||||
def_bool $(shields_list_contains,microdox_v2_left)
|
||||
|
||||
config SHIELD_MICRODOX_V2_RIGHT
|
||||
def_bool $(shields_list_contains,microdox_v2_right)
|
||||
|
|
8
app/boards/shields/microdox/README.md
Normal file
8
app/boards/shields/microdox/README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Microdox
|
||||
|
||||
Microdox is a 36 key split keyboard by Boardsource.
|
||||
|
||||
Two variants are defined for this shield – V1 and V2. The layout is exactly the same between the
|
||||
two. Per [help documentation](https://www.boardsource.xyz/help/6129be4a9c85c6050be190d2), if you
|
||||
purchased your PCB before April 2022, use `microdox_left`/`microdox_right`. Otherwise, use
|
||||
`microdox_v2_left`/`microdox_v2_right`.
|
|
@ -4,35 +4,12 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
#include "microdox_common.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,display = &oled;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <10>;
|
||||
rows = <4>;
|
||||
// | SW1 | SW2 | SW3 | SW4 | SW5 | | SW5 | SW4 | SW3 | SW2 | SW1 |
|
||||
// | SW6 | SW7 | SW8 | SW9 | SW10 | | SW10 | SW9 | SW8 | SW7 | SW6 |
|
||||
// | SW11 | SW12 | SW13 | SW14 | SW15 | | SW15 | SW14 | SW13 | SW12 | SW11 |
|
||||
// | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 |
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
|
||||
RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7)
|
||||
>;
|
||||
};
|
||||
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
|
@ -40,26 +17,5 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
|
|||
, <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
|
||||
};
|
||||
|
||||
// TODO: per-key RGB node(s)?
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "okay";
|
||||
|
||||
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>;
|
||||
com-sequential;
|
||||
prechargep = <0x22>;
|
||||
};
|
||||
};
|
||||
|
|
51
app/boards/shields/microdox/microdox_common.dtsi
Normal file
51
app/boards/shields/microdox/microdox_common.dtsi
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,display = &oled;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <10>;
|
||||
rows = <4>;
|
||||
// | SW1 | SW2 | SW3 | SW4 | SW5 | | SW5 | SW4 | SW3 | SW2 | SW1 |
|
||||
// | SW6 | SW7 | SW8 | SW9 | SW10 | | SW10 | SW9 | SW8 | SW7 | SW6 |
|
||||
// | SW11 | SW12 | SW13 | SW14 | SW15 | | SW15 | SW14 | SW13 | SW12 | SW11 |
|
||||
// | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 |
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
|
||||
RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7)
|
||||
>;
|
||||
};
|
||||
|
||||
// TODO: per-key RGB node(s)?
|
||||
};
|
||||
|
||||
&pro_micro_i2c {
|
||||
status = "okay";
|
||||
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>;
|
||||
com-sequential;
|
||||
prechargep = <0x22>;
|
||||
};
|
||||
};
|
6
app/boards/shields/microdox/microdox_v2.conf
Normal file
6
app/boards/shields/microdox/microdox_v2.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Uncomment the following lines to enable the Microdox RGB Underglow
|
||||
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
# CONFIG_WS2812_STRIP=y
|
||||
|
||||
# Uncomment the following line to enable the Microdox OLED Display
|
||||
# CONFIG_ZMK_DISPLAY=y
|
15
app/boards/shields/microdox/microdox_v2.dtsi
Normal file
15
app/boards/shields/microdox/microdox_v2.dtsi
Normal file
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "microdox_common.dtsi"
|
||||
|
||||
/ {
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
diode-direction = "col2row";
|
||||
};
|
||||
};
|
13
app/boards/shields/microdox/microdox_v2.zmk.yml
Normal file
13
app/boards/shields/microdox/microdox_v2.zmk.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
file_format: "1"
|
||||
id: microdox_v2
|
||||
name: Microdox V2
|
||||
type: shield
|
||||
url: https://boardsource.xyz/store/5f2e7e4a2902de7151494f92
|
||||
requires: [pro_micro]
|
||||
exposes: [i2c_oled]
|
||||
features:
|
||||
- keys
|
||||
- display
|
||||
siblings:
|
||||
- microdox_v2_left
|
||||
- microdox_v2_right
|
0
app/boards/shields/microdox/microdox_v2_left.conf
Normal file
0
app/boards/shields/microdox/microdox_v2_left.conf
Normal file
23
app/boards/shields/microdox/microdox_v2_left.overlay
Normal file
23
app/boards/shields/microdox/microdox_v2_left.overlay
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "microdox_v2.dtsi"
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro 4 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 6 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 14 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 18 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
row-gpios
|
||||
= <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
};
|
0
app/boards/shields/microdox/microdox_v2_right.conf
Normal file
0
app/boards/shields/microdox/microdox_v2_right.conf
Normal file
32
app/boards/shields/microdox/microdox_v2_right.overlay
Normal file
32
app/boards/shields/microdox/microdox_v2_right.overlay
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "microdox.dtsi"
|
||||
|
||||
&default_transform {
|
||||
col-offset = <5>;
|
||||
};
|
||||
|
||||
&oled {
|
||||
segment-remap;
|
||||
com-invdir;
|
||||
};
|
||||
|
||||
&kscan0 {
|
||||
col-gpios
|
||||
= <&pro_micro 14 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 5 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 6 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 15 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 21 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
row-gpios
|
||||
= <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
};
|
|
@ -48,6 +48,7 @@
|
|||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder_1 &encoder_2>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
label = "Encoder 1";
|
||||
a-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
|||
label = "Encoder 2";
|
||||
a-gpios = <&pro_micro 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
@ -6,10 +6,6 @@ if SHIELD_NIBBLE
|
|||
config ZMK_KEYBOARD_NAME
|
||||
default "NIBBLE"
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
|
||||
if ZMK_DISPLAY
|
||||
|
||||
config I2C
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder_1>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
keymap {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
label = "Encoder 1";
|
||||
a-gpios = <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ struct peripheral_status_state {
|
|||
bool connected;
|
||||
};
|
||||
|
||||
static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) {
|
||||
static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) {
|
||||
lv_obj_t *canvas = lv_obj_get_child(widget, 0);
|
||||
|
||||
lv_draw_label_dsc_t label_dsc;
|
||||
|
@ -47,7 +47,7 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state st
|
|||
|
||||
// Draw output status
|
||||
lv_canvas_draw_text(canvas, 0, 0, CANVAS_SIZE, &label_dsc,
|
||||
state.connected ? LV_SYMBOL_WIFI : LV_SYMBOL_CLOSE);
|
||||
state->connected ? LV_SYMBOL_WIFI : LV_SYMBOL_CLOSE);
|
||||
|
||||
// Rotate canvas
|
||||
rotate_canvas(canvas, cbuf);
|
||||
|
@ -61,7 +61,7 @@ static void set_battery_status(struct zmk_widget_status *widget,
|
|||
|
||||
widget->state.battery = state.level;
|
||||
|
||||
draw_top(widget->obj, widget->cbuf, widget->state);
|
||||
draw_top(widget->obj, widget->cbuf, &widget->state);
|
||||
}
|
||||
|
||||
static void battery_status_update_cb(struct battery_status_state state) {
|
||||
|
@ -94,7 +94,7 @@ static void set_connection_status(struct zmk_widget_status *widget,
|
|||
struct peripheral_status_state state) {
|
||||
widget->state.connected = state.connected;
|
||||
|
||||
draw_top(widget->obj, widget->cbuf, widget->state);
|
||||
draw_top(widget->obj, widget->cbuf, &widget->state);
|
||||
}
|
||||
|
||||
static void output_status_update_cb(struct peripheral_status_state state) {
|
||||
|
|
|
@ -17,7 +17,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|||
#include <zmk/event_manager.h>
|
||||
#include <zmk/events/battery_state_changed.h>
|
||||
#include <zmk/events/ble_active_profile_changed.h>
|
||||
#include <zmk/events/endpoint_selection_changed.h>
|
||||
#include <zmk/events/endpoint_changed.h>
|
||||
#include <zmk/events/wpm_state_changed.h>
|
||||
#include <zmk/events/layer_state_changed.h>
|
||||
#include <zmk/usb.h>
|
||||
|
@ -29,10 +29,10 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|||
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
|
||||
|
||||
struct output_status_state {
|
||||
enum zmk_endpoint selected_endpoint;
|
||||
struct zmk_endpoint_instance selected_endpoint;
|
||||
int active_profile_index;
|
||||
bool active_profile_connected;
|
||||
bool active_profile_bonded;
|
||||
uint8_t active_profile_index;
|
||||
};
|
||||
|
||||
struct layer_status_state {
|
||||
|
@ -44,7 +44,7 @@ struct wpm_status_state {
|
|||
uint8_t wpm;
|
||||
};
|
||||
|
||||
static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) {
|
||||
static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) {
|
||||
lv_obj_t *canvas = lv_obj_get_child(widget, 0);
|
||||
|
||||
lv_draw_label_dsc_t label_dsc;
|
||||
|
@ -67,13 +67,13 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state st
|
|||
// Draw output status
|
||||
char output_text[10] = {};
|
||||
|
||||
switch (state.selected_endpoint) {
|
||||
case ZMK_ENDPOINT_USB:
|
||||
switch (state->selected_endpoint.transport) {
|
||||
case ZMK_TRANSPORT_USB:
|
||||
strcat(output_text, LV_SYMBOL_USB);
|
||||
break;
|
||||
case ZMK_ENDPOINT_BLE:
|
||||
if (state.active_profile_bonded) {
|
||||
if (state.active_profile_connected) {
|
||||
case ZMK_TRANSPORT_BLE:
|
||||
if (state->active_profile_bonded) {
|
||||
if (state->active_profile_connected) {
|
||||
strcat(output_text, LV_SYMBOL_WIFI);
|
||||
} else {
|
||||
strcat(output_text, LV_SYMBOL_CLOSE);
|
||||
|
@ -91,18 +91,18 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state st
|
|||
lv_canvas_draw_rect(canvas, 1, 22, 66, 40, &rect_black_dsc);
|
||||
|
||||
char wpm_text[6] = {};
|
||||
snprintf(wpm_text, sizeof(wpm_text), "%d", state.wpm[9]);
|
||||
snprintf(wpm_text, sizeof(wpm_text), "%d", state->wpm[9]);
|
||||
lv_canvas_draw_text(canvas, 42, 52, 24, &label_dsc_wpm, wpm_text);
|
||||
|
||||
int max = 0;
|
||||
int min = 256;
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
if (state.wpm[i] > max) {
|
||||
max = state.wpm[i];
|
||||
if (state->wpm[i] > max) {
|
||||
max = state->wpm[i];
|
||||
}
|
||||
if (state.wpm[i] < min) {
|
||||
min = state.wpm[i];
|
||||
if (state->wpm[i] < min) {
|
||||
min = state->wpm[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state st
|
|||
lv_point_t points[10];
|
||||
for (int i = 0; i < 10; i++) {
|
||||
points[i].x = 2 + i * 7;
|
||||
points[i].y = 60 - (state.wpm[i] - min) * 36 / range;
|
||||
points[i].y = 60 - (state->wpm[i] - min) * 36 / range;
|
||||
}
|
||||
lv_canvas_draw_line(canvas, points, 10, &line_dsc);
|
||||
|
||||
|
@ -122,7 +122,7 @@ static void draw_top(lv_obj_t *widget, lv_color_t cbuf[], struct status_state st
|
|||
rotate_canvas(canvas, cbuf);
|
||||
}
|
||||
|
||||
static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) {
|
||||
static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) {
|
||||
lv_obj_t *canvas = lv_obj_get_child(widget, 1);
|
||||
|
||||
lv_draw_rect_dsc_t rect_black_dsc;
|
||||
|
@ -147,7 +147,7 @@ static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], struct status_state
|
|||
};
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
bool selected = state.active_profile_index == i;
|
||||
bool selected = i == state->active_profile_index;
|
||||
|
||||
lv_canvas_draw_arc(canvas, circle_offsets[i][0], circle_offsets[i][1], 13, 0, 359,
|
||||
&arc_dsc);
|
||||
|
@ -167,7 +167,7 @@ static void draw_middle(lv_obj_t *widget, lv_color_t cbuf[], struct status_state
|
|||
rotate_canvas(canvas, cbuf);
|
||||
}
|
||||
|
||||
static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], struct status_state state) {
|
||||
static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], const struct status_state *state) {
|
||||
lv_obj_t *canvas = lv_obj_get_child(widget, 2);
|
||||
|
||||
lv_draw_rect_dsc_t rect_black_dsc;
|
||||
|
@ -179,14 +179,14 @@ static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], struct status_state
|
|||
lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc);
|
||||
|
||||
// Draw layer
|
||||
if (state.layer_label == NULL) {
|
||||
if (state->layer_label == NULL) {
|
||||
char text[9] = {};
|
||||
|
||||
sprintf(text, "LAYER %i", state.layer_index);
|
||||
sprintf(text, "LAYER %i", state->layer_index);
|
||||
|
||||
lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, text);
|
||||
} else {
|
||||
lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, state.layer_label);
|
||||
lv_canvas_draw_text(canvas, 0, 5, 68, &label_dsc, state->layer_label);
|
||||
}
|
||||
|
||||
// Rotate canvas
|
||||
|
@ -201,7 +201,7 @@ static void set_battery_status(struct zmk_widget_status *widget,
|
|||
|
||||
widget->state.battery = state.level;
|
||||
|
||||
draw_top(widget->obj, widget->cbuf, widget->state);
|
||||
draw_top(widget->obj, widget->cbuf, &widget->state);
|
||||
}
|
||||
|
||||
static void battery_status_update_cb(struct battery_status_state state) {
|
||||
|
@ -226,33 +226,34 @@ ZMK_SUBSCRIPTION(widget_battery_status, zmk_battery_state_changed);
|
|||
ZMK_SUBSCRIPTION(widget_battery_status, zmk_usb_conn_state_changed);
|
||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
||||
|
||||
static void set_output_status(struct zmk_widget_status *widget, struct output_status_state state) {
|
||||
widget->state.selected_endpoint = state.selected_endpoint;
|
||||
widget->state.active_profile_connected = state.active_profile_connected;
|
||||
widget->state.active_profile_bonded = state.active_profile_bonded;
|
||||
widget->state.active_profile_index = state.active_profile_index;
|
||||
static void set_output_status(struct zmk_widget_status *widget,
|
||||
const struct output_status_state *state) {
|
||||
widget->state.selected_endpoint = state->selected_endpoint;
|
||||
widget->state.active_profile_index = state->active_profile_index;
|
||||
widget->state.active_profile_connected = state->active_profile_connected;
|
||||
widget->state.active_profile_bonded = state->active_profile_bonded;
|
||||
|
||||
draw_top(widget->obj, widget->cbuf, widget->state);
|
||||
draw_middle(widget->obj, widget->cbuf2, widget->state);
|
||||
draw_top(widget->obj, widget->cbuf, &widget->state);
|
||||
draw_middle(widget->obj, widget->cbuf2, &widget->state);
|
||||
}
|
||||
|
||||
static void output_status_update_cb(struct output_status_state state) {
|
||||
struct zmk_widget_status *widget;
|
||||
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_output_status(widget, state); }
|
||||
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_output_status(widget, &state); }
|
||||
}
|
||||
|
||||
static struct output_status_state output_status_get_state(const zmk_event_t *_eh) {
|
||||
return (struct output_status_state){.selected_endpoint = zmk_endpoints_selected(),
|
||||
.active_profile_connected =
|
||||
zmk_ble_active_profile_is_connected(),
|
||||
.active_profile_bonded = !zmk_ble_active_profile_is_open(),
|
||||
.active_profile_index = zmk_ble_active_profile_index()};
|
||||
;
|
||||
return (struct output_status_state){
|
||||
.selected_endpoint = zmk_endpoints_selected(),
|
||||
.active_profile_index = zmk_ble_active_profile_index(),
|
||||
.active_profile_connected = zmk_ble_active_profile_is_connected(),
|
||||
.active_profile_bonded = !zmk_ble_active_profile_is_open(),
|
||||
};
|
||||
}
|
||||
|
||||
ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state,
|
||||
output_status_update_cb, output_status_get_state)
|
||||
ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_selection_changed);
|
||||
ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_changed);
|
||||
|
||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
||||
ZMK_SUBSCRIPTION(widget_output_status, zmk_usb_conn_state_changed);
|
||||
|
@ -265,7 +266,7 @@ static void set_layer_status(struct zmk_widget_status *widget, struct layer_stat
|
|||
widget->state.layer_index = state.index;
|
||||
widget->state.layer_label = state.label;
|
||||
|
||||
draw_bottom(widget->obj, widget->cbuf3, widget->state);
|
||||
draw_bottom(widget->obj, widget->cbuf3, &widget->state);
|
||||
}
|
||||
|
||||
static void layer_status_update_cb(struct layer_status_state state) {
|
||||
|
@ -289,7 +290,7 @@ static void set_wpm_status(struct zmk_widget_status *widget, struct wpm_status_s
|
|||
}
|
||||
widget->state.wpm[9] = state.wpm;
|
||||
|
||||
draw_top(widget->obj, widget->cbuf, widget->state);
|
||||
draw_top(widget->obj, widget->cbuf, &widget->state);
|
||||
}
|
||||
|
||||
static void wpm_status_update_cb(struct wpm_status_state state) {
|
||||
|
|
|
@ -24,7 +24,7 @@ void rotate_canvas(lv_obj_t *canvas, lv_color_t cbuf[]) {
|
|||
CANVAS_SIZE / 2, true);
|
||||
}
|
||||
|
||||
void draw_battery(lv_obj_t *canvas, struct status_state state) {
|
||||
void draw_battery(lv_obj_t *canvas, const struct status_state *state) {
|
||||
lv_draw_rect_dsc_t rect_black_dsc;
|
||||
init_rect_dsc(&rect_black_dsc, LVGL_BACKGROUND);
|
||||
lv_draw_rect_dsc_t rect_white_dsc;
|
||||
|
@ -32,11 +32,11 @@ void draw_battery(lv_obj_t *canvas, struct status_state state) {
|
|||
|
||||
lv_canvas_draw_rect(canvas, 0, 2, 29, 12, &rect_white_dsc);
|
||||
lv_canvas_draw_rect(canvas, 1, 3, 27, 10, &rect_black_dsc);
|
||||
lv_canvas_draw_rect(canvas, 2, 4, (state.battery + 2) / 4, 8, &rect_white_dsc);
|
||||
lv_canvas_draw_rect(canvas, 2, 4, (state->battery + 2) / 4, 8, &rect_white_dsc);
|
||||
lv_canvas_draw_rect(canvas, 30, 5, 3, 6, &rect_white_dsc);
|
||||
lv_canvas_draw_rect(canvas, 31, 6, 1, 4, &rect_black_dsc);
|
||||
|
||||
if (state.charging) {
|
||||
if (state->charging) {
|
||||
lv_draw_img_dsc_t img_dsc;
|
||||
lv_draw_img_dsc_init(&img_dsc);
|
||||
lv_canvas_draw_img(canvas, 9, -1, &bolt, &img_dsc);
|
||||
|
|
|
@ -19,10 +19,10 @@ struct status_state {
|
|||
uint8_t battery;
|
||||
bool charging;
|
||||
#if !IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||
enum zmk_endpoint selected_endpoint;
|
||||
struct zmk_endpoint_instance selected_endpoint;
|
||||
int active_profile_index;
|
||||
bool active_profile_connected;
|
||||
bool active_profile_bonded;
|
||||
uint8_t active_profile_index;
|
||||
uint8_t layer_index;
|
||||
const char *layer_label;
|
||||
uint8_t wpm[10];
|
||||
|
@ -39,7 +39,7 @@ struct battery_status_state {
|
|||
};
|
||||
|
||||
void rotate_canvas(lv_obj_t *canvas, lv_color_t cbuf[]);
|
||||
void draw_battery(lv_obj_t *canvas, struct status_state state);
|
||||
void draw_battery(lv_obj_t *canvas, const struct status_state *state);
|
||||
void init_label_dsc(lv_draw_label_dsc_t *label_dsc, lv_color_t color, const lv_font_t *font,
|
||||
lv_text_align_t align);
|
||||
void init_rect_dsc(lv_draw_rect_dsc_t *rect_dsc, lv_color_t bg_color);
|
||||
|
|
9
app/boards/shields/reviung34/Kconfig.defconfig
Normal file
9
app/boards/shields/reviung34/Kconfig.defconfig
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if SHIELD_REVIUNG34
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "REVIUNG34"
|
||||
|
||||
endif
|
5
app/boards/shields/reviung34/Kconfig.shield
Normal file
5
app/boards/shields/reviung34/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config SHIELD_REVIUNG34
|
||||
def_bool $(shields_list_contains,reviung34)
|
13
app/boards/shields/reviung34/README.md
Normal file
13
app/boards/shields/reviung34/README.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# REVIUNG34
|
||||
|
||||
REVIUNG34 is a 33-34 key unibody split keyboard by [gtips](https://github.com/gtips). An in-stock version can be found at [Little Keyboards](https://www.littlekeyboards.com/products/reviung34-analyst-keyboard-kit).
|
||||
|
||||
By default, the 2x1u layout is used. To use to the 1x2u layout, add the following to your keymap:
|
||||
|
||||
```
|
||||
/ {
|
||||
chosen {
|
||||
zmk,matrix_transform = &single_2u_transform;
|
||||
};
|
||||
};
|
||||
```
|
48
app/boards/shields/reviung34/boards/nice_nano_v2.overlay
Normal file
48
app/boards/shields/reviung34/boards/nice_nano_v2.overlay
Normal file
|
@ -0,0 +1,48 @@
|
|||
#include <dt-bindings/led/led.h>
|
||||
|
||||
&pinctrl {
|
||||
spi3_default: spi3_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi3_sleep: spi3_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&spi3_default>;
|
||||
pinctrl-1 = <&spi3_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
||||
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 = <9>; /* number of LEDs */
|
||||
spi-one-frame = <0x70>;
|
||||
spi-zero-frame = <0x40>;
|
||||
color-mapping = <LED_COLOR_ID_GREEN
|
||||
LED_COLOR_ID_RED
|
||||
LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,underglow = &led_strip;
|
||||
};
|
||||
};
|
3
app/boards/shields/reviung34/reviung34.conf
Normal file
3
app/boards/shields/reviung34/reviung34.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Uncomment the following lines to enable RGB underglow
|
||||
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
# CONFIG_WS2812_STRIP=y
|
77
app/boards/shields/reviung34/reviung34.keymap
Normal file
77
app/boards/shields/reviung34/reviung34.keymap
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
// 34 keys.
|
||||
zmk,matrix_transform = &dual_1u_transform;
|
||||
|
||||
// 33 keys. Center two thumb keys replaced by a single 2u key. Remember to adjust your
|
||||
// keymap accordingly!
|
||||
// zmk,matrix_transform = &single_2u_transform;
|
||||
};
|
||||
};
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
base {
|
||||
label = "Base";
|
||||
bindings = <
|
||||
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
|
||||
&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI
|
||||
&mt LSHFT Z &mt LCTRL X &mt LALT C &kp V &kp B &kp N &kp M &mt RALT COMMA &mt RCTRL DOT &mt RSHFT SLASH
|
||||
&kp LGUI < 1 BSPC < 2 SPACE &mo 3
|
||||
>;
|
||||
};
|
||||
|
||||
lower {
|
||||
label = "Lower";
|
||||
bindings = <
|
||||
&kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR
|
||||
&trans &kp TILDE &kp DQT &kp PIPE &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &mo 4 &trans
|
||||
>;
|
||||
};
|
||||
|
||||
upper {
|
||||
label = "Upper";
|
||||
bindings = <
|
||||
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
|
||||
&trans &kp GRAVE &kp SQT &kp BSLH &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &mo 4 &trans &trans
|
||||
>;
|
||||
};
|
||||
|
||||
function {
|
||||
label = "Function";
|
||||
bindings = <
|
||||
&kp TAB &trans &kp C_VOL_UP &trans &trans &trans &trans &trans &trans &kp ENTER
|
||||
&kp ESC &kp C_BRI_DN &kp C_VOL_DN &kp C_BRI_UP &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &kp C_PWR &trans &trans
|
||||
>;
|
||||
};
|
||||
|
||||
meta {
|
||||
label = "Meta";
|
||||
bindings = <
|
||||
&rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &none &none &none &none &none
|
||||
&rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4
|
||||
&none &none &rgb_ug RGB_TOG &none &none &none &none &bt BT_CLR &none &none
|
||||
&none &trans &trans &none
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
63
app/boards/shields/reviung34/reviung34.overlay
Normal file
63
app/boards/shields/reviung34/reviung34.overlay
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &dual_1u_transform;
|
||||
};
|
||||
|
||||
dual_1u_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <9>;
|
||||
rows = <4>;
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(3,5)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(3,6)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(3,7)
|
||||
RC(3,2) RC(3,3) RC(3,4) RC(3,8)
|
||||
>;
|
||||
};
|
||||
|
||||
single_2u_transform: keymap_transform_1 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <9>;
|
||||
rows = <4>;
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(3,5)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(3,6)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(3,7)
|
||||
RC(3,2) RC(3,4) RC(3,8)
|
||||
>;
|
||||
};
|
||||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
= <&pro_micro 4 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 5 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 6 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 7 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 8 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 15 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 14 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 16 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 10 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
|
||||
row-gpios
|
||||
= <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
};
|
||||
};
|
9
app/boards/shields/reviung34/reviung34.zmk.yml
Normal file
9
app/boards/shields/reviung34/reviung34.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
file_format: "1"
|
||||
id: reviung34
|
||||
name: REVIUNG34
|
||||
type: shield
|
||||
url: https://github.com/gtips/reviung/tree/master/reviung34
|
||||
requires: [pro_micro]
|
||||
features:
|
||||
- keys
|
||||
- underglow
|
|
@ -43,12 +43,13 @@
|
|||
label = "encoder";
|
||||
a-gpios = <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
9
app/boards/shields/reviung53/Kconfig.defconfig
Normal file
9
app/boards/shields/reviung53/Kconfig.defconfig
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if SHIELD_REVIUNG53
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Reviung53"
|
||||
|
||||
endif
|
5
app/boards/shields/reviung53/Kconfig.shield
Normal file
5
app/boards/shields/reviung53/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config SHIELD_REVIUNG53
|
||||
def_bool $(shields_list_contains,reviung53)
|
47
app/boards/shields/reviung53/boards/nice_nano.overlay
Normal file
47
app/boards/shields/reviung53/boards/nice_nano.overlay
Normal file
|
@ -0,0 +1,47 @@
|
|||
#include <dt-bindings/led/led.h>
|
||||
|
||||
&pinctrl {
|
||||
spi3_default: spi3_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi3_sleep: spi3_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&spi3_default>;
|
||||
pinctrl-1 = <&spi3_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
||||
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>;
|
||||
spi-one-frame = <0x70>;
|
||||
spi-zero-frame = <0x40>;
|
||||
|
||||
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,underglow = &led_strip;
|
||||
};
|
||||
};
|
47
app/boards/shields/reviung53/boards/nice_nano_v2.overlay
Normal file
47
app/boards/shields/reviung53/boards/nice_nano_v2.overlay
Normal file
|
@ -0,0 +1,47 @@
|
|||
#include <dt-bindings/led/led.h>
|
||||
|
||||
&pinctrl {
|
||||
spi3_default: spi3_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi3_sleep: spi3_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&spi3_default>;
|
||||
pinctrl-1 = <&spi3_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
||||
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>;
|
||||
spi-one-frame = <0x70>;
|
||||
spi-zero-frame = <0x40>;
|
||||
|
||||
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,underglow = &led_strip;
|
||||
};
|
||||
};
|
3
app/boards/shields/reviung53/reviung53.conf
Normal file
3
app/boards/shields/reviung53/reviung53.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Uncomment the following lines to enable RGB underglow
|
||||
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
# CONFIG_WS2812_STRIP=y
|
109
app/boards/shields/reviung53/reviung53.keymap
Normal file
109
app/boards/shields/reviung53/reviung53.keymap
Normal file
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
|
||||
/ {
|
||||
conditional_layers {
|
||||
compatible = "zmk,conditional-layers";
|
||||
tri_layer {
|
||||
if-layers = <1 2>;
|
||||
then-layer = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// | | | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | DEL |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | BKSP |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | RET |
|
||||
// | SHFT | Z | X | C | V | B | N | M | , | . | SHFT(/) |
|
||||
// | CTRL | GUI | ALT | LOWER(SPACE) | RAISE(SPACE)| ALT | GUI | CTRL(\) |
|
||||
// |
|
||||
bindings = <
|
||||
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp DEL
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
|
||||
&kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp RET
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &mt RSHFT FSLH
|
||||
&kp LCTRL &kp LCMD &kp LALT < 1 SPACE < 2 SPACE &kp RALT &kp RCMD &mt RCTRL BSLH
|
||||
>;
|
||||
};
|
||||
|
||||
lower_layer {
|
||||
// --------------------------------------------------------------------------------------------
|
||||
// | | | | F9 | F10 | F11 | F12 | INS | PAU | SCR | PSCR | |
|
||||
// | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
|
||||
// | NAV | | | | | | | _ | + | { | } | " |
|
||||
// | | | | | | | | | | | ? |
|
||||
// | | | | | | | | | |
|
||||
// |
|
||||
bindings = <
|
||||
&trans &kp F9 &kp F10 &kp F11 &kp F12 &kp INS &kp PAUSE_BREAK &kp SLCK &kp PSCRN &trans
|
||||
&kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &trans
|
||||
&mo 4 &none &none &none &none &none &none &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp DQT
|
||||
&trans &none &none &none &none &none &none &none &none &none &kp QMARK
|
||||
&trans &trans &trans &trans &trans &trans &trans &kp PIPE
|
||||
>;
|
||||
};
|
||||
|
||||
raise_layer {
|
||||
// --------------------------------------------------------------------------------------
|
||||
// | | | | F9 | F10 | F11 | F12 | MUTE | VOL+ | VOL- | PLAY | |
|
||||
// | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
// | NAV | | | | | | | - | = | [ | ] | ' |
|
||||
// | | | | | | | | + | < | > | : |
|
||||
// | | | | | | | | | |
|
||||
// |
|
||||
bindings = <
|
||||
&trans &kp F9 &kp F10 &kp F11 &kp F12 &kp C_MUTE &kp C_VOL_UP &kp C_VOL_DN &kp C_PLAY &trans
|
||||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans
|
||||
&mo 4 &none &none &none &none &none &none &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp SQT
|
||||
&trans &none &none &none &none &none &none &kp PLUS &kp LT &kp GT &kp COLON
|
||||
&trans &trans &trans &trans &trans &trans &trans &kp PIPE
|
||||
>;
|
||||
};
|
||||
|
||||
adjust_layer {
|
||||
// ------------------------------------------------------------------------------------------------------------------------
|
||||
// | | | BT CLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | BT CLR |
|
||||
// | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | RGB TOG | | | | | | |
|
||||
// | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI- | | | | | | | | |
|
||||
// | | | | | | | BOOT | | | | |
|
||||
// | | | | | | | | |
|
||||
// |
|
||||
bindings = <
|
||||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &none &none &bt BT_CLR
|
||||
&rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF &none &rgb_ug RGB_TOG &none &none &none &none &none &none
|
||||
&rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR &none &none &none &none &none &none &none &none
|
||||
&trans &none &none &none &none &none &bootloader &none &none &none &none
|
||||
&trans &trans &trans &trans &trans &none &none &none
|
||||
>;
|
||||
};
|
||||
|
||||
nav_layer {
|
||||
// ------------------------------------------------------------------------------------------------------------------------
|
||||
// | | | ESC | | | | | | | | | DEL |
|
||||
// | TAB | | UP | | | | | | | | | BSPC |
|
||||
// | NAV | LEFT | DOWN | RIGHT | | | LEFT | DOWN | UP | RIGHT | | ENTER |
|
||||
// | SHIFT | | | | | | HOME | END | PGUP | PGDN | SHIFT |
|
||||
// | CTRL | GUI | ALT | SPACE | SPACE | ALT | GUI | CTRL |
|
||||
// |
|
||||
bindings = <
|
||||
&kp ESC &none &none &none &none &none &none &none &none &kp DEL
|
||||
&kp TAB &none &kp UP &none &none &none &none &none &none &none &none &kp BSPC
|
||||
&trans &kp LEFT &kp DOWN &kp RIGHT &none &none &kp LEFT &kp DOWN &kp UP &kp RIGHT &none &kp RET
|
||||
&kp LSHFT &none &none &none &none &none &kp HOME &kp END &kp PG_UP &kp PG_DN &kp RSHFT
|
||||
&kp LCTRL &kp LCMD &kp LALT &kp SPACE &kp SPACE &kp LALT &kp RCMD &kp RCTRL
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
56
app/boards/shields/reviung53/reviung53.overlay
Normal file
56
app/boards/shields/reviung53/reviung53.overlay
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <8>;
|
||||
rows = <7>;
|
||||
|
||||
map = <
|
||||
RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(4,0) RC(4,1) RC(4,2) RC(4,3)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(4,4) RC(4,5) RC(4,6) RC(4,7)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(5,0) RC(5,1) RC(5,2) RC(5,3)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(5,4) RC(5,5) RC(5,6)
|
||||
RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5) RC(6,6) RC(6,7)
|
||||
>;
|
||||
};
|
||||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
= <&pro_micro 21 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 20 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 18 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 15 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 14 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 16 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 10 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
|
||||
row-gpios
|
||||
= <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
|
||||
};
|
||||
};
|
9
app/boards/shields/reviung53/reviung53.zmk.yml
Normal file
9
app/boards/shields/reviung53/reviung53.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
file_format: "1"
|
||||
id: reviung53
|
||||
name: REVIUNG53
|
||||
type: shield
|
||||
url: https://github.com/gtips/reviung/tree/master/reviung53
|
||||
requires: [pro_micro]
|
||||
features:
|
||||
- keys
|
||||
- underglow
|
|
@ -43,13 +43,14 @@ RC(3,0) RC(3,1) RC(3,2)
|
|||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
// TODO: per-key RGB node(s)?
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
right_encoder: encoder_right {
|
||||
compatible = "alps,ec11";
|
||||
label = "RIGHT_ENCODER";
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue