Skip to content

Commit

Permalink
Merge branch 'hathach:master' into midihost
Browse files Browse the repository at this point in the history
  • Loading branch information
atoktoto authored Oct 2, 2022
2 parents 002131d + 111515a commit 37e666d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/portable/nordic/nrf5x/dcd_nrf5x.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ void dcd_int_handler(uint8_t rhport)
if ( tu_bit_test(int_status, USBD_INTEN_ENDEPOUT0_Pos+epnum))
{
xfer_td_t* xfer = get_td(epnum, TUSB_DIR_OUT);
uint8_t const xact_len = NRF_USBD->EPOUT[epnum].AMOUNT;
uint16_t const xact_len = NRF_USBD->EPOUT[epnum].AMOUNT;

xfer->buffer += xact_len;
xfer->actual_len += xact_len;
Expand Down
3 changes: 3 additions & 0 deletions src/portable/raspberrypi/rp2040/hcd_rp2040.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ bool hcd_init(uint8_t rhport)
// Force VBUS detect to always present, for now we assume vbus is always provided (without using VBUS En)
usb_hw->pwr = USB_USB_PWR_VBUS_DETECT_BITS | USB_USB_PWR_VBUS_DETECT_OVERRIDE_EN_BITS;

// Remove shared irq if it was previously added so as not to fill up shared irq slots
irq_remove_handler(USBCTRL_IRQ, hcd_rp2040_irq);

irq_add_shared_handler(USBCTRL_IRQ, hcd_rp2040_irq, PICO_SHARED_IRQ_HANDLER_HIGHEST_ORDER_PRIORITY);

// clear epx and interrupt eps
Expand Down
4 changes: 4 additions & 0 deletions src/portable/synopsys/dwc2/dwc2_stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@

// NOTE: H7 with only 1 USB port: H72x / H73x / H7Ax / H7Bx
// USB_OTG_FS_PERIPH_BASE and OTG_FS_IRQn not defined
#if (! defined USB2_OTG_FS)
#define USB_OTG_FS_PERIPH_BASE USB1_OTG_HS_PERIPH_BASE
#define OTG_FS_IRQn OTG_HS_IRQn
#endif

#elif CFG_TUSB_MCU == OPT_MCU_STM32F7
#include "stm32f7xx.h"
Expand Down

0 comments on commit 37e666d

Please sign in to comment.