Skip to content

Commit e547538

Browse files
committed
enable hil dual for metro m4 with max3421
1 parent c2924c5 commit e547538

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

examples/host/device_info/src/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void init_freertos_task(void);
8181
//--------------------------------------------------------------------
8282
// Main
8383
//--------------------------------------------------------------------
84-
void init_tinyusb(void) {
84+
static void init_tinyusb(void) {
8585
// init host stack on configured roothub port
8686
tusb_rhport_init_t host_init = {
8787
.role = TUSB_ROLE_HOST,

src/host/usbh.h

+3-6
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ bool tuh_inited(void);
155155
void tuh_task_ext(uint32_t timeout_ms, bool in_isr);
156156

157157
// Task function should be called in main/rtos loop
158-
TU_ATTR_ALWAYS_INLINE static inline
159-
void tuh_task(void) {
158+
TU_ATTR_ALWAYS_INLINE static inline void tuh_task(void) {
160159
tuh_task_ext(UINT32_MAX, false);
161160
}
162161

@@ -197,16 +196,14 @@ bool tuh_mounted(uint8_t daddr);
197196
bool tuh_connected(uint8_t daddr);
198197

199198
// Check if device is suspended
200-
TU_ATTR_ALWAYS_INLINE static inline
201-
bool tuh_suspended(uint8_t daddr) {
199+
TU_ATTR_ALWAYS_INLINE static inline bool tuh_suspended(uint8_t daddr) {
202200
// TODO implement suspend & resume on host
203201
(void) daddr;
204202
return false;
205203
}
206204

207205
// Check if device is ready to communicate with
208-
TU_ATTR_ALWAYS_INLINE static inline
209-
bool tuh_ready(uint8_t daddr) {
206+
TU_ATTR_ALWAYS_INLINE static inline bool tuh_ready(uint8_t daddr) {
210207
return tuh_mounted(daddr) && !tuh_suspended(daddr);
211208
}
212209

test/hil/tinyusb.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"name": "metro_m4_express",
6161
"uid": "9995AD485337433231202020FF100A34",
6262
"tests": {
63-
"device": true, "host": false, "dual": false,
63+
"device": true, "host": false, "dual": true,
6464
"dev_attached": [{"vid_pid": "1a86_55d4", "serial": "52D2002130"}]
6565
},
6666
"flasher": {

0 commit comments

Comments
 (0)