Skip to content

Commit

Permalink
Change to chosen definition
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFil committed Aug 15, 2023
1 parent ad2b2cd commit b5bce10
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/boards/arm/bt60/bt60.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
zephyr,flash = &flash0;
zmk,kscan = &kscan0;
zephyr,console = &cdc_acm_uart;
zmk,trackpad = &trackpad;

};

Expand Down
2 changes: 1 addition & 1 deletion app/boards/arm/bt60/bt60_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CONFIG_ZMK_TRACKPAD_LOGICAL_Y=1200
CONFIG_I2C=y
CONFIG_GEN4=y
CONFIG_GEN4_TRIGGER_GLOBAL_THREAD=y
#CONFIG_SENSOR_LOG_LEVEL_DBG=y
CONFIG_SENSOR_LOG_LEVEL_DBG=y

CONFIG_USE_DT_CODE_PARTITION=y

Expand Down
2 changes: 2 additions & 0 deletions app/src/hog.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ static struct hids_report consumer_input = {
.type = HIDS_INPUT,
};

#if IS_ENABLED(CONFIG_ZMK_TRACKPAD)
static struct hids_report trackpad_report = {
.id = ZMK_REPORT_ID_TRACKPAD,
.type = HIDS_INPUT,
Expand All @@ -80,6 +81,7 @@ static struct hids_report trackpad_selective = {
.id = ZMK_REPORT_ID_FEATURE_PTP_SELECTIVE,
.type = HIDS_FEATURE,
};
#endif

static bool host_requests_notification = false;
static uint8_t ctrl_point;
Expand Down
5 changes: 4 additions & 1 deletion app/src/trackpad.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);

const struct device *trackpad = DEVICE_DT_GET(DT_INST(0, cirque_gen4));
BUILD_ASSERT(DT_HAS_CHOSEN(zmk_trackpad),
"CONFIG_ZMK_TRACKPAD is enabled but no zmk,trackpad chosen node found");

const struct device *trackpad = DEVICE_DT_GET(DT_CHOSEN(zmk_trackpad));

static zmk_trackpad_finger_contacts_t present_contacts = 0;
static zmk_trackpad_finger_contacts_t contacts_to_send = 0;
Expand Down

0 comments on commit b5bce10

Please sign in to comment.