Skip to content

Commit

Permalink
Merge pull request espressif#6 from espressif/fix/esp_tinyusb_cdc_min…
Browse files Browse the repository at this point in the history
…_warn

esp_tinyusb: Removed MIN() definition if defined for cdc_acm
  • Loading branch information
tore-espressif authored Jan 31, 2024
2 parents f2f79f5 + 0682387 commit 4080109
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions device/esp_tinyusb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
## 1.4.4 (Unreleased)

- CDC-ACM: Remove MIN() definition if already defined
- MSC: Set EP size in configuration descriptor based on speed

## 1.4.3

- esp_tinyusb: ESP32P4 HS only support

## 1.4.2
Expand Down
2 changes: 2 additions & 0 deletions device/esp_tinyusb/tusb_cdc_acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
#include "cdc.h"
#include "sdkconfig.h"

#ifndef MIN
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#endif

// CDC-ACM spinlock
static portMUX_TYPE cdc_acm_lock = portMUX_INITIALIZER_UNLOCKED;
Expand Down
2 changes: 1 addition & 1 deletion device/esp_tinyusb/usb_descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ uint8_t const descriptor_cfg_kconfig[] = {

#if CFG_TUD_MSC
// Interface number, string index, EP Out & EP In address, EP size
TUD_MSC_DESCRIPTOR(ITF_NUM_MSC, STRID_MSC_INTERFACE, EPNUM_MSC, 0x80 | EPNUM_MSC, 64), // highspeed 512
TUD_MSC_DESCRIPTOR(ITF_NUM_MSC, STRID_MSC_INTERFACE, EPNUM_MSC, 0x80 | EPNUM_MSC, TUD_OPT_HIGH_SPEED ? 512 : 64),
#endif

#if CFG_TUD_NCM
Expand Down

0 comments on commit 4080109

Please sign in to comment.