Skip to content

Commit 8f5c692

Browse files
committed
Fix CI USB PID check
1 parent 0cbd8b2 commit 8f5c692

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ports/litex/supervisor/internal_flash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ mp_uint_t supervisor_flash_read_blocks(uint8_t *dest, uint32_t block, uint32_t n
310310
uint32_t src = lba2addr(block);
311311
memcpy(dest, (uint8_t *)src, FILESYSTEM_BLOCK_SIZE * num_blocks);
312312

313-
#if CIRCUITPY_USB
313+
#if CIRCUITPY_USB_DEVICE
314314
usb_background();
315315
#endif
316316

@@ -347,7 +347,7 @@ mp_uint_t supervisor_flash_write_blocks(const uint8_t *src, uint32_t lba, uint32
347347
src += count * FILESYSTEM_BLOCK_SIZE;
348348
num_blocks -= count;
349349

350-
#if CIRCUITPY_USB
350+
#if CIRCUITPY_USB_DEVICE
351351
usb_background();
352352
#endif
353353
}

tools/ci_check_duplicate_usb_vid_pid.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def check_vid_pid(files, clusterlist):
9696
"""
9797

9898
usb_pattern = re.compile(
99-
r"^CIRCUITPY_USB\s*=\s*0$|^IDF_TARGET = (esp32|esp32c3|esp32c6|esp32h2)$", flags=re.M
99+
r"^CIRCUITPY_USB_DEVICE\s*=\s*0$|^IDF_TARGET = (esp32|esp32c3|esp32c6|esp32h2)$",
100+
flags=re.M,
100101
)
101102

102103
usb_ids = defaultdict(set)

0 commit comments

Comments
 (0)