Skip to content

Commit

Permalink
samples: sensortile_box: use new USB device stack
Browse files Browse the repository at this point in the history
Use new USB device stack.

Signed-off-by: Johann Fischer <[email protected]>
  • Loading branch information
jfischer-no committed Nov 22, 2024
1 parent 7672e27 commit 06022db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 4 additions & 6 deletions samples/boards/st/sensortile_box/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ CONFIG_IIS3DHHC_TRIGGER_OWN_THREAD=y
CONFIG_LIS2MDL_TRIGGER_NONE=y

# config USB and USB console
CONFIG_USB_DEVICE_VID=0x0483
CONFIG_USB_DEVICE_PID=0x1234
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC SensorTile.box"
CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
CONFIG_USB_DEVICE_STACK_NEXT=y
CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT=y
CONFIG_CDC_ACM_SERIAL_PRODUCT_STRING="Zephyr CDC SensorTile.box"
CONFIG_USBD_CDC_ACM_LOG_LEVEL_OFF=y

CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
Expand Down
3 changes: 1 addition & 2 deletions samples/boards/st/sensortile_box/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,7 @@ int main(void)
int cnt = 1;
uint32_t dtr = 0;

/* Application must enable USB by itself */
if (!device_is_ready(dev) || usb_enable(NULL)) {
if (!device_is_ready(dev)) {
return 0;
}

Expand Down

0 comments on commit 06022db

Please sign in to comment.