Skip to content

Commit b06ded1

Browse files
ci(pre-commit): Apply automatic fixes
1 parent ff3ac0b commit b06ded1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

cores/esp32/USBCDC.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ static uint16_t load_cdc_descriptor2(uint8_t *dst, uint8_t *itf) {
4545
TU_VERIFY(ep_in != 0);
4646
uint8_t ep_out = tinyusb_get_free_out_endpoint();
4747
TU_VERIFY(ep_out != 0);
48-
uint8_t descriptor[TUD_CDC_DESC_LEN] = {// Interface number, string index, EP notification address and size, EP data address (out, in) and size.
49-
TUD_CDC_DESCRIPTOR(*itf, str_index, (uint8_t)(0x80 | ep_ntfy), CFG_TUD_ENDOINT_SIZE, ep_out, (uint8_t)(0x80 | ep_in), CFG_TUD_ENDOINT_SIZE)
48+
uint8_t descriptor[TUD_CDC_DESC_LEN] = {
49+
// Interface number, string index, EP notification address and size, EP data address (out, in) and size.
50+
TUD_CDC_DESCRIPTOR(*itf, str_index, (uint8_t)(0x80 | ep_ntfy), CFG_TUD_ENDOINT_SIZE, ep_out, (uint8_t)(0x80 | ep_in), CFG_TUD_ENDOINT_SIZE)
5051
};
5152
*itf += 2;
5253
memcpy(dst, descriptor, TUD_CDC_DESC_LEN);

cores/esp32/esp32-hal-tinyusb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ static bool tinyusb_reserve_out_endpoint(uint8_t endpoint) {
632632
}
633633

634634
static bool tinyusb_has_available_fifos(void) {
635-
uint8_t max_endpoints = CFG_TUD_NUM_IN_EPS-1, active_endpoints = 0;
635+
uint8_t max_endpoints = CFG_TUD_NUM_IN_EPS - 1, active_endpoints = 0;
636636
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
637637
if (tinyusb_loaded_interfaces_mask & BIT(USB_INTERFACE_CDC)) {
638638
max_endpoints = CFG_TUD_NUM_IN_EPS; //CDC endpoint 0x85 is actually not linked to FIFO and not used

cores/esp32/esp32-hal-tinyusb.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ extern "C" {
3939
#endif
4040
#endif
4141
#if CONFIG_IDF_TARGET_ESP32P4
42-
#define CFG_TUD_NUM_EPS 15
42+
#define CFG_TUD_NUM_EPS 15
4343
#define CFG_TUD_NUM_IN_EPS 8
4444
#else
45-
#define CFG_TUD_NUM_EPS 6
45+
#define CFG_TUD_NUM_EPS 6
4646
#define CFG_TUD_NUM_IN_EPS 5
4747
#endif
4848

0 commit comments

Comments
 (0)