Skip to content

Commit 37e666d

Browse files
authored
Merge branch 'hathach:master' into midihost
2 parents 002131d + 111515a commit 37e666d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/portable/nordic/nrf5x/dcd_nrf5x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ void dcd_int_handler(uint8_t rhport)
765765
if ( tu_bit_test(int_status, USBD_INTEN_ENDEPOUT0_Pos+epnum))
766766
{
767767
xfer_td_t* xfer = get_td(epnum, TUSB_DIR_OUT);
768-
uint8_t const xact_len = NRF_USBD->EPOUT[epnum].AMOUNT;
768+
uint16_t const xact_len = NRF_USBD->EPOUT[epnum].AMOUNT;
769769

770770
xfer->buffer += xact_len;
771771
xfer->actual_len += xact_len;

src/portable/raspberrypi/rp2040/hcd_rp2040.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@ bool hcd_init(uint8_t rhport)
385385
// Force VBUS detect to always present, for now we assume vbus is always provided (without using VBUS En)
386386
usb_hw->pwr = USB_USB_PWR_VBUS_DETECT_BITS | USB_USB_PWR_VBUS_DETECT_OVERRIDE_EN_BITS;
387387

388+
// Remove shared irq if it was previously added so as not to fill up shared irq slots
389+
irq_remove_handler(USBCTRL_IRQ, hcd_rp2040_irq);
390+
388391
irq_add_shared_handler(USBCTRL_IRQ, hcd_rp2040_irq, PICO_SHARED_IRQ_HANDLER_HIGHEST_ORDER_PRIORITY);
389392

390393
// clear epx and interrupt eps

src/portable/synopsys/dwc2/dwc2_stm32.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464

6565
// NOTE: H7 with only 1 USB port: H72x / H73x / H7Ax / H7Bx
6666
// USB_OTG_FS_PERIPH_BASE and OTG_FS_IRQn not defined
67+
#if (! defined USB2_OTG_FS)
68+
#define USB_OTG_FS_PERIPH_BASE USB1_OTG_HS_PERIPH_BASE
69+
#define OTG_FS_IRQn OTG_HS_IRQn
70+
#endif
6771

6872
#elif CFG_TUSB_MCU == OPT_MCU_STM32F7
6973
#include "stm32f7xx.h"

0 commit comments

Comments
 (0)