Skip to content
Draft
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion device/.vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"cppStandard": "gnu++20",
"configurationProvider": "nordic-semiconductor.nrf-connect",
"browse": {
"limitSymbolsToIncludedHeaders": true
"limitSymbolsToIncludedHeaders": true,
"path": [
"${workspaceFolder}/src/**"
]
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion device/prj.conf.overlays/ble_hid.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CONFIG_BT_KEYS_SAVE_AGING_COUNTER_ON_PAIRING=y
CONFIG_BT_MAX_PAIRED=20

# use BLE HID over GATT from c2usb
CONFIG_C2USB_BLUETOOTH=y
CONFIG_C2USB_HOGP=y
CONFIG_C2USB_HOGP_LOG_LEVEL_DBG=y
# battery status to generic client
CONFIG_BT_BAS=y
Expand Down
1 change: 1 addition & 0 deletions device/prj.conf.overlays/c2usb.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CONFIG_C2USB_UDC_MAC_LOG_LEVEL_DBG=y

CONFIG_WARN_EXPERIMENTAL=n

CONFIG_C2USB_HID_BOOT_PROTOCOL=y
CONFIG_C2USB_UDC_MAC=y

# Apply config requires deep stack, and since Agent expects response code,
Expand Down
5 changes: 5 additions & 0 deletions device/src/bt_conn.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
#define BLE_ADDR_LEN 6
#define BLE_KEY_LEN 16

// Holds each host peer's c2usb ble_session (~144 B); size checked in transport_ble.cpp.
#define BLE_HID_SESSION_STORAGE_SIZE 160


// Typedefs:

Expand All @@ -46,6 +49,8 @@
struct bt_conn* conn;
uint32_t lastSwitchover;
uint32_t bleReportIntervalMs;
bool hidSessionActive;
uint8_t hidSessionStorage[BLE_HID_SESSION_STORAGE_SIZE] __attribute__((aligned(8)));
} peer_t;

typedef enum {
Expand Down
14 changes: 0 additions & 14 deletions device/src/bt_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ void BtManager_StartBt() {
return;
}

if (DEVICE_IS_UHK80_RIGHT) {
if (HOGP_Enable()) {
LOG_INF("HOGP service enabled successfully");
} else {
LOG_ERR("Failed to enable HOGP service");
}
}

BtManager_StartScanningAndAdvertising();
}

Expand Down Expand Up @@ -103,12 +95,6 @@ void BtManager_StopBt() {

k_sleep(K_MSEC(10));


if (DEVICE_IS_UHK80_RIGHT) {
LOG_WRN("Disabling HOGP service.");
HOGP_Disable();
}

BtAdvertise_DisableAdvertisingIcon();

LOG_INF("OOB: Bluetooth stopped");
Expand Down
5 changes: 4 additions & 1 deletion device/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ void mainRuntime(void) {

}

#if DEVICE_IS_UHK80_RIGHT
HOGP_Register(); // must be before bt_enable() registers static GATT services
#endif

bt_enable(NULL); // has to be before InitSettings

// has to be after bt_enable; has to be before ApplyConfig
Expand Down Expand Up @@ -250,7 +254,6 @@ void mainRuntime(void) {

// 6.6mA

HID_SetGamepadActive(false);
USB_Enable(); // +2.2mA, 8.8mA; has to be after USB_SetSerialNumber

// 8.8mA
Expand Down
12 changes: 10 additions & 2 deletions nrfsdk.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
"path": "."
},
{
"name": "workspace",
"path": ".."
"path": "../zephyr"
},
{
"path": "../c2usb/c2usb"
},
{
"path": "../modules/lib/hid-rp/hid-rp"
}
],
"settings": {
Expand All @@ -33,6 +38,9 @@
"*.hpp": "cpp",
"*.cpp": "cpp"
},
"C_Cpp.files.exclude": {
"${workspaceFolder:c2usb}/c2usb/**/*.test.cpp": true
},
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"C_Cpp.workspaceParsingPriority": "high",
"C_Cpp.autoAddFileAssociations": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
From 2c8942648651f955bba2990e92354b04a46e07b7 Mon Sep 17 00:00:00 2001
From c1aa6de8d459d59d6903943f9fcd540ca535604e Mon Sep 17 00:00:00 2001
From: Benedek Kupper <kupper.benedek@gmail.com>
Date: Mon, 23 Feb 2026 20:03:41 +0100
Date: Fri, 10 Jul 2026 16:19:13 +0200
Subject: [PATCH] cmake: don't flush top-level compiler flags

This was preventing CMAKE_C_FLAGS_RELEASE and similar from being set in the presets.

---
cmake/extension/mcux.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
cmake/extension/mcux.cmake | 1 -
1 file changed, 1 deletion(-)

diff --git a/cmake/extension/mcux.cmake b/cmake/extension/mcux.cmake
index db62e4e..8b2b203 100644
index 57c92ef5..5607bace 100644
--- a/cmake/extension/mcux.cmake
+++ b/cmake/extension/mcux.cmake
@@ -71,7 +71,7 @@ macro(project project_name)
# valiate compiler version
# The reason to validate compiler version here is that cmake engine code will get CMAKE_C_COMPILER_VERSION and CMAKE_CXX_COMPILER_VERSION just in "project" macro invocation.
_validate_compiler_version()
@@ -133,7 +133,6 @@ macro(project project_name)
if(NOT (DEFINED MCUX_SKIP_COMPILER_CHECKS AND MCUX_SKIP_COMPILER_CHECKS))
_validate_compiler_version()
endif()
- clear_default_added_compiler_flags()
+
# parse arguments
set(options NO_DEFAULT_CONFIG)
set(single_value PROJECT_BOARD_PORT_PATH PROJECT_DEVICE_PORT_PATH PROJECT_TYPE CUSTOM_LINKER)
Expand Down
76 changes: 0 additions & 76 deletions patches/core/0005-cmake-set-_IS_TOP_LEVEL-project-variables.patch

This file was deleted.

Loading
Loading