Merge branch 'main' of https://github.com/JW2586/zmk
This commit is contained in:
commit
2bb8927074
630 changed files with 13584 additions and 31225 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM docker.io/zmkfirmware/zmk-dev-arm:2.5
|
FROM docker.io/zmkfirmware/zmk-dev-arm:3.0
|
||||||
|
|
||||||
COPY .bashrc tmp
|
COPY .bashrc tmp
|
||||||
RUN mv /tmp/.bashrc ~/.bashrc
|
RUN mv /tmp/.bashrc ~/.bashrc
|
||||||
|
|
131
.github/workflows/build-user-config.yml
vendored
Normal file
131
.github/workflows/build-user-config.yml
vendored
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
name: Reusable user config build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_matrix_path:
|
||||||
|
description: "Path to the build matrix file"
|
||||||
|
default: "build.yaml"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
config_path:
|
||||||
|
description: "Path to the config directory"
|
||||||
|
default: "config"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
fallback_binary:
|
||||||
|
description: "Fallback binary format, if no *.uf2 file was built"
|
||||||
|
default: "bin"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
artifact_name:
|
||||||
|
description: 'Artifact output file name'
|
||||||
|
default: 'firmware'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
matrix:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Fetch Build Keyboards
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install yaml2json
|
||||||
|
run: python3 -m pip install remarshal
|
||||||
|
|
||||||
|
- name: Fetch Build Matrix
|
||||||
|
id: set-matrix
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
matrix=$(yaml2json ${{ inputs.build_matrix_path }} | jq -c .)
|
||||||
|
yaml2json ${{ inputs.build_matrix_path }}
|
||||||
|
echo "::set-output name=matrix::${matrix}"
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: zmkfirmware/zmk-build-arm:stable
|
||||||
|
needs: matrix
|
||||||
|
name: Build
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix: ${{fromJson(needs.matrix.outputs.matrix)}}
|
||||||
|
steps:
|
||||||
|
- name: Prepare variables
|
||||||
|
id: variables
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
if [ -n "${{ matrix.shield }}" ]
|
||||||
|
then
|
||||||
|
EXTRA_CMAKE_ARGS="-DSHIELD=${{ matrix.shield }}"
|
||||||
|
ARTIFACT_NAME="${{ matrix.shield }}-${{ matrix.board }}-zmk"
|
||||||
|
DISPLAY_NAME="${{ matrix.shield }} - ${{ matrix.board }}"
|
||||||
|
else
|
||||||
|
EXTRA_CMAKE_ARGS=
|
||||||
|
DISPLAY_NAME="${{ matrix.board }}"
|
||||||
|
ARTIFACT_NAME="${{ matrix.board }}-zmk"
|
||||||
|
fi
|
||||||
|
echo ::set-output name=extra-cmake-args::${EXTRA_CMAKE_ARGS}
|
||||||
|
echo ::set-output name=artifact-name::${ARTIFACT_NAME}
|
||||||
|
echo ::set-output name=display-name::${DISPLAY_NAME}
|
||||||
|
echo ::set-output name=zephyr-version::${ZEPHYR_VERSION}
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Cache west modules
|
||||||
|
uses: actions/cache@v3.0.2
|
||||||
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
cache-name: cache-zephyr-${{ steps.variables.outputs.zephyr-version }}-modules
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
modules/
|
||||||
|
tools/
|
||||||
|
zephyr/
|
||||||
|
bootloader/
|
||||||
|
zmk/
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: West Init
|
||||||
|
run: west init -l ${{ inputs.config_path }}
|
||||||
|
|
||||||
|
- name: West Update
|
||||||
|
run: west update
|
||||||
|
|
||||||
|
- name: West Zephyr export
|
||||||
|
run: west zephyr-export
|
||||||
|
|
||||||
|
- name: West Build (${{ steps.variables.outputs.display-name }})
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }}
|
||||||
|
|
||||||
|
- name: ${{ steps.variables.outputs.display-name }} Kconfig file
|
||||||
|
run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort
|
||||||
|
|
||||||
|
- name: Rename artifacts
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
mkdir build/artifacts
|
||||||
|
if [ -f build/zephyr/zmk.uf2 ]
|
||||||
|
then
|
||||||
|
cp build/zephyr/zmk.uf2 "build/artifacts/${{ steps.variables.outputs.artifact-name }}.uf2"
|
||||||
|
elif [ -f build/zephyr/zmk.${{ inputs.fallback_binary }} ]
|
||||||
|
then
|
||||||
|
cp build/zephyr/zmk.${{ inputs.fallback_binary }} "build/artifacts/${{ steps.variables.outputs.artifact-name }}.${{ inputs.fallback_binary }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Archive (${{ steps.variables.outputs.display-name }})
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.artifact_name }}
|
||||||
|
path: build/artifacts
|
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:2.5
|
image: docker.io/zmkfirmware/zmk-build-arm:3.0
|
||||||
needs: compile-matrix
|
needs: compile-matrix
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -26,7 +26,7 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Cache west modules
|
- name: Cache west modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3.0.2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-zephyr-modules
|
cache-name: cache-zephyr-modules
|
||||||
with:
|
with:
|
||||||
|
@ -249,7 +249,7 @@ jobs:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "interconnect":
|
case "interconnect":
|
||||||
break;
|
return [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}))).flat();
|
}))).flat();
|
||||||
|
|
|
@ -29,7 +29,7 @@ jobs:
|
||||||
validate-metadata:
|
validate-metadata:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-dev-arm:2.5
|
image: docker.io/zmkfirmware/zmk-dev-arm:3.0
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|
28
.github/workflows/test.yml
vendored
28
.github/workflows/test.yml
vendored
|
@ -13,15 +13,32 @@ on:
|
||||||
- "app/src/**"
|
- "app/src/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
integration_test:
|
collect-tests:
|
||||||
|
outputs:
|
||||||
|
test-dirs: ${{ steps.test-dirs.outputs.test-dirs }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Find test directories
|
||||||
|
id: test-dirs
|
||||||
|
run: |
|
||||||
|
cd app/tests/
|
||||||
|
export TESTS=$(ls -d * | jq -R -s -c 'split("\n")[:-1]')
|
||||||
|
echo "::set-output name=test-dirs::${TESTS}"
|
||||||
|
run-tests:
|
||||||
|
needs: collect-tests
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker.io/zmkfirmware/zmk-build-arm:2.5
|
image: docker.io/zmkfirmware/zmk-build-arm:3.0
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Cache west modules
|
- name: Cache west modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3.0.2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-zephyr-modules
|
cache-name: cache-zephyr-modules
|
||||||
with:
|
with:
|
||||||
|
@ -43,8 +60,9 @@ jobs:
|
||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Test all
|
- name: Test ${{ matrix.test }}
|
||||||
run: west test
|
working-directory: app
|
||||||
|
run: west test tests/${{ matrix.test }}
|
||||||
- name: Archive artifacts
|
- name: Archive artifacts
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
|
|
@ -22,65 +22,70 @@ zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
|
||||||
# Add your source file to the "app" target. This must come after
|
# Add your source file to the "app" target. This must come after
|
||||||
# find_package(Zephyr) which defines the target.
|
# find_package(Zephyr) which defines the target.
|
||||||
target_include_directories(app PRIVATE include)
|
target_include_directories(app PRIVATE include)
|
||||||
target_sources_ifdef(CONFIG_ZMK_SLEEP app PRIVATE src/power.c)
|
|
||||||
target_sources(app PRIVATE src/stdlib.c)
|
target_sources(app PRIVATE src/stdlib.c)
|
||||||
target_sources(app PRIVATE src/activity.c)
|
target_sources(app PRIVATE src/activity.c)
|
||||||
target_sources(app PRIVATE src/kscan.c)
|
target_sources(app PRIVATE src/kscan.c)
|
||||||
target_sources(app PRIVATE src/matrix_transform.c)
|
target_sources(app PRIVATE src/matrix_transform.c)
|
||||||
target_sources(app PRIVATE src/hid.c)
|
|
||||||
target_sources(app PRIVATE src/sensors.c)
|
target_sources(app PRIVATE src/sensors.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/wpm.c)
|
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/wpm.c)
|
||||||
target_sources(app PRIVATE src/event_manager.c)
|
target_sources(app PRIVATE src/event_manager.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c)
|
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c)
|
||||||
target_sources(app PRIVATE src/events/activity_state_changed.c)
|
target_sources(app PRIVATE src/events/activity_state_changed.c)
|
||||||
target_sources(app PRIVATE src/events/position_state_changed.c)
|
target_sources(app PRIVATE src/events/position_state_changed.c)
|
||||||
target_sources(app PRIVATE src/events/layer_state_changed.c)
|
|
||||||
target_sources(app PRIVATE src/events/keycode_state_changed.c)
|
|
||||||
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
|
|
||||||
target_sources(app PRIVATE src/events/endpoint_selection_changed.c)
|
|
||||||
target_sources(app PRIVATE src/events/sensor_event.c)
|
target_sources(app PRIVATE src/events/sensor_event.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
|
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/ble_active_profile_changed.c)
|
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/events/usb_conn_state_changed.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/battery_state_changed.c)
|
|
||||||
target_sources_ifdef(CONFIG_USB app PRIVATE src/events/usb_conn_state_changed.c)
|
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
|
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
|
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
|
||||||
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||||
|
target_sources(app PRIVATE src/hid.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_key_press.c)
|
target_sources(app PRIVATE src/behaviors/behavior_key_press.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
|
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c)
|
target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_caps_word.c)
|
target_sources(app PRIVATE src/behaviors/behavior_caps_word.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_key_repeat.c)
|
target_sources(app PRIVATE src/behaviors/behavior_key_repeat.c)
|
||||||
|
target_sources(app PRIVATE src/behaviors/behavior_macro.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c)
|
target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c)
|
target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_outputs.c)
|
target_sources(app PRIVATE src/behaviors/behavior_outputs.c)
|
||||||
|
target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_toggle_layer.c)
|
target_sources(app PRIVATE src/behaviors/behavior_toggle_layer.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_to_layer.c)
|
target_sources(app PRIVATE src/behaviors/behavior_to_layer.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_transparent.c)
|
target_sources(app PRIVATE src/behaviors/behavior_transparent.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_none.c)
|
target_sources(app PRIVATE src/behaviors/behavior_none.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
|
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
|
||||||
target_sources(app PRIVATE src/combo.c)
|
target_sources(app PRIVATE src/combo.c)
|
||||||
|
target_sources(app PRIVATE src/behavior_queue.c)
|
||||||
target_sources(app PRIVATE src/conditional_layer.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/hid_listener.c)
|
||||||
target_sources(app PRIVATE src/keymap.c)
|
target_sources(app PRIVATE src/keymap.c)
|
||||||
|
target_sources(app PRIVATE src/events/layer_state_changed.c)
|
||||||
|
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
|
||||||
|
target_sources(app PRIVATE src/events/keycode_state_changed.c)
|
||||||
|
|
||||||
|
if (CONFIG_ZMK_BLE)
|
||||||
|
target_sources(app PRIVATE src/events/ble_active_profile_changed.c)
|
||||||
|
target_sources(app PRIVATE src/behaviors/behavior_bt.c)
|
||||||
|
target_sources(app PRIVATE src/ble.c)
|
||||||
|
target_sources(app PRIVATE src/hog.c)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
|
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/behaviors/behavior_backlight.c)
|
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/behaviors/behavior_backlight.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/behaviors/behavior_bt.c)
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/ble.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/battery_state_changed.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/battery.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/battery.c)
|
||||||
if (CONFIG_ZMK_SPLIT_BLE AND (NOT CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL))
|
|
||||||
target_sources(app PRIVATE src/split_listener.c)
|
target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c)
|
||||||
target_sources(app PRIVATE src/split/bluetooth/service.c)
|
add_subdirectory(src/split)
|
||||||
endif()
|
|
||||||
if (CONFIG_ZMK_SPLIT_BLE AND CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/usb.c)
|
||||||
target_sources(app PRIVATE src/split/bluetooth/central.c)
|
target_sources_ifdef(CONFIG_ZMK_USB app PRIVATE src/usb_hid.c)
|
||||||
endif()
|
|
||||||
target_sources_ifdef(CONFIG_USB app PRIVATE src/usb.c)
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/hog.c)
|
|
||||||
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
|
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/backlight.c)
|
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/backlight.c)
|
||||||
target_sources(app PRIVATE src/endpoints.c)
|
|
||||||
target_sources(app PRIVATE src/hid_listener.c)
|
|
||||||
target_sources(app PRIVATE src/main.c)
|
target_sources(app PRIVATE src/main.c)
|
||||||
|
|
||||||
add_subdirectory(src/display/)
|
add_subdirectory(src/display/)
|
||||||
|
|
163
app/Kconfig
163
app/Kconfig
|
@ -88,6 +88,9 @@ if ZMK_USB
|
||||||
config USB_NUMOF_EP_WRITE_RETRIES
|
config USB_NUMOF_EP_WRITE_RETRIES
|
||||||
default 10
|
default 10
|
||||||
|
|
||||||
|
config USB_HID_POLL_INTERVAL_MS
|
||||||
|
default 1
|
||||||
|
|
||||||
#ZMK_USB
|
#ZMK_USB
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -132,6 +135,9 @@ config ZMK_BLE_CLEAR_BONDS_ON_START
|
||||||
config BT_GATT_NOTIFY_MULTIPLE
|
config BT_GATT_NOTIFY_MULTIPLE
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
config BT_GATT_AUTO_SEC_REQ
|
||||||
|
default n
|
||||||
|
|
||||||
config BT_DEVICE_APPEARANCE
|
config BT_DEVICE_APPEARANCE
|
||||||
default 961
|
default 961
|
||||||
|
|
||||||
|
@ -139,6 +145,18 @@ config ZMK_BLE_PASSKEY_ENTRY
|
||||||
bool "Experimental: Requiring typing passkey from host to pair BLE connection"
|
bool "Experimental: Requiring typing passkey from host to pair BLE connection"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
config BT_PERIPHERAL_PREF_MIN_INT
|
||||||
|
default 6
|
||||||
|
|
||||||
|
config BT_PERIPHERAL_PREF_MAX_INT
|
||||||
|
default 12
|
||||||
|
|
||||||
|
config BT_PERIPHERAL_PREF_LATENCY
|
||||||
|
default 30
|
||||||
|
|
||||||
|
config BT_PERIPHERAL_PREF_TIMEOUT
|
||||||
|
default 400
|
||||||
|
|
||||||
#ZMK_BLE
|
#ZMK_BLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -148,107 +166,7 @@ endmenu
|
||||||
# HID
|
# HID
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "Split Support"
|
rsource "src/split/Kconfig"
|
||||||
|
|
||||||
config ZMK_SPLIT
|
|
||||||
bool "Split keyboard support"
|
|
||||||
|
|
||||||
if ZMK_SPLIT
|
|
||||||
|
|
||||||
menuconfig ZMK_SPLIT_BLE
|
|
||||||
bool "Split keyboard support via BLE transport"
|
|
||||||
depends on ZMK_BLE
|
|
||||||
default y
|
|
||||||
select BT_USER_PHY_UPDATE
|
|
||||||
|
|
||||||
if ZMK_SPLIT_BLE
|
|
||||||
|
|
||||||
menuconfig ZMK_SPLIT_BLE_ROLE_CENTRAL
|
|
||||||
bool "Central"
|
|
||||||
select BT_CENTRAL
|
|
||||||
select BT_GATT_CLIENT
|
|
||||||
select BT_GATT_AUTO_DISCOVER_CCC
|
|
||||||
|
|
||||||
if ZMK_SPLIT_BLE_ROLE_CENTRAL
|
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE
|
|
||||||
int "Max number of key position state events to queue when received from peripherals"
|
|
||||||
default 5
|
|
||||||
|
|
||||||
config ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_STACK_SIZE
|
|
||||||
int "BLE split central write thread stack size"
|
|
||||||
default 512
|
|
||||||
|
|
||||||
config ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_QUEUE_SIZE
|
|
||||||
int "Max number of behavior run events to queue to send to the peripheral(s)"
|
|
||||||
default 5
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !ZMK_SPLIT_BLE_ROLE_CENTRAL
|
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE
|
|
||||||
int "BLE split peripheral notify thread stack size"
|
|
||||||
default 512
|
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_PERIPHERAL_PRIORITY
|
|
||||||
int "BLE split peripheral notify thread priority"
|
|
||||||
default 5
|
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_PERIPHERAL_POSITION_QUEUE_SIZE
|
|
||||||
int "Max number of key position state events to queue to send to the central"
|
|
||||||
default 10
|
|
||||||
|
|
||||||
config ZMK_USB
|
|
||||||
default n
|
|
||||||
|
|
||||||
config BT_MAX_PAIRED
|
|
||||||
default 1
|
|
||||||
|
|
||||||
config BT_MAX_CONN
|
|
||||||
default 1
|
|
||||||
|
|
||||||
config BT_GAP_AUTO_UPDATE_CONN_PARAMS
|
|
||||||
default n
|
|
||||||
|
|
||||||
#!ZMK_SPLIT_BLE_ROLE_CENTRAL
|
|
||||||
endif
|
|
||||||
|
|
||||||
#ZMK_SPLIT_BLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
#ZMK_SPLIT
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ZMK_BLE
|
|
||||||
|
|
||||||
if ZMK_SPLIT_BLE && ZMK_SPLIT_BLE_ROLE_CENTRAL
|
|
||||||
|
|
||||||
config BT_MAX_CONN
|
|
||||||
default 6
|
|
||||||
|
|
||||||
config BT_MAX_PAIRED
|
|
||||||
default 6
|
|
||||||
|
|
||||||
#ZMK_SPLIT_BLE && ZMK_SPLIT_BLE_ROLE_CENTRAL
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !ZMK_SPLIT_BLE
|
|
||||||
|
|
||||||
config BT_MAX_CONN
|
|
||||||
default 5
|
|
||||||
|
|
||||||
config BT_MAX_PAIRED
|
|
||||||
default 5
|
|
||||||
|
|
||||||
#!ZMK_SPLIT_BLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
#ZMK_BLE
|
|
||||||
endif
|
|
||||||
|
|
||||||
#Split Support
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
#Basic Keyboard Setup
|
#Basic Keyboard Setup
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -372,10 +290,6 @@ config ZMK_SLEEP
|
||||||
|
|
||||||
if ZMK_SLEEP
|
if ZMK_SLEEP
|
||||||
|
|
||||||
choice SYS_PM_POLICY
|
|
||||||
default PM_POLICY_APP
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config PM_DEVICE
|
config PM_DEVICE
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
@ -410,11 +324,19 @@ config ZMK_COMBO_MAX_KEYS_PER_COMBO
|
||||||
#Combo options
|
#Combo options
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
menu "Behavior Options"
|
||||||
|
|
||||||
|
config ZMK_BEHAVIORS_QUEUE_SIZE
|
||||||
|
int "Maximum number of behaviors to allow queueing from a macro or other complex behavior"
|
||||||
|
default 64
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
menu "Advanced"
|
menu "Advanced"
|
||||||
|
|
||||||
menu "Initialization Priorities"
|
menu "Initialization Priorities"
|
||||||
|
|
||||||
if USB
|
if USB_DEVICE_STACK
|
||||||
|
|
||||||
config ZMK_USB_INIT_PRIORITY
|
config ZMK_USB_INIT_PRIORITY
|
||||||
int "USB Init Priority"
|
int "USB Init Priority"
|
||||||
|
@ -441,12 +363,6 @@ config ZMK_KSCAN_EVENT_QUEUE_SIZE
|
||||||
int "Size of the event queue for KSCAN events to buffer events"
|
int "Size of the event queue for KSCAN events to buffer events"
|
||||||
default 4
|
default 4
|
||||||
|
|
||||||
config ZMK_KSCAN_MOCK_DRIVER
|
|
||||||
bool "Enable mock kscan driver to simulate key presses"
|
|
||||||
|
|
||||||
config ZMK_KSCAN_COMPOSITE_DRIVER
|
|
||||||
bool "Enable composite kscan driver to combine kscan devices"
|
|
||||||
|
|
||||||
#KSCAN Settings
|
#KSCAN Settings
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
@ -470,17 +386,12 @@ if ZMK_USB_LOGGING
|
||||||
config ZMK_LOG_LEVEL
|
config ZMK_LOG_LEVEL
|
||||||
default 4
|
default 4
|
||||||
|
|
||||||
config USB_CDC_ACM_RINGBUF_SIZE
|
# We do this to avoid log loop where logging to USB generates more log messages.
|
||||||
default 1024
|
config USB_CDC_ACM_LOG_LEVEL
|
||||||
|
|
||||||
config USB_CDC_ACM_DEVICE_NAME
|
|
||||||
default "CDC_ACM"
|
|
||||||
|
|
||||||
config USB_CDC_ACM_DEVICE_COUNT
|
|
||||||
default 1
|
default 1
|
||||||
|
|
||||||
config UART_CONSOLE_ON_DEV_NAME
|
config USB_CDC_ACM_RINGBUF_SIZE
|
||||||
default "CDC_ACM_0"
|
default 1024
|
||||||
|
|
||||||
config LOG_BUFFER_SIZE
|
config LOG_BUFFER_SIZE
|
||||||
default 8192
|
default 8192
|
||||||
|
@ -488,6 +399,9 @@ config LOG_BUFFER_SIZE
|
||||||
config LOG_STRDUP_BUF_COUNT
|
config LOG_STRDUP_BUF_COUNT
|
||||||
default 16
|
default 16
|
||||||
|
|
||||||
|
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
|
||||||
|
default 1000
|
||||||
|
|
||||||
#ZMK_USB_LOGGING
|
#ZMK_USB_LOGGING
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -503,6 +417,11 @@ config ZMK_SETTINGS_SAVE_DEBOUNCE
|
||||||
#SETTINGS
|
#SETTINGS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
config ZMK_BATTERY_REPORT_INTERVAL
|
||||||
|
depends on ZMK_BLE
|
||||||
|
int "Battery level report interval in seconds"
|
||||||
|
default 60
|
||||||
|
|
||||||
#Advanced
|
#Advanced
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
@ -518,7 +437,7 @@ config KERNEL_BIN_NAME
|
||||||
config REBOOT
|
config REBOOT
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config USB
|
config USB_DEVICE_STACK
|
||||||
default y if HAS_HW_NRF_USBD
|
default y if HAS_HW_NRF_USBD
|
||||||
|
|
||||||
config ZMK_WPM
|
config ZMK_WPM
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# keeb.io BDN9 board configuration
|
# keeb.io BDN9 board configuration
|
||||||
|
|
||||||
# Copyright (c) 2020 Pete Johanson
|
# Copyright (c) 2020 The ZMK Contributors
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
if BOARD_BDN9
|
if BOARD_BDN9
|
||||||
|
@ -14,4 +14,8 @@ config ZMK_KEYBOARD_NAME
|
||||||
config ZMK_USB
|
config ZMK_USB
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
config ZMK_RGB_UNDERGLOW
|
||||||
|
select SPI
|
||||||
|
select WS2812_STRIP
|
||||||
|
|
||||||
endif # BOARD_BDN9
|
endif # BOARD_BDN9
|
||||||
|
|
5
app/boards/arm/bdn9/bdn9_rev2.conf
Normal file
5
app/boards/arm/bdn9/bdn9_rev2.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
# Uncomment the line below to enable RGB.
|
||||||
|
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <st/f0/stm32f072Xb.dtsi>
|
#include <st/f0/stm32f072Xb.dtsi>
|
||||||
|
#include <st/f0/stm32f072c(8-b)tx-pinctrl.dtsi>
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "Keeb.io BDN9 rev2";
|
model = "Keeb.io BDN9 rev2";
|
||||||
|
@ -14,10 +16,9 @@
|
||||||
chosen {
|
chosen {
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
zmk,kscan = &kscan;
|
zmk,kscan = &kscan;
|
||||||
/* TODO: Enable once the GPIO bitbanging driver supports STM32
|
|
||||||
zmk,underglow = &led_strip;
|
zmk,underglow = &led_strip;
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
kscan: kscan {
|
kscan: kscan {
|
||||||
|
@ -37,17 +38,6 @@
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
led_strip: ws2812 {
|
|
||||||
compatible = "worldsemi,ws2812-gpio";
|
|
||||||
label = "WS2812";
|
|
||||||
|
|
||||||
in-gpios = <&gpiob 15 0>;
|
|
||||||
|
|
||||||
chain-length = <9>;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
left_encoder: encoder_left {
|
left_encoder: encoder_left {
|
||||||
compatible = "alps,ec11";
|
compatible = "alps,ec11";
|
||||||
label = "LEFT_ENCODER";
|
label = "LEFT_ENCODER";
|
||||||
|
@ -80,8 +70,54 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&spi2 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&spi2_sck_pb13 &spi2_mosi_pb15>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
|
||||||
|
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>;
|
||||||
|
spi-one-frame = <0x70>;
|
||||||
|
spi-zero-frame = <0x40>;
|
||||||
|
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&clk_hsi {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pll {
|
||||||
|
status = "okay";
|
||||||
|
prediv = <1>;
|
||||||
|
mul = <6>;
|
||||||
|
clocks = <&clk_hsi>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&rcc {
|
||||||
|
clocks = <&pll>;
|
||||||
|
clock-frequency = <DT_FREQ_M(48)>;
|
||||||
|
ahb-prescaler = <1>;
|
||||||
|
apb1-prescaler = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
&usb {
|
&usb {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&rtc {
|
&rtc {
|
||||||
|
@ -99,7 +135,7 @@
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
/* Set 6Kb of storage at the end of the 128Kb of flash */
|
/* Set 6Kb of storage at the end of the 128Kb of flash */
|
||||||
storage_partition: partition@3e800 {
|
storage_partition: partition@1e800 {
|
||||||
label = "storage";
|
label = "storage";
|
||||||
reg = <0x0001e800 0x00001800>;
|
reg = <0x0001e800 0x00001800>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,8 +11,11 @@ CONFIG_FPU=y
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
# Enable pinmux
|
# Enable pinctrl
|
||||||
CONFIG_PINMUX=y
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
|
# Poll to avoid interrupt overlap issues
|
||||||
|
CONFIG_ZMK_KSCAN_DIRECT_POLLING=y
|
||||||
|
|
||||||
# Needed to reduce this to size that will fit on F072
|
# Needed to reduce this to size that will fit on F072
|
||||||
CONFIG_HEAP_MEM_POOL_SIZE=1024
|
CONFIG_HEAP_MEM_POOL_SIZE=1024
|
||||||
|
@ -20,13 +23,3 @@ CONFIG_HEAP_MEM_POOL_SIZE=1024
|
||||||
# clock configuration
|
# clock configuration
|
||||||
CONFIG_CLOCK_CONTROL=y
|
CONFIG_CLOCK_CONTROL=y
|
||||||
|
|
||||||
# Clock configuration for Cube Clock control driver
|
|
||||||
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
|
||||||
# use HSI as PLL input
|
|
||||||
CONFIG_CLOCK_STM32_PLL_SRC_HSI=y
|
|
||||||
# produce 72MHz clock at PLL output
|
|
||||||
CONFIG_CLOCK_STM32_PLL_PREDIV=1
|
|
||||||
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=12
|
|
||||||
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
|
||||||
CONFIG_CLOCK_STM32_APB1_PRESCALER=2
|
|
||||||
CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
|
||||||
-c
|
|
||||||
-b 0x26000
|
|
||||||
-f 0xADA52840
|
|
||||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
|
||||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
||||||
)
|
|
|
@ -8,15 +8,12 @@ if BOARD_BLUEMICRO840_V1
|
||||||
config BOARD
|
config BOARD
|
||||||
default "bluemicro840_v1"
|
default "bluemicro840_v1"
|
||||||
|
|
||||||
if USB
|
if USB_DEVICE_STACK
|
||||||
|
|
||||||
config USB_NRFX
|
config USB_NRFX
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
endif # USB_DEVICE_STACK
|
||||||
default y
|
|
||||||
|
|
||||||
endif # USB
|
|
||||||
|
|
||||||
config BT_CTLR
|
config BT_CTLR
|
||||||
default BT
|
default BT
|
||||||
|
@ -27,7 +24,4 @@ config ZMK_BLE
|
||||||
config ZMK_USB
|
config ZMK_USB
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_BLUEMICRO840_V1
|
endif # BOARD_BLUEMICRO840_V1
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
|
zmk,battery = &vbatt;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
@ -33,7 +35,7 @@
|
||||||
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vbatt {
|
vbatt: vbatt {
|
||||||
compatible = "zmk,battery-voltage-divider";
|
compatible = "zmk,battery-voltage-divider";
|
||||||
label = "BATTERY";
|
label = "BATTERY";
|
||||||
io-channels = <&adc 7>;
|
io-channels = <&adc 7>;
|
||||||
|
@ -73,6 +75,10 @@
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ CONFIG_ARM_MPU=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
|
||||||
-c
|
|
||||||
-b 0x26000
|
|
||||||
-f 0xADA52840
|
|
||||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
|
||||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
||||||
)
|
|
|
@ -25,9 +25,6 @@ config ZMK_BLE
|
||||||
config ZMK_USB
|
config ZMK_USB
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
|
||||||
default y
|
|
||||||
|
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "BT60"
|
default "BT60"
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
|
zmk,battery = &vbatt;
|
||||||
zmk,kscan = &kscan0;
|
zmk,kscan = &kscan0;
|
||||||
zmk,matrix_transform = &default_transform;
|
zmk,matrix_transform = &default_transform;
|
||||||
};
|
};
|
||||||
|
@ -45,7 +47,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
vbatt {
|
vbatt: vbatt {
|
||||||
compatible = "zmk,battery-voltage-divider";
|
compatible = "zmk,battery-voltage-divider";
|
||||||
label = "BATTERY";
|
label = "BATTERY";
|
||||||
io-channels = <&adc 2>;
|
io-channels = <&adc 2>;
|
||||||
|
@ -84,6 +86,10 @@
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
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(0,10) RC(0,11) RC(0,12) RC(0,13)
|
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(0,10) RC(0,11) RC(0,12) RC(0,13)
|
||||||
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(1,10) RC(1,11) RC(1,12) RC(1,13)
|
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(1,10) RC(1,11) RC(1,12) RC(1,13)
|
||||||
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(2,10) RC(2,11) RC(2,13)
|
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(2,10) RC(2,11) RC(2,13)
|
||||||
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
|
RC(3,0) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12)
|
||||||
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
|
RC(4,0) RC(4,1) RC(4,2) RC(4,6) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@ CONFIG_EC11=y
|
||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
|
@ -15,6 +15,7 @@ CONFIG_EC11=y
|
||||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
if(CONFIG_PINMUX)
|
|
||||||
zephyr_library()
|
|
||||||
zephyr_library_sources(pinmux.c)
|
|
||||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
|
||||||
endif()
|
|
|
@ -16,6 +16,7 @@
|
||||||
chosen {
|
chosen {
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
zmk,kscan = &kscan0;
|
zmk,kscan = &kscan0;
|
||||||
zmk,matrix_transform = &default_transform;
|
zmk,matrix_transform = &default_transform;
|
||||||
};
|
};
|
||||||
|
@ -67,6 +68,10 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) RC(
|
||||||
|
|
||||||
&usb {
|
&usb {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
|
|
|
@ -1,67 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2017 I-SENSE group of ICCS
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <kernel.h>
|
|
||||||
#include <device.h>
|
|
||||||
#include <init.h>
|
|
||||||
#include <drivers/pinmux.h>
|
|
||||||
#include <sys/sys_io.h>
|
|
||||||
|
|
||||||
#include <pinmux/stm32/pinmux_stm32.h>
|
|
||||||
|
|
||||||
/* pin assignments for STM32F3DISCOVERY board */
|
|
||||||
static const struct pin_config pinconf[] = {
|
|
||||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) && CONFIG_SERIAL
|
|
||||||
{STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX},
|
|
||||||
{STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX},
|
|
||||||
#endif
|
|
||||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) && CONFIG_SERIAL
|
|
||||||
{STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX},
|
|
||||||
{STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX},
|
|
||||||
#endif
|
|
||||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C
|
|
||||||
{STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL},
|
|
||||||
{STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA},
|
|
||||||
#endif
|
|
||||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C
|
|
||||||
{STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_I2C2_SCL},
|
|
||||||
{STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_I2C2_SDA},
|
|
||||||
#endif
|
|
||||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) && CONFIG_SPI
|
|
||||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
|
||||||
{STM32_PIN_PA4, STM32F3_PINMUX_FUNC_PA4_SPI1_NSS},
|
|
||||||
#endif /* CONFIG_SPI_STM32_USE_HW_SS */
|
|
||||||
{STM32_PIN_PA5, STM32F3_PINMUX_FUNC_PA5_SPI1_SCK},
|
|
||||||
{STM32_PIN_PA6, STM32F3_PINMUX_FUNC_PA6_SPI1_MISO},
|
|
||||||
{STM32_PIN_PA7, STM32F3_PINMUX_FUNC_PA7_SPI1_MOSI},
|
|
||||||
#endif
|
|
||||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) && CONFIG_SPI
|
|
||||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
|
||||||
{STM32_PIN_PB12, STM32F3_PINMUX_FUNC_PB12_SPI2_NSS},
|
|
||||||
#endif /* CONFIG_SPI_STM32_USE_HW_SS */
|
|
||||||
{STM32_PIN_PB13, STM32F3_PINMUX_FUNC_PB13_SPI2_SCK},
|
|
||||||
{STM32_PIN_PB14, STM32F3_PINMUX_FUNC_PB14_SPI2_MISO},
|
|
||||||
{STM32_PIN_PB15, STM32F3_PINMUX_FUNC_PB15_SPI2_MOSI},
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_USB_DC_STM32
|
|
||||||
{STM32_PIN_PA11, STM32F3_PINMUX_FUNC_PA11_USB_DM},
|
|
||||||
{STM32_PIN_PA12, STM32F3_PINMUX_FUNC_PA12_USB_DP},
|
|
||||||
#endif /* CONFIG_USB_DC_STM32 */
|
|
||||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) && CONFIG_CAN
|
|
||||||
{STM32_PIN_PD0, STM32F3_PINMUX_FUNC_PD0_CAN1_RX},
|
|
||||||
{STM32_PIN_PD1, STM32F3_PINMUX_FUNC_PD1_CAN1_TX},
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
static int pinmux_stm32_init(const struct device *port) {
|
|
||||||
ARG_UNUSED(port);
|
|
||||||
|
|
||||||
stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf));
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY);
|
|
|
@ -17,7 +17,4 @@ config ZMK_USB
|
||||||
config ZMK_KSCAN_MATRIX_POLLING
|
config ZMK_KSCAN_MATRIX_POLLING
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_KSCAN_COMPOSITE_DRIVER
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_FERRIS
|
endif # BOARD_FERRIS
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
chosen {
|
chosen {
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
zmk,kscan = &kscan;
|
zmk,kscan = &kscan;
|
||||||
zmk,matrix_transform = &transform;
|
zmk,matrix_transform = &transform;
|
||||||
/* TODO: Enable once we support the IC for underglow
|
/* TODO: Enable once we support the IC for underglow
|
||||||
|
@ -98,6 +99,7 @@
|
||||||
|
|
||||||
&i2c2 {
|
&i2c2 {
|
||||||
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
|
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
|
||||||
|
pinctrl-names = "default";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
clock-frequency = <I2C_BITRATE_FAST>;
|
clock-frequency = <I2C_BITRATE_FAST>;
|
||||||
|
|
||||||
|
@ -116,8 +118,31 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&clk_hsi {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pll {
|
||||||
|
prediv = <1>;
|
||||||
|
mul = <6>;
|
||||||
|
clocks = <&clk_hsi>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&rcc {
|
||||||
|
clocks = <&pll>;
|
||||||
|
clock-frequency = <DT_FREQ_M(48)>;
|
||||||
|
ahb-prescaler = <1>;
|
||||||
|
apb1-prescaler = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
&rtc {
|
&rtc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
|
|
|
@ -7,7 +7,7 @@ CONFIG_SOC_STM32F072XB=y
|
||||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000
|
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000
|
||||||
|
|
||||||
# enable PINMUX
|
# enable PINMUX
|
||||||
CONFIG_PINMUX=y
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
@ -17,8 +17,6 @@ CONFIG_I2C=y
|
||||||
|
|
||||||
# ZMK Settings
|
# ZMK Settings
|
||||||
CONFIG_ZMK_USB=y
|
CONFIG_ZMK_USB=y
|
||||||
CONFIG_ZMK_KSCAN_GPIO_DRIVER=y
|
|
||||||
CONFIG_ZMK_KSCAN_COMPOSITE_DRIVER=y
|
|
||||||
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
|
CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
|
||||||
CONFIG_USB_SELF_POWERED=n
|
CONFIG_USB_SELF_POWERED=n
|
||||||
|
|
||||||
|
@ -31,13 +29,3 @@ CONFIG_HEAP_MEM_POOL_SIZE=1024
|
||||||
# clock configuration
|
# clock configuration
|
||||||
CONFIG_CLOCK_CONTROL=y
|
CONFIG_CLOCK_CONTROL=y
|
||||||
|
|
||||||
# Clock configuration for Cube Clock control driver
|
|
||||||
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
|
||||||
# use HSI as PLL input
|
|
||||||
CONFIG_CLOCK_STM32_PLL_SRC_HSI=y
|
|
||||||
# produce 48MHz clock at PLL output
|
|
||||||
# CONFIG_CLOCK_STM32_PLL_PREDIV=1
|
|
||||||
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=6
|
|
||||||
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
|
||||||
CONFIG_CLOCK_STM32_APB1_PRESCALER=1
|
|
||||||
# CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
|
||||||
-c
|
|
||||||
-b 0x26000
|
|
||||||
-f 0xADA52840
|
|
||||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
|
||||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
||||||
)
|
|
||||||
|
|
||||||
if(CONFIG_PINMUX)
|
if(CONFIG_PINMUX)
|
||||||
zephyr_library()
|
zephyr_library()
|
||||||
|
|
|
@ -34,7 +34,4 @@ choice BOARD_MIKOTO_CHARGER_CURRENT
|
||||||
default BOARD_MIKOTO_CHARGER_CURRENT_100MA
|
default BOARD_MIKOTO_CHARGER_CURRENT_100MA
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_MIKOTO_520
|
endif # BOARD_MIKOTO_520
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
|
zmk,battery = &vbatt;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
@ -33,10 +35,10 @@
|
||||||
init-delay-ms = <50>;
|
init-delay-ms = <50>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vbatt {
|
vbatt: vbatt {
|
||||||
compatible = "zmk,battery-voltage-divider";
|
compatible = "zmk,battery-voltage-divider";
|
||||||
label = "BATTERY";
|
label = "BATTERY";
|
||||||
io-channels = <&adc 2>;
|
io-channels = <&adc 1>;
|
||||||
output-ohms = <10000000>;
|
output-ohms = <10000000>;
|
||||||
full-ohms = <(10000000 + 4000000)>;
|
full-ohms = <(10000000 + 4000000)>;
|
||||||
};
|
};
|
||||||
|
@ -72,6 +74,10 @@
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ CONFIG_ARM_MPU=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
|
||||||
-c
|
|
||||||
-b 0x1000
|
|
||||||
-f 0xADA52840
|
|
||||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
|
||||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
||||||
)
|
|
|
@ -6,15 +6,12 @@ if BOARD_NICE60
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "nice!60"
|
default "nice!60"
|
||||||
|
|
||||||
if USB
|
if USB_DEVICE_STACK
|
||||||
|
|
||||||
config USB_NRFX
|
config USB_NRFX
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
endif # USB_DEVICE_STACK
|
||||||
default y
|
|
||||||
|
|
||||||
endif # USB
|
|
||||||
|
|
||||||
config BT_CTLR
|
config BT_CTLR
|
||||||
default BT
|
default BT
|
||||||
|
@ -25,7 +22,4 @@ config ZMK_BLE
|
||||||
config ZMK_USB
|
config ZMK_USB
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_NICE60
|
endif # BOARD_NICE60
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
|
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
@ -16,6 +18,8 @@
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
|
zmk,battery = &vbatt;
|
||||||
zmk,kscan = &kscan0;
|
zmk,kscan = &kscan0;
|
||||||
zmk,matrix_transform = &default_transform;
|
zmk,matrix_transform = &default_transform;
|
||||||
zmk,underglow = &led_strip;
|
zmk,underglow = &led_strip;
|
||||||
|
@ -78,7 +82,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
|
||||||
control-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
control-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vbatt {
|
vbatt: vbatt {
|
||||||
compatible = "zmk,battery-voltage-divider";
|
compatible = "zmk,battery-voltage-divider";
|
||||||
label = "BATTERY";
|
label = "BATTERY";
|
||||||
io-channels = <&adc 2>;
|
io-channels = <&adc 2>;
|
||||||
|
@ -123,11 +127,16 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,5) R
|
||||||
chain-length = <12>; /* LED strip length */
|
chain-length = <12>; /* LED strip length */
|
||||||
spi-one-frame = <0x70>;
|
spi-one-frame = <0x70>;
|
||||||
spi-zero-frame = <0x40>;
|
spi-zero-frame = <0x40>;
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
|
|
|
@ -12,6 +12,7 @@ CONFIG_ARM_MPU=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
|
||||||
-c
|
|
||||||
-b 0x26000
|
|
||||||
-f 0xADA52840
|
|
||||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
|
||||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
||||||
)
|
|
|
@ -6,15 +6,12 @@ if BOARD_NICE_NANO || BOARD_NICE_NANO_V2
|
||||||
config BOARD
|
config BOARD
|
||||||
default "nice_nano"
|
default "nice_nano"
|
||||||
|
|
||||||
if USB
|
if USB_DEVICE_STACK
|
||||||
|
|
||||||
config USB_NRFX
|
config USB_NRFX
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
endif # USB_DEVICE_STACK
|
||||||
default y
|
|
||||||
|
|
||||||
endif # USB
|
|
||||||
|
|
||||||
config BT_CTLR
|
config BT_CTLR
|
||||||
default BT
|
default BT
|
||||||
|
@ -26,17 +23,3 @@ config ZMK_USB
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2
|
endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2
|
||||||
|
|
||||||
if BOARD_NICE_NANO
|
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_NICE_NANO
|
|
||||||
|
|
||||||
if BOARD_NICE_NANO_V2
|
|
||||||
|
|
||||||
config ZMK_BATTERY_NRF_VDDH
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_NICE_NANO_V2
|
|
||||||
|
|
|
@ -8,13 +8,17 @@
|
||||||
#include "nice_nano.dtsi"
|
#include "nice_nano.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,battery = &vbatt;
|
||||||
|
};
|
||||||
|
|
||||||
ext-power {
|
ext-power {
|
||||||
compatible = "zmk,ext-power-generic";
|
compatible = "zmk,ext-power-generic";
|
||||||
label = "EXT_POWER";
|
label = "EXT_POWER";
|
||||||
control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
|
control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vbatt {
|
vbatt: vbatt {
|
||||||
compatible = "zmk,battery-voltage-divider";
|
compatible = "zmk,battery-voltage-divider";
|
||||||
label = "BATTERY";
|
label = "BATTERY";
|
||||||
io-channels = <&adc 2>;
|
io-channels = <&adc 2>;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
@ -56,6 +57,10 @@
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ CONFIG_ARM_MPU=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
#include "nice_nano.dtsi"
|
#include "nice_nano.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,battery = &vbatt;
|
||||||
|
};
|
||||||
|
|
||||||
ext-power {
|
ext-power {
|
||||||
compatible = "zmk,ext-power-generic";
|
compatible = "zmk,ext-power-generic";
|
||||||
label = "EXT_POWER";
|
label = "EXT_POWER";
|
||||||
|
@ -15,7 +19,7 @@
|
||||||
init-delay-ms = <50>;
|
init-delay-ms = <50>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vbatt {
|
vbatt: vbatt {
|
||||||
compatible = "zmk,battery-nrf-vddh";
|
compatible = "zmk,battery-nrf-vddh";
|
||||||
label = "BATTERY";
|
label = "BATTERY";
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,6 +11,7 @@ CONFIG_ARM_MPU=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# Copyright (c) 2020 The ZMK Contributors
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
|
||||||
-c
|
|
||||||
-b 0x26000
|
|
||||||
-f 0xADA52840
|
|
||||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
|
||||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
||||||
)
|
|
|
@ -6,15 +6,12 @@ if BOARD_NRF52840_M2
|
||||||
config BOARD
|
config BOARD
|
||||||
default "nrf52480_m2"
|
default "nrf52480_m2"
|
||||||
|
|
||||||
if USB
|
if USB_DEVICE_STACK
|
||||||
|
|
||||||
config USB_NRFX
|
config USB_NRFX
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
endif # USB_DEVICE_STACK
|
||||||
default y
|
|
||||||
|
|
||||||
endif # USB
|
|
||||||
|
|
||||||
config BT_CTLR
|
config BT_CTLR
|
||||||
default BT
|
default BT
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
@ -54,6 +55,10 @@
|
||||||
&usbd {
|
&usbd {
|
||||||
compatible = "nordic,nrf-usbd";
|
compatible = "nordic,nrf-usbd";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ CONFIG_ARM_MPU=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
|
||||||
-c
|
|
||||||
-b 0x26000
|
|
||||||
-f 0xADA52840
|
|
||||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
|
||||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
||||||
)
|
|
||||||
|
|
||||||
if(CONFIG_PINMUX)
|
if(CONFIG_PINMUX)
|
||||||
zephyr_library()
|
zephyr_library()
|
||||||
|
|
|
@ -8,15 +8,12 @@ if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13
|
||||||
config BOARD
|
config BOARD
|
||||||
default "nrfmicro"
|
default "nrfmicro"
|
||||||
|
|
||||||
if USB
|
if USB_DEVICE_STACK
|
||||||
|
|
||||||
config USB_NRFX
|
config USB_NRFX
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config USB_DEVICE_STACK
|
endif # USB_DEVICE_STACK
|
||||||
default y
|
|
||||||
|
|
||||||
endif # USB
|
|
||||||
|
|
||||||
config BT_CTLR
|
config BT_CTLR
|
||||||
default BT
|
default BT
|
||||||
|
@ -35,9 +32,6 @@ if BOARD_NRFMICRO_13
|
||||||
config BOARD_NRFMICRO_CHARGER
|
config BOARD_NRFMICRO_CHARGER
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_NRFMICRO_13
|
endif # BOARD_NRFMICRO_13
|
||||||
|
|
||||||
endif # BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13
|
endif # BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
@ -59,6 +60,10 @@
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ CONFIG_ARM_MPU=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
@ -59,6 +60,10 @@
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ CONFIG_ARM_MPU=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
|
zmk,battery = &vbatt;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
@ -32,7 +34,7 @@
|
||||||
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vbatt {
|
vbatt: vbatt {
|
||||||
compatible = "zmk,battery-voltage-divider";
|
compatible = "zmk,battery-voltage-divider";
|
||||||
label = "BATTERY";
|
label = "BATTERY";
|
||||||
io-channels = <&adc 2>;
|
io-channels = <&adc 2>;
|
||||||
|
@ -71,6 +73,10 @@
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ CONFIG_ARM_MPU=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
|
@ -2,8 +2,3 @@
|
||||||
|
|
||||||
list(APPEND EXTRA_DTC_FLAGS "-qq")
|
list(APPEND EXTRA_DTC_FLAGS "-qq")
|
||||||
|
|
||||||
if(CONFIG_PINMUX)
|
|
||||||
zephyr_library()
|
|
||||||
zephyr_library_sources(pinmux.c)
|
|
||||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -1,67 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2017 I-SENSE group of ICCS
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <kernel.h>
|
|
||||||
#include <device.h>
|
|
||||||
#include <init.h>
|
|
||||||
#include <drivers/pinmux.h>
|
|
||||||
#include <sys/sys_io.h>
|
|
||||||
|
|
||||||
#include <pinmux/stm32/pinmux_stm32.h>
|
|
||||||
|
|
||||||
/* pin assignments for STM32F3DISCOVERY board */
|
|
||||||
static const struct pin_config pinconf[] = {
|
|
||||||
#ifdef CONFIG_UART_1
|
|
||||||
{STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX},
|
|
||||||
{STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX},
|
|
||||||
#endif /* CONFIG_UART_1 */
|
|
||||||
#ifdef CONFIG_UART_2
|
|
||||||
{STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX},
|
|
||||||
{STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX},
|
|
||||||
#endif /* CONFIG_UART_2 */
|
|
||||||
#ifdef CONFIG_I2C_1
|
|
||||||
{STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL},
|
|
||||||
{STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA},
|
|
||||||
#endif /* CONFIG_I2C_1 */
|
|
||||||
#ifdef CONFIG_I2C_2
|
|
||||||
{STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_I2C2_SCL},
|
|
||||||
{STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_I2C2_SDA},
|
|
||||||
#endif /* CONFIG_I2C_2 */
|
|
||||||
#ifdef CONFIG_SPI_1
|
|
||||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
|
||||||
{STM32_PIN_PA4, STM32F3_PINMUX_FUNC_PA4_SPI1_NSS},
|
|
||||||
#endif /* CONFIG_SPI_STM32_USE_HW_SS */
|
|
||||||
{STM32_PIN_PA5, STM32F3_PINMUX_FUNC_PA5_SPI1_SCK},
|
|
||||||
{STM32_PIN_PA6, STM32F3_PINMUX_FUNC_PA6_SPI1_MISO},
|
|
||||||
{STM32_PIN_PA7, STM32F3_PINMUX_FUNC_PA7_SPI1_MOSI},
|
|
||||||
#endif /* CONFIG_SPI_1 */
|
|
||||||
#ifdef CONFIG_SPI_2
|
|
||||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
|
||||||
{STM32_PIN_PB12, STM32F3_PINMUX_FUNC_PB12_SPI2_NSS},
|
|
||||||
#endif /* CONFIG_SPI_STM32_USE_HW_SS */
|
|
||||||
{STM32_PIN_PB13, STM32F3_PINMUX_FUNC_PB13_SPI2_SCK},
|
|
||||||
{STM32_PIN_PB14, STM32F3_PINMUX_FUNC_PB14_SPI2_MISO},
|
|
||||||
{STM32_PIN_PB15, STM32F3_PINMUX_FUNC_PB15_SPI2_MOSI},
|
|
||||||
#endif /* CONFIG_SPI_2 */
|
|
||||||
#ifdef CONFIG_USB_DC_STM32
|
|
||||||
{STM32_PIN_PA11, STM32F3_PINMUX_FUNC_PA11_USB_DM},
|
|
||||||
{STM32_PIN_PA12, STM32F3_PINMUX_FUNC_PA12_USB_DP},
|
|
||||||
#endif /* CONFIG_USB_DC_STM32 */
|
|
||||||
#ifdef CONFIG_CAN_1
|
|
||||||
{STM32_PIN_PD0, STM32F3_PINMUX_FUNC_PD0_CAN1_RX},
|
|
||||||
{STM32_PIN_PD1, STM32F3_PINMUX_FUNC_PD1_CAN1_TX},
|
|
||||||
#endif /* CONFIG_CAN_1 */
|
|
||||||
};
|
|
||||||
|
|
||||||
static int pinmux_stm32_init(const struct device *port) {
|
|
||||||
ARG_UNUSED(port);
|
|
||||||
|
|
||||||
stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf));
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1, CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY);
|
|
|
@ -1,11 +1,12 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2017 I-SENSE group of ICCS
|
* Copyright (c) 2020 The ZMK Contributors
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <st/f3/stm32f303Xc.dtsi>
|
#include <st/f3/stm32f303Xc.dtsi>
|
||||||
|
#include <st/f3/stm32f303c(b-c)tx-pinctrl.dtsi>
|
||||||
#include <dt-bindings/zmk/matrix_transform.h>
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
@ -15,8 +16,9 @@
|
||||||
chosen {
|
chosen {
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
zmk,kscan = &kscan0;
|
zmk,kscan = &kscan0;
|
||||||
zmk,matrix_transform = &layout_grid_transform;
|
zmk,matrix_transform = &layout_grid_transform;
|
||||||
};
|
};
|
||||||
|
|
||||||
kscan0: kscan {
|
kscan0: kscan {
|
||||||
|
@ -82,7 +84,33 @@ layout_2x2u_transform:
|
||||||
};
|
};
|
||||||
|
|
||||||
&usb {
|
&usb {
|
||||||
|
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
|
||||||
|
pinctrl-names = "default";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&clk_hse {
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <DT_FREQ_M(8)>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pll {
|
||||||
|
prediv = <1>;
|
||||||
|
mul = <9>;
|
||||||
|
clocks = <&clk_hse>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&rcc {
|
||||||
|
clocks = <&pll>;
|
||||||
|
clock-frequency = <DT_FREQ_M(72)>;
|
||||||
|
ahb-prescaler = <1>;
|
||||||
|
apb1-prescaler = <2>;
|
||||||
|
apb2-prescaler = <1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
|
|
|
@ -8,21 +8,10 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
|
||||||
|
|
||||||
# enable pinmux
|
# enable pinmux
|
||||||
CONFIG_PINMUX=y
|
CONFIG_PINMUX=y
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
# clock configuration
|
# clock configuration
|
||||||
CONFIG_CLOCK_CONTROL=y
|
CONFIG_CLOCK_CONTROL=y
|
||||||
|
|
||||||
# Clock configuration for Cube Clock control driver
|
|
||||||
CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
|
|
||||||
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
|
||||||
# use HSE as PLL input
|
|
||||||
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
|
|
||||||
# produce 72MHz clock at PLL output
|
|
||||||
CONFIG_CLOCK_STM32_PLL_PREDIV=1
|
|
||||||
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9
|
|
||||||
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
|
||||||
CONFIG_CLOCK_STM32_APB1_PRESCALER=2
|
|
||||||
CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020 Pete Johanson
|
* Copyright (c) 2020 The ZMK Contributors
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
@ -16,6 +16,11 @@
|
||||||
chosen {
|
chosen {
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart0;
|
||||||
|
};
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led0 = &led;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
@ -29,18 +34,47 @@
|
||||||
|
|
||||||
&usart1 {
|
&usart1 {
|
||||||
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
|
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
|
||||||
|
pinctrl-names = "default";
|
||||||
};
|
};
|
||||||
|
|
||||||
&spi2 {
|
&spi2 {
|
||||||
pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>;
|
pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>;
|
||||||
|
pinctrl-names = "default";
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c1 {
|
&i2c1 {
|
||||||
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
|
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
};
|
||||||
|
|
||||||
|
&clk_hse {
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <DT_FREQ_M(8)>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pll {
|
||||||
|
prediv = <1>;
|
||||||
|
mul = <9>;
|
||||||
|
clocks = <&clk_hse>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&rcc {
|
||||||
|
clocks = <&pll>;
|
||||||
|
clock-frequency = <DT_FREQ_M(72)>;
|
||||||
|
ahb-prescaler = <1>;
|
||||||
|
apb1-prescaler = <2>;
|
||||||
|
apb2-prescaler = <1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&usb {
|
&usb {
|
||||||
|
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
|
||||||
|
pinctrl-names = "default";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart0: cdc_acm_uart0 {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&rtc {
|
&rtc {
|
||||||
|
|
|
@ -8,8 +8,8 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
|
||||||
# Floating Point Options
|
# Floating Point Options
|
||||||
CONFIG_FPU=y
|
CONFIG_FPU=y
|
||||||
|
|
||||||
# enable pinmux
|
# enable pinctrl
|
||||||
CONFIG_PINMUX=y
|
CONFIG_PINCTRL=y
|
||||||
|
|
||||||
# enable GPIO
|
# enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
@ -17,14 +17,3 @@ CONFIG_GPIO=y
|
||||||
# clock configuration
|
# clock configuration
|
||||||
CONFIG_CLOCK_CONTROL=y
|
CONFIG_CLOCK_CONTROL=y
|
||||||
|
|
||||||
# Clock configuration for Cube Clock control driver
|
|
||||||
CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
|
|
||||||
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
|
||||||
# use HSE as PLL input
|
|
||||||
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
|
|
||||||
# produce 72MHz clock at PLL output
|
|
||||||
CONFIG_CLOCK_STM32_PLL_PREDIV=1
|
|
||||||
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=9
|
|
||||||
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
|
||||||
CONFIG_CLOCK_STM32_APB1_PRESCALER=2
|
|
||||||
CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
|
||||||
-c
|
|
||||||
-b 0x1000
|
|
||||||
-f 0xADA52840
|
|
||||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
|
||||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
|
||||||
)
|
|
|
@ -25,7 +25,4 @@ config ZMK_BLE
|
||||||
config ZMK_USB
|
config ZMK_USB
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
|
||||||
default y
|
|
||||||
|
|
||||||
endif # BOARD_S40NC
|
endif # BOARD_S40NC
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
zephyr,code-partition = &code_partition;
|
zephyr,code-partition = &code_partition;
|
||||||
zephyr,sram = &sram0;
|
zephyr,sram = &sram0;
|
||||||
zephyr,flash = &flash0;
|
zephyr,flash = &flash0;
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
|
zmk,battery = &vbatt;
|
||||||
zmk,kscan = &kscan0;
|
zmk,kscan = &kscan0;
|
||||||
zmk,matrix_transform = &default_transform;
|
zmk,matrix_transform = &default_transform;
|
||||||
};
|
};
|
||||||
|
@ -68,7 +70,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
vbatt {
|
vbatt: vbatt {
|
||||||
compatible = "zmk,battery-voltage-divider";
|
compatible = "zmk,battery-voltage-divider";
|
||||||
label = "BATTERY";
|
label = "BATTERY";
|
||||||
io-channels = <&adc 2>;
|
io-channels = <&adc 2>;
|
||||||
|
@ -95,6 +97,10 @@
|
||||||
|
|
||||||
&usbd {
|
&usbd {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&flash0 {
|
&flash0 {
|
||||||
|
|
|
@ -12,6 +12,7 @@ CONFIG_ARM_MPU=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
CONFIG_USE_DT_CODE_PARTITION=y
|
CONFIG_USE_DT_CODE_PARTITION=y
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=y
|
||||||
|
|
||||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
CONFIG_NVS=y
|
CONFIG_NVS=y
|
||||||
|
|
9
app/boards/arm/seeeduino_xiao/seeeduino_xiao.zmk.yml
Normal file
9
app/boards/arm/seeeduino_xiao/seeeduino_xiao.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: seeeduino_xiao
|
||||||
|
name: Seeeduino XIAO
|
||||||
|
type: board
|
||||||
|
arch: arm
|
||||||
|
outputs:
|
||||||
|
- usb
|
||||||
|
url: https://wiki.seeedstudio.com/Seeeduino-XIAO/
|
||||||
|
exposes: [seeed_xiao]
|
10
app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml
Normal file
10
app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: seeeduino_xiao_ble
|
||||||
|
name: Seeeduino XIAO BLE
|
||||||
|
type: board
|
||||||
|
arch: arm
|
||||||
|
outputs:
|
||||||
|
- usb
|
||||||
|
- ble
|
||||||
|
url: https://wiki.seeedstudio.com/XIAO_BLE/
|
||||||
|
exposes: [seeed_xiao]
|
|
@ -8,3 +8,7 @@ description: |
|
||||||
The SparkFun Pro Micro grew popular as a low cost ATmega32U4 board with sufficient GPIO and peripherals
|
The SparkFun Pro Micro grew popular as a low cost ATmega32U4 board with sufficient GPIO and peripherals
|
||||||
to work for many keyboard needs. Since the original Pro Micro, many pin compatible boards have appeared,
|
to work for many keyboard needs. Since the original Pro Micro, many pin compatible boards have appeared,
|
||||||
with various changes or improvements, such as the Elite-C w/ USB-C, nice!nano with nRF52840 wireless.
|
with various changes or improvements, such as the Elite-C w/ USB-C, nice!nano with nRF52840 wireless.
|
||||||
|
|
||||||
|
Note: ZMK doesn't support boards with AVR 8-bit processors, such as the ATmega32U4, because Zephyr™ only
|
||||||
|
supports 32-bit and 64-bit platforms. As a result, controllers like the SparkFun Pro Micro and the Elite-C
|
||||||
|
are *not* supported by ZMK.
|
||||||
|
|
10
app/boards/interconnects/seeed_xiao/seeed_xiao.zmk.yml
Normal file
10
app/boards/interconnects/seeed_xiao/seeed_xiao.zmk.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: seeed_xiao
|
||||||
|
name: Seeed XIAO
|
||||||
|
type: interconnect
|
||||||
|
url: https://wiki.seeedstudio.com/Seeeduino-XIAO/
|
||||||
|
manufacturer: Seeed
|
||||||
|
description: |
|
||||||
|
The Seeed(uino) XIAO is a popular smaller format micro-controller, that has gained popularity as an alterative
|
||||||
|
to the SparkFun Pro Micro. Since its creation, several pin compatible controllers, such
|
||||||
|
as the Seeeduino XIAO BLE, Adafruit QT Py and Adafruit QT Py RP2040, have become available.
|
|
@ -1,6 +1,3 @@
|
||||||
CONFIG_KSCAN=n
|
|
||||||
CONFIG_ZMK_KSCAN_MOCK_DRIVER=y
|
|
||||||
CONFIG_ZMK_KSCAN_GPIO_DRIVER=n
|
|
||||||
CONFIG_GPIO=n
|
CONFIG_GPIO=n
|
||||||
CONFIG_ZMK_BLE=n
|
CONFIG_ZMK_BLE=n
|
||||||
CONFIG_LOG=y
|
CONFIG_LOG=y
|
||||||
|
|
8
app/boards/native_posix_64.conf
Normal file
8
app/boards/native_posix_64.conf
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
CONFIG_GPIO=n
|
||||||
|
# Enable to have the native posix build expose USBIP device(s)
|
||||||
|
# CONFIG_ZMK_USB=y
|
||||||
|
CONFIG_LOG=y
|
||||||
|
CONFIG_LOG_BACKEND_SHOW_COLOR=n
|
||||||
|
CONFIG_ZMK_LOG_LEVEL_DBG=y
|
||||||
|
CONFIG_DEBUG=y
|
||||||
|
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
18
app/boards/native_posix_64.overlay
Normal file
18
app/boards/native_posix_64.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <dt-bindings/zmk/kscan_mock.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,kscan = &kscan;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan: kscan {
|
||||||
|
compatible = "zmk,kscan-mock";
|
||||||
|
label = "KSCAN_MOCK";
|
||||||
|
|
||||||
|
rows = <2>;
|
||||||
|
columns = <2>;
|
||||||
|
exit-after;
|
||||||
|
};
|
||||||
|
};
|
5
app/boards/seeeduino_xiao.conf
Normal file
5
app/boards/seeeduino_xiao.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
CONFIG_CONSOLE=n
|
||||||
|
CONFIG_SERIAL=n
|
||||||
|
CONFIG_UART_CONSOLE=n
|
||||||
|
CONFIG_UART_INTERRUPT_DRIVEN=n
|
||||||
|
CONFIG_ZMK_USB=y
|
19
app/boards/seeeduino_xiao.overlay
Normal file
19
app/boards/seeeduino_xiao.overlay
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb0 {
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
15
app/boards/seeeduino_xiao_ble.conf
Normal file
15
app/boards/seeeduino_xiao_ble.conf
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
CONFIG_CONSOLE=n
|
||||||
|
CONFIG_SERIAL=n
|
||||||
|
CONFIG_UART_CONSOLE=n
|
||||||
|
CONFIG_UART_INTERRUPT_DRIVEN=n
|
||||||
|
CONFIG_ZMK_USB=y
|
||||||
|
CONFIG_ZMK_BLE=y
|
||||||
|
|
||||||
|
|
||||||
|
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||||
|
CONFIG_NVS=y
|
||||||
|
CONFIG_SETTINGS_NVS=y
|
||||||
|
CONFIG_FLASH=y
|
||||||
|
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||||
|
CONFIG_FLASH_MAP=y
|
34
app/boards/seeeduino_xiao_ble.overlay
Normal file
34
app/boards/seeeduino_xiao_ble.overlay
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
|
zmk,battery = &vbatt;
|
||||||
|
};
|
||||||
|
|
||||||
|
vbatt: vbatt {
|
||||||
|
compatible = "zmk,battery-voltage-divider";
|
||||||
|
label = "BATTERY";
|
||||||
|
io-channels = <&adc 7>;
|
||||||
|
power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
|
||||||
|
output-ohms = <1000000>;
|
||||||
|
full-ohms = <(1000000 + 510000)>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&adc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usbd {
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
@ -6,7 +6,7 @@ if SHIELD_A_DUX_LEFT
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "A. Dux"
|
default "A. Dux"
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
9
app/boards/shields/bat43/Kconfig.defconfig
Normal file
9
app/boards/shields/bat43/Kconfig.defconfig
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if SHIELD_BAT43
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "Bat43"
|
||||||
|
|
||||||
|
endif
|
5
app/boards/shields/bat43/Kconfig.shield
Normal file
5
app/boards/shields/bat43/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config SHIELD_BAT43
|
||||||
|
def_bool $(shields_list_contains,bat43)
|
50
app/boards/shields/bat43/bat43.keymap
Normal file
50
app/boards/shields/bat43/bat43.keymap
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 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/outputs.h>
|
||||||
|
|
||||||
|
#define LOWER 1
|
||||||
|
#define RAISE 2
|
||||||
|
|
||||||
|
#define L_SPC < LOWER SPACE
|
||||||
|
#define R_RET < RAISE RET
|
||||||
|
|
||||||
|
/ {
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS
|
||||||
|
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp BSPC &kp H &kp J &kp K &kp L &kp SEMI &kp RSHFT
|
||||||
|
&kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL
|
||||||
|
&kp LGUI &kp LANG2 L_SPC R_RET &kp LANG1 &kp RALT
|
||||||
|
&bt BT_CLR &out OUT_TOG &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
lower_layer {
|
||||||
|
bindings = <
|
||||||
|
&trans &none &none &none &none &none &none &kp EQUAL &kp PLUS &kp STAR &kp PRCNT &trans
|
||||||
|
&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &trans
|
||||||
|
&trans &none &none &none &none &none &none &none &trans &trans &trans &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
raise_layer {
|
||||||
|
bindings = <
|
||||||
|
&trans &kp BSLH &kp EXCL &kp AMPS &kp PIPE &none &none &kp EQUAL &kp PLUS &kp STAR &kp PRCNT &trans
|
||||||
|
&trans &kp HASH &kp GRAVE &kp DQT &kp SQT &kp TILDE &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp DLLR &trans
|
||||||
|
&trans &none &none &kp LBRC &kp LBKT &kp LPAR &kp RPAR &kp RBKT &kp RBRC &kp AT &kp CARET &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
54
app/boards/shields/bat43/bat43.overlay
Normal file
54
app/boards/shields/bat43/bat43.overlay
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 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 = <6>;
|
||||||
|
rows = <7>;
|
||||||
|
|
||||||
|
map = <
|
||||||
|
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
|
||||||
|
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(3,0) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
|
||||||
|
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) RC(6,5)
|
||||||
|
RC(3,3) RC(3,4) RC(3,5) RC(7,0) RC(7,1) RC(7,2)
|
||||||
|
RC(7,5) RC(7,4) RC(7,3) RC(3,1) RC(3,2)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan0: kscan_0 {
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
label = "KSCAN";
|
||||||
|
diode-direction = "col2row";
|
||||||
|
|
||||||
|
col-gpios
|
||||||
|
= <&pro_micro 10 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 16 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 14 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 15 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 9 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 8 GPIO_ACTIVE_HIGH>
|
||||||
|
;
|
||||||
|
|
||||||
|
row-gpios
|
||||||
|
= <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 4 (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 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
, <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
8
app/boards/shields/bat43/bat43.zmk.yml
Normal file
8
app/boards/shields/bat43/bat43.zmk.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: bat43
|
||||||
|
name: BAT43
|
||||||
|
type: shield
|
||||||
|
url: https://kbd.dailycraft.jp/bat43/
|
||||||
|
requires: [pro_micro]
|
||||||
|
features:
|
||||||
|
- keys
|
|
@ -6,7 +6,7 @@ if SHIELD_BFO9000_LEFT
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "BFO-9000"
|
default "BFO-9000"
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
&spi1 {
|
&spi1 {
|
||||||
compatible = "nordic,nrf-spim";
|
compatible = "nordic,nrf-spim";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
@ -18,6 +20,8 @@
|
||||||
chain-length = <14>; /* arbitrary; change at will */
|
chain-length = <14>; /* arbitrary; change at will */
|
||||||
spi-one-frame = <0x70>;
|
spi-one-frame = <0x70>;
|
||||||
spi-zero-frame = <0x40>;
|
spi-zero-frame = <0x40>;
|
||||||
|
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
&spi1 {
|
&spi1 {
|
||||||
compatible = "nordic,nrf-spim";
|
compatible = "nordic,nrf-spim";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
@ -18,6 +20,8 @@
|
||||||
chain-length = <14>; /* arbitrary; change at will */
|
chain-length = <14>; /* arbitrary; change at will */
|
||||||
spi-one-frame = <0x70>;
|
spi-one-frame = <0x70>;
|
||||||
spi-zero-frame = <0x40>;
|
spi-zero-frame = <0x40>;
|
||||||
|
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ if SHIELD_CLOG_LEFT
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "Clog"
|
default "Clog"
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -3,7 +3,7 @@ if SHIELD_CORNE_LEFT
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "Corne"
|
default "Corne"
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
&spi1 {
|
&spi1 {
|
||||||
compatible = "nordic,nrf-spim";
|
compatible = "nordic,nrf-spim";
|
||||||
/* Cannot be used together with i2c0. */
|
/* Cannot be used together with i2c0. */
|
||||||
|
@ -19,6 +21,8 @@
|
||||||
chain-length = <6>; /* There are per-key RGB, but the first 6 are underglow */
|
chain-length = <6>; /* There are per-key RGB, but the first 6 are underglow */
|
||||||
spi-one-frame = <0x70>;
|
spi-one-frame = <0x70>;
|
||||||
spi-zero-frame = <0x40>;
|
spi-zero-frame = <0x40>;
|
||||||
|
|
||||||
|
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
chosen {
|
chosen {
|
||||||
|
zephyr,display = &oled;
|
||||||
zmk,kscan = &kscan0;
|
zmk,kscan = &kscan0;
|
||||||
zmk,matrix_transform = &default_transform;
|
zmk,matrix_transform = &default_transform;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,7 @@ if SHIELD_CRADIO_LEFT
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "Cradio"
|
default "Cradio"
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
55
app/boards/shields/elephant42/Kconfig.defconfig
Normal file
55
app/boards/shields/elephant42/Kconfig.defconfig
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if SHIELD_ELEPHANT42_LEFT
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "Elephant42"
|
||||||
|
|
||||||
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
if SHIELD_ELEPHANT42_LEFT || SHIELD_ELEPHANT42_RIGHT
|
||||||
|
|
||||||
|
config ZMK_SPLIT
|
||||||
|
default y
|
||||||
|
|
||||||
|
if ZMK_DISPLAY
|
||||||
|
|
||||||
|
config I2C
|
||||||
|
default y
|
||||||
|
|
||||||
|
config SSD1306
|
||||||
|
default y
|
||||||
|
|
||||||
|
config SSD1306_REVERSE_MODE
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # ZMK_DISPLAY
|
||||||
|
|
||||||
|
if LVGL
|
||||||
|
|
||||||
|
config LVGL_HOR_RES_MAX
|
||||||
|
default 128
|
||||||
|
|
||||||
|
config LVGL_VER_RES_MAX
|
||||||
|
default 32
|
||||||
|
|
||||||
|
config LVGL_VDB_SIZE
|
||||||
|
default 64
|
||||||
|
|
||||||
|
config LVGL_DPI
|
||||||
|
default 148
|
||||||
|
|
||||||
|
config LVGL_BITS_PER_PIXEL
|
||||||
|
default 1
|
||||||
|
|
||||||
|
choice LVGL_COLOR_DEPTH
|
||||||
|
default LVGL_COLOR_DEPTH_1
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
endif # LVGL
|
||||||
|
|
||||||
|
endif
|
8
app/boards/shields/elephant42/Kconfig.shield
Normal file
8
app/boards/shields/elephant42/Kconfig.shield
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config SHIELD_ELEPHANT42_LEFT
|
||||||
|
def_bool $(shields_list_contains,elephant42_left)
|
||||||
|
|
||||||
|
config SHIELD_ELEPHANT42_RIGHT
|
||||||
|
def_bool $(shields_list_contains,elephant42_right)
|
32
app/boards/shields/elephant42/boards/nice_nano_v2.overlay
Normal file
32
app/boards/shields/elephant42/boards/nice_nano_v2.overlay
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#include <dt-bindings/led/led.h>
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
/* Cannot be used together with i2c0. */
|
||||||
|
status = "okay";
|
||||||
|
mosi-pin = <6>;
|
||||||
|
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
|
||||||
|
sck-pin = <5>;
|
||||||
|
miso-pin = <7>;
|
||||||
|
|
||||||
|
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 = <27>; /* There are per-key RGB and the LAST 6 are underglow */
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
6
app/boards/shields/elephant42/elephant42.conf
Normal file
6
app/boards/shields/elephant42/elephant42.conf
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Uncomment the following lines to enable the Elephant42 RGB Underglow
|
||||||
|
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||||
|
# CONFIG_WS2812_STRIP=y
|
||||||
|
|
||||||
|
# Uncomment the following line to enable the Elephant42 OLED Display
|
||||||
|
# CONFIG_ZMK_DISPLAY=y
|
60
app/boards/shields/elephant42/elephant42.dtsi
Normal file
60
app/boards/shields/elephant42/elephant42.dtsi
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 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 = <12>;
|
||||||
|
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(0,9) RC(0,10) RC(0,11)
|
||||||
|
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(1,10) RC(1,11)
|
||||||
|
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(2,10)
|
||||||
|
RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan0: kscan {
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
label = "KSCAN";
|
||||||
|
|
||||||
|
diode-direction = "col2row";
|
||||||
|
row-gpios
|
||||||
|
= <&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_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>;
|
||||||
|
segment-remap;
|
||||||
|
com-invdir;
|
||||||
|
com-sequential;
|
||||||
|
prechargep = <0x22>;
|
||||||
|
};
|
||||||
|
};
|
55
app/boards/shields/elephant42/elephant42.keymap
Normal file
55
app/boards/shields/elephant42/elephant42.keymap
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 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/outputs.h>
|
||||||
|
|
||||||
|
#define LOWR 1
|
||||||
|
#define RAIS 2
|
||||||
|
#define ADJT 3
|
||||||
|
|
||||||
|
/ {
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
< ADJT ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp DEL
|
||||||
|
&mt LCTRL TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
||||||
|
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH
|
||||||
|
&kp LSHFT &mo LOWR &kp LGUI &kp BSPC &kp SPACE &kp ENTER &mo RAIS &kp LALT
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
lower {
|
||||||
|
bindings = <
|
||||||
|
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp C_PLAY_PAUSE
|
||||||
|
&trans &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
|
||||||
|
&trans &trans &trans &trans &kp LBKT &kp RBKT &trans &trans &trans &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
raise {
|
||||||
|
bindings = <
|
||||||
|
&kp TILDE &trans &trans &trans &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp C_PLAY_PAUSE
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp BSLH
|
||||||
|
&trans &trans &trans &trans &kp LBKT &kp RBKT &trans &trans &trans &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
adjust {
|
||||||
|
bindings = <
|
||||||
|
&trans &bt BT_NXT &bt BT_PRV &trans &trans &bt BT_CLR &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
|
||||||
|
&out OUT_TOG &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
14
app/boards/shields/elephant42/elephant42.zmk.yml
Normal file
14
app/boards/shields/elephant42/elephant42.zmk.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: elephant42
|
||||||
|
name: Elephant42
|
||||||
|
type: shield
|
||||||
|
url: https://github.com/illness072/elephant42
|
||||||
|
requires: [pro_micro]
|
||||||
|
exposes: [i2c_oled]
|
||||||
|
features:
|
||||||
|
- keys
|
||||||
|
- display
|
||||||
|
- underglow
|
||||||
|
siblings:
|
||||||
|
- elephant42_left
|
||||||
|
- elephant42_right
|
18
app/boards/shields/elephant42/elephant42_left.overlay
Normal file
18
app/boards/shields/elephant42/elephant42_left.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "elephant42.dtsi"
|
||||||
|
|
||||||
|
&kscan0 {
|
||||||
|
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>
|
||||||
|
;
|
||||||
|
};
|
22
app/boards/shields/elephant42/elephant42_right.overlay
Normal file
22
app/boards/shields/elephant42/elephant42_right.overlay
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "elephant42.dtsi"
|
||||||
|
|
||||||
|
&default_transform {
|
||||||
|
col-offset = <6>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&kscan0 {
|
||||||
|
col-gpios
|
||||||
|
= <&pro_micro 14 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 15 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 18 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 20 GPIO_ACTIVE_HIGH>
|
||||||
|
, <&pro_micro 21 GPIO_ACTIVE_HIGH>
|
||||||
|
;
|
||||||
|
};
|
|
@ -6,7 +6,7 @@ if SHIELD_ERGODASH_LEFT
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "Ergodash"
|
default "Ergodash"
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -7,7 +7,7 @@ if SHIELD_FOURIER_LEFT
|
||||||
config ZMK_KEYBOARD_NAME
|
config ZMK_KEYBOARD_NAME
|
||||||
default "Fourier"
|
default "Fourier"
|
||||||
|
|
||||||
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue