Skip to content
This repository was archived by the owner on Jun 4, 2026. It is now read-only.

Commit 25e8804

Browse files
committed
update c2usb to use CPM and west for dependency management
1 parent 5e673a9 commit 25e8804

8 files changed

Lines changed: 16 additions & 73 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ if(NOT CONFIG_DEBUG)
33
add_definitions(-DNDEBUG)
44
endif()
55

6+
# Use a shared CPM cache for the west workspace
7+
set(CPM_SOURCE_CACHE "${CMAKE_CURRENT_LIST_DIR}/../modules/cpm" PARENT_SCOPE)
8+
69
add_subdirectory(lib)

ble-keyboard/src/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
#include "simple_keyboard.hpp"
1313
#include <port/zephyr/bluetooth/hid.hpp>
1414
#include <port/zephyr/bluetooth/le.hpp>
15-
#include <port/zephyr/message_queue.hpp>
1615
#include <raw_to_hex_string.hpp>
1716
#include <usb/df/message.hpp>
17+
#include <zephyr/message_queue.hpp>
1818

1919
LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);
2020

@@ -53,7 +53,7 @@ static int advertise(void)
5353

5454
auto& pairing_msgq()
5555
{
56-
static os::zephyr::message_queue_instance<::bt_conn*, CONFIG_BT_MAX_CONN> msgq;
56+
static zephyr::message_queue_instance<::bt_conn*, CONFIG_BT_MAX_CONN> msgq;
5757
return msgq;
5858
}
5959

@@ -232,7 +232,7 @@ static auto& hog_service()
232232

233233
auto& kb_msgq()
234234
{
235-
static os::zephyr::message_queue_instance<input_event, 2> msgq;
235+
static zephyr::message_queue_instance<input_event, 2> msgq;
236236
return msgq;
237237
}
238238

patches/zephyr/0001-west-sysbuild-allows-using-application-cmake-presets.patch

Lines changed: 0 additions & 62 deletions
This file was deleted.

scripts/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
west
2+
GitPython

usb-keyboard/src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
#include <zephyr/input/input.h>
44
#include <zephyr/logging/log.h>
55

6-
#include <port/zephyr/message_queue.hpp>
76
#include <port/zephyr/udc_mac.hpp>
87
#include <simple_keyboard.hpp>
98
#include <usb/df/class/hid.hpp>
109
#include <usb/df/device.hpp>
10+
#include <zephyr/message_queue.hpp>
1111

1212
LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);
1313

1414
using namespace magic_enum::bitwise_operators;
1515

1616
auto& kb_msgq()
1717
{
18-
static os::zephyr::message_queue_instance<input_event, 2> msgq;
18+
static zephyr::message_queue_instance<input_event, 2> msgq;
1919
return msgq;
2020
}
2121

usb-mouse/src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
#include <high_resolution_mouse.hpp>
77
#include <magic_enum.hpp>
8-
#include <port/zephyr/message_queue.hpp>
98
#include <port/zephyr/udc_mac.hpp>
109
#include <usb/df/class/hid.hpp>
1110
#include <usb/df/device.hpp>
11+
#include <zephyr/message_queue.hpp>
1212

1313
LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);
1414

@@ -20,7 +20,7 @@ struct kb_event
2020

2121
auto& kb_msgq()
2222
{
23-
static os::zephyr::message_queue_instance<kb_event, 2> msgq;
23+
static zephyr::message_queue_instance<kb_event, 2> msgq;
2424
return msgq;
2525
}
2626

usb-shell/src/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <hid/app/mouse.hpp>
66
#include <hid/application.hpp>
77
#include <magic_enum.hpp>
8-
#include <port/zephyr/message_queue.hpp>
98
#include <port/zephyr/udc_mac.hpp>
109
#include <port/zephyr/usb_shell.hpp>
1110
#include <usb/df/device.hpp>

west.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ manifest:
1616
projects:
1717
- name: c2usb
1818
remote: IntergatedCircuits
19-
revision: 988d8ad7fc615d9f9d3d73c9af60fa8c0410480e
20-
submodules: true
19+
revision: 6874aa02d3a45cdc3b0ceec7ed312f12a8e85a12
20+
import: true
21+
2122
- name: nrf
2223
repo-path: sdk-nrf
2324
remote: nrfconnect
24-
revision: v3.1.0
25+
revision: v3.2.1
2526
clone-depth: 1
2627
import:
2728
# By using name-allowlist we can clone only the modules that are

0 commit comments

Comments
 (0)