added duck folder to shields
This commit is contained in:
parent
2233f457b2
commit
12407a697e
9 changed files with 248 additions and 0 deletions
65
app/boards/shields/duck/CMakeCache.txt
Normal file
65
app/boards/shields/duck/CMakeCache.txt
Normal file
|
@ -0,0 +1,65 @@
|
|||
# This is the CMakeCache file.
|
||||
# For build in directory: /home/jackhartstein/zmk/app/boards/shields/duck
|
||||
# It was generated by CMake: /usr/local/bin/cmake
|
||||
# You can edit this file to change values found and used by cmake.
|
||||
# If you do not want to change any of the values, simply exit the editor.
|
||||
# If you do want to change a value, simply edit, save, and exit the editor.
|
||||
# The syntax for the file is as follows:
|
||||
# KEY:TYPE=VALUE
|
||||
# KEY is the name of a variable in the cache.
|
||||
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
|
||||
# VALUE is the current value for the KEY.
|
||||
|
||||
########################
|
||||
# EXTERNAL cache entries
|
||||
########################
|
||||
|
||||
//No help, variable specified on the command line.
|
||||
BOARD:UNINITIALIZED=nice_nano
|
||||
|
||||
//Path to a file.
|
||||
BOARD_DIR:PATH=/home/jackhartstein/zmk/app/boards/arm/nice_nano
|
||||
|
||||
//Selected user ZMK config
|
||||
CACHED_ZMK_CONFIG:STRING=
|
||||
|
||||
//No help, variable specified on the command line.
|
||||
WEST_PYTHON:UNINITIALIZED=/usr/bin/python3
|
||||
|
||||
|
||||
########################
|
||||
# INTERNAL cache entries
|
||||
########################
|
||||
|
||||
//This is the directory where this CMakeCache.txt was created
|
||||
CMAKE_CACHEFILE_DIR:INTERNAL=/home/jackhartstein/zmk/app/boards/shields/duck
|
||||
//Major version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
|
||||
//Minor version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MINOR_VERSION:INTERNAL=19
|
||||
//Patch version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_PATCH_VERSION:INTERNAL=2
|
||||
//Path to CMake executable.
|
||||
CMAKE_COMMAND:INTERNAL=/usr/local/bin/cmake
|
||||
//Path to cpack program executable.
|
||||
CMAKE_CPACK_COMMAND:INTERNAL=/usr/local/bin/cpack
|
||||
//Path to ctest program executable.
|
||||
CMAKE_CTEST_COMMAND:INTERNAL=/usr/local/bin/ctest
|
||||
//Name of external makefile project generator.
|
||||
CMAKE_EXTRA_GENERATOR:INTERNAL=
|
||||
//Name of generator.
|
||||
CMAKE_GENERATOR:INTERNAL=Ninja
|
||||
//Generator instance identifier.
|
||||
CMAKE_GENERATOR_INSTANCE:INTERNAL=
|
||||
//Name of generator platform.
|
||||
CMAKE_GENERATOR_PLATFORM:INTERNAL=
|
||||
//Name of generator toolset.
|
||||
CMAKE_GENERATOR_TOOLSET:INTERNAL=
|
||||
//Source directory with the top level CMakeLists.txt file for this
|
||||
// project
|
||||
CMAKE_HOME_DIRECTORY:INTERNAL=/home/jackhartstein/zmk/app
|
||||
//number of local generators
|
||||
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
|
||||
//Path to CMake installation.
|
||||
CMAKE_ROOT:INTERNAL=/usr/local/share/cmake-3.19
|
||||
|
1
app/boards/shields/duck/CMakeFiles/cmake.check_cache
Normal file
1
app/boards/shields/duck/CMakeFiles/cmake.check_cache
Normal file
|
@ -0,0 +1 @@
|
|||
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
|
11
app/boards/shields/duck/Kconfig.defconfig
Normal file
11
app/boards/shields/duck/Kconfig.defconfig
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Copyright (c) 2020 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
# Author: Jack Hartstein
|
||||
|
||||
if SHIELD_DUCK
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "duck"
|
||||
|
||||
endif
|
7
app/boards/shields/duck/Kconfig.shield
Normal file
7
app/boards/shields/duck/Kconfig.shield
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Copyright (c) 2020 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
# Author: Jack Hartstein
|
||||
|
||||
config SHIELD_DUCK
|
||||
def_bool $(shields_list_contains, duck)
|
35
app/boards/shields/duck/boards/nice_nano.overlay
Normal file
35
app/boards/shields/duck/boards/nice_nano.overlay
Normal file
|
@ -0,0 +1,35 @@
|
|||
/* Copyright (c) 2020 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Author: Jack Hartstein
|
||||
* Last Edited: Dec 20 2020
|
||||
*/
|
||||
|
||||
&spi1 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
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 = <8>; /* arbitrary; change at will */
|
||||
spi-one-frame = <0x70>;
|
||||
spi-zero-frame = <0x40>;
|
||||
};
|
||||
};
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,underglow = &led_strip;
|
||||
};
|
||||
};
|
13
app/boards/shields/duck/duck.conf
Normal file
13
app/boards/shields/duck/duck.conf
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Copyright (c) 2020 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
# Author: Jack Hartstein
|
||||
|
||||
# Enable Encoders
|
||||
CONFIG_EC11=y
|
||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||
|
||||
# Enable underglow
|
||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
# Use the STRIP config specific to the LEDs you're using
|
||||
CONFIG_WS2812_STRIP=y
|
19
app/boards/shields/duck/duck.dtsi
Normal file
19
app/boards/shields/duck/duck.dtsi
Normal file
|
@ -0,0 +1,19 @@
|
|||
/* Copyright (c) 2020 The ZMK Contributors
|
||||
* SPDX-License-Identitfier: MIT
|
||||
*
|
||||
* Author: Jack Hartstein
|
||||
*/
|
||||
/ {
|
||||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <2>;
|
||||
};
|
||||
|
||||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder>;
|
||||
};
|
||||
};
|
56
app/boards/shields/duck/duck.keymap
Normal file
56
app/boards/shields/duck/duck.keymap
Normal file
|
@ -0,0 +1,56 @@
|
|||
/* Copyright (c) 2020 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Author: Jack Hartstein
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/ext_power.h>
|
||||
|
||||
#define DEFAULT 0
|
||||
#define FUNC 1
|
||||
#define RGB_BT 2
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
bindings = <
|
||||
&tog FUNC &kp KP_SLASH &kp KP_ASTERISK &kp KP_MINUS
|
||||
&kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_PLUS
|
||||
&kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &none
|
||||
&kp K_MUTE &kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 &kp KP_ENTER
|
||||
&ext_power EP_TOG &none &kp KP_NUMBER_0 &kp KP_DOT &none
|
||||
>;
|
||||
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
|
||||
func_layer {
|
||||
bindings = <
|
||||
&tog RGB_BT &trans &trans &trans
|
||||
&kp HOME &kp UP &kp PG_UP &trans
|
||||
&kp LEFT &none &kp RIGHT &none
|
||||
&trans &kp END &kp DOWN &kp PG_DN &trans
|
||||
&trans &none &kp INS &kp DEL &none
|
||||
>;
|
||||
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
|
||||
rgb_bt_layer {
|
||||
bindings = <
|
||||
&tog DEFAULT &rgb_ug RGB_TOG &rgb_ug RGB_EFF &none
|
||||
&rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &none
|
||||
&rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &none
|
||||
&bootloader &none &bt BT_CLR &bt BT_NXT &none
|
||||
&trans &none &none &bt BT_PRV &none
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
};
|
||||
};
|
41
app/boards/shields/duck/duck.overlay
Normal file
41
app/boards/shields/duck/duck.overlay
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Author: Jack Hartstein
|
||||
*/
|
||||
|
||||
#include "duck.dtsi"
|
||||
|
||||
/ {
|
||||
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
};
|
||||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
diode-direction = "col2row";
|
||||
|
||||
row-gpios
|
||||
= <&pro_micro_d 5 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 6 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 7 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 8 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 9 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
|
||||
col-gpios
|
||||
= <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 16 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 10 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
&left_encoder {
|
||||
status = "okay";
|
||||
};
|
Loading…
Add table
Reference in a new issue