Skip to content

Commit 3b1b700

Browse files
authored
Merge pull request #10585 from dhalbert/claim-usb_host-pins
claim usb_host pins on construction
2 parents 9238ee7 + 6e37d1b commit 3b1b700

File tree

2 files changed

+5
-0
lines changed
  • ports
    • mimxrt10xx/common-hal/usb_host
    • raspberrypi/common-hal/usb_host

2 files changed

+5
-0
lines changed

ports/mimxrt10xx/common-hal/usb_host/Port.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,8 @@ usb_host_port_obj_t *common_hal_usb_host_port_construct(const mcu_pin_obj_t *dp,
4747
self->dp = dp;
4848
self->dm = dm;
4949

50+
claim_pin(dp);
51+
claim_pin(dm);
52+
5053
return self;
5154
}

ports/raspberrypi/common-hal/usb_host/Port.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ usb_host_port_obj_t *common_hal_usb_host_port_construct(const mcu_pin_obj_t *dp,
146146
self->base.type = &usb_host_port_type;
147147
self->dp = dp;
148148
self->dm = dm;
149+
claim_pin(dp);
150+
claim_pin(dm);
149151

150152
PIO pio = pio_get_instance(pio_cfg.pio_tx_num);
151153

0 commit comments

Comments
 (0)