Skip to content

Commit a88aa70

Browse files
committed
Enable usb
1 parent 5499740 commit a88aa70

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

target/infineon/edge-e83/drivers/drv_usbd_cdc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static rt_size_t cdc_dev_write(usbd_cdc_dev_t dev, rt_off_t pos, const void* buf
231231

232232
ep_tx_busy_flag = true;
233233
usbd_ep_start_write(usb_busid, CDC_IN_EP, usb_write_buffer, chunk_size);
234-
rt_completion_wait(&dev->tx_cplt, RT_WAITING_FOREVER);
234+
// rt_completion_wait(&dev->tx_cplt, RT_WAITING_FOREVER);
235235

236236
sent_len += chunk_size;
237237
data_ptr += chunk_size;
@@ -291,7 +291,7 @@ rt_err_t drv_usb_cdc_init(void)
291291
return RT_ENOMEM;
292292
}
293293

294-
ret = hal_usbd_cdc_register(&cdc_device, "usbd_cdc", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_STREAM, NULL);
294+
ret = hal_usbd_cdc_register(&cdc_device, "usbd_cdc", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_STANDALONE | RT_DEVICE_FLAG_DMA_RX | RT_DEVICE_FLAG_DMA_TX, NULL);
295295
if (ret != RT_EOK) {
296296
rt_mutex_delete(cdc_device.tx_lock);
297297
return ret;

target/infineon/edge-e83/m55/board/default_config.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ target = "Edge-E83"\n
2929
[[console.devices]]\n
3030
type = "mavlink"\n
3131
name = "mav_console"\n
32-
auto-switch = true
32+
auto-switch = true\n
33+
[mavproxy]\n
34+
[[mavproxy.devices]]\n
35+
chan = 0\n
36+
type = "usb"\n
37+
name = "usbd_cdc"\n
38+
auto-switch = true
3339
);
3440
// clang-format on

target/infineon/edge-e83/m55/rtconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
PLATFORM = 'iccarm'
2929
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
3030

31-
# if os.getenv('RTT_EXEC_PATH'):
32-
# EXEC_PATH = os.getenv('RTT_EXEC_PATH')
31+
if os.getenv('RTT_EXEC_PATH'):
32+
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
3333

3434
BUILD = 'debug'
3535

0 commit comments

Comments
 (0)