Skip to content

Commit

Permalink
fix build on rp2040
Browse files Browse the repository at this point in the history
  • Loading branch information
jepler committed Dec 20, 2024
1 parent 72cceaf commit acc3770
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ports/raspberrypi/common-hal/usb_host/Port.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ usb_host_port_obj_t *common_hal_usb_host_port_construct(const mcu_pin_obj_t *dp,
assert_pin_free(dp);
assert_pin_free(dm);

#if PICO_PIO_VERSION > 0
#if PICO_PIO_VERSION == 0
uint32_t used_gpio_ranges = 0;
#else
uint gpio_base = dm->number;
uint gpio_count = 2;
uint32_t required_gpio_ranges = (1u << (gpio_base >> 4)) |
uint32_t used_gpio_ranges = (1u << (gpio_base >> 4)) |
(1u << ((gpio_base + gpio_count - 1) >> 4));
#endif

Expand Down

0 comments on commit acc3770

Please sign in to comment.