zmk/app/CMakeLists.txt
Kurtis Lew 2a518d1861 feat(behavior) Add Tap-Dance (2022)
Updated Tap-Dances to enable hold functionality

Update Documentation
- Edited for clarity and added Images

Uploaded New Tests

Updates according to test results of PR#1139

Docs edits based on @petejohanson's first review

Update behavior_tap_dance.c

- Removed `behavior_tap_dance_data{}` and associated lines
- Changed `new_tap_dance` of type `static struct active_tap_dance *` to type `static int`
- Changed logic of `new_tap_dance`
- Changed behavior_count of type `int` to type `size_t`

Update behavior_tap_dance.c

Updates according to test results of PR#1139

Update behavior_tap_dance.c

Update Documentation

Attempting to debug tap-dances interrupted by tap-dances

Update tests

Further updates

commit 26eeeccbc69b1bcb4a5d48fe858cdd8917e118ba
Author: Kurtis Lew <kurtis.a.lew@gmail.com>
Date:   Fri Feb 25 15:45:34 2022 -0800

    Attempting to debug tap-dances interrupted by tap-dances

    Update tests

commit a64fb2639ce8c0ca628e1924122b920e95582d43
Author: Kurtis Lew <kurtis.a.lew@gmail.com>
Date:   Sun Feb 20 19:30:59 2022 -0800

    feat(behavior) Add Tap-Dance (2022)

    Updated Tap-Dances to enable hold functionality

    Update Documentation
    - Edited for clarity and added Images

    Uploaded New Tests

    Updates according to test results of PR#1139

    Docs edits based on @petejohanson's first review

    Update behavior_tap_dance.c

    - Removed `behavior_tap_dance_data{}` and associated lines
    - Changed `new_tap_dance` of type `static struct active_tap_dance *` to type `static int`
    - Changed logic of `new_tap_dance`
    - Changed behavior_count of type `int` to type `size_t`

    Update behavior_tap_dance.c

    Updates according to test results of PR#1139

    Update behavior_tap_dance.c

    Update Documentation

Further updates

- Tap-dances can be interrupted by another tap-dance without memory leakage
- Confirmed functionality of tap-dances with only one keybind

Single-keybind hold tests

Further updates

commit 26eeeccbc69b1bcb4a5d48fe858cdd8917e118ba
Author: Kurtis Lew <kurtis.a.lew@gmail.com>
Date:   Fri Feb 25 15:45:34 2022 -0800

    Attempting to debug tap-dances interrupted by tap-dances

    Update tests

commit a64fb2639ce8c0ca628e1924122b920e95582d43
Author: Kurtis Lew <kurtis.a.lew@gmail.com>
Date:   Sun Feb 20 19:30:59 2022 -0800

    feat(behavior) Add Tap-Dance (2022)

    Updated Tap-Dances to enable hold functionality

    Update Documentation
    - Edited for clarity and added Images

    Uploaded New Tests

    Updates according to test results of PR#1139

    Docs edits based on @petejohanson's first review

    Update behavior_tap_dance.c

    - Removed `behavior_tap_dance_data{}` and associated lines
    - Changed `new_tap_dance` of type `static struct active_tap_dance *` to type `static int`
    - Changed logic of `new_tap_dance`
    - Changed behavior_count of type `int` to type `size_t`

    Update behavior_tap_dance.c

    Updates according to test results of PR#1139

    Update behavior_tap_dance.c

    Update Documentation

Further updates

- Tap-dances can be interrupted by another tap-dance without memory leakage
- Confirmed functionality of tap-dances with only one keybind

Fix tap-dances ability to be interrupted by other tap-dances

Update tests

Remove unecessary tests

Update tests

Update behavior_tap_dance.c

Further cleanup to comments and logging

Update behavior_tap_dance.c

Update tap-dance.md
2022-03-14 13:45:10 -07:00

89 lines
4.4 KiB
CMake

cmake_minimum_required(VERSION 3.13.1)
set(CONFIG_APPLICATION_DEFINED_SYSCALL true)
list(APPEND BOARD_ROOT ${CMAKE_SOURCE_DIR})
list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR})
# Add our custom Zephyr module for drivers w/ syscalls, etc.
list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR}/drivers/zephyr)
list(APPEND ZEPHYR_EXTRA_MODULES
${CMAKE_CURRENT_SOURCE_DIR}/drivers
)
include(cmake/zmk_config.cmake)
# Find Zephyr. This also loads Zephyr's build system.
find_package(Zephyr REQUIRED HINTS ../zephyr)
project(zmk)
zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
# Add your source file to the "app" target. This must come after
# find_package(Zephyr) which defines the target.
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/activity.c)
target_sources(app PRIVATE src/kscan.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_ifdef(CONFIG_ZMK_WPM app PRIVATE src/wpm.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(app PRIVATE src/events/activity_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_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_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_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)
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_sticky_key.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_momentary_layer.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_tap_dance.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_transparent.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/combo.c)
target_sources(app PRIVATE src/conditional_layer.c)
target_sources(app PRIVATE src/keymap.c)
endif()
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_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/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(app PRIVATE src/split/bluetooth/service.c)
endif()
if (CONFIG_ZMK_SPLIT_BLE AND CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
target_sources(app PRIVATE src/split/bluetooth/central.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_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)
add_subdirectory(src/display/)
zephyr_cc_option(-Wfatal-errors)