Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions app/src/endpoints.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,20 @@ static int zmk_endpoints_init(const struct device *_arg) {
nrf_power_resetreas_clear(NRF_POWER, POWER_RESETREAS_RESETPIN_Msk);
}

uint8_t type = nrf_power_gpregret_get(NRF_POWER);
switch (type) {
case REBOOT_ENDPOINT_BLE:
preferred_transport = ZMK_TRANSPORT_BLE;
break;
case REBOOT_ENDPOINT_24G:
preferred_transport = ZMK_TRANSPORT_24G;
break;
default:
preferred_transport = ZMK_TRANSPORT_USB; // safe default
break;
}

update_current_endpoint();
current_instance.transport =ZMK_TRANSPORT_NONE;//ZMK_TRANSPORT_USB;

return 0;
Expand Down