mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-29 01:20:19 +00:00
nrf5x Let application decide USBD_IRQn priority
This commit is contained in:
parent
59c1b4b427
commit
1a84f5da54
@ -183,6 +183,8 @@ void board_init(void)
|
|||||||
nrfx_qspi_cinstr_xfer(&cinstr_cfg, &sr_quad_en, NULL);
|
nrfx_qspi_cinstr_xfer(&cinstr_cfg, &sr_quad_en, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
NVIC_SetPriority(USBD_IRQn, 2);
|
||||||
|
|
||||||
// USB power may already be ready at this time -> no event generated
|
// USB power may already be ready at this time -> no event generated
|
||||||
// We need to invoke the handler based on the status initially
|
// We need to invoke the handler based on the status initially
|
||||||
uint32_t usb_reg;
|
uint32_t usb_reg;
|
||||||
|
@ -59,8 +59,6 @@
|
|||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
/* MACRO TYPEDEF CONSTANT ENUM
|
/* MACRO TYPEDEF CONSTANT ENUM
|
||||||
*------------------------------------------------------------------*/
|
*------------------------------------------------------------------*/
|
||||||
#define USB_NVIC_PRIO 7
|
|
||||||
|
|
||||||
void tusb_hal_nrf_power_event(uint32_t event);
|
void tusb_hal_nrf_power_event(uint32_t event);
|
||||||
|
|
||||||
/*------------------------------------------------------------------*/
|
/*------------------------------------------------------------------*/
|
||||||
@ -232,8 +230,7 @@ void tusb_hal_nrf_power_event (uint32_t event)
|
|||||||
NRF_USBD->INTENSET = USBD_INTEN_USBRESET_Msk | USBD_INTEN_USBEVENT_Msk | USBD_INTEN_EPDATA_Msk |
|
NRF_USBD->INTENSET = USBD_INTEN_USBRESET_Msk | USBD_INTEN_USBEVENT_Msk | USBD_INTEN_EPDATA_Msk |
|
||||||
USBD_INTEN_EP0SETUP_Msk | USBD_INTEN_EP0DATADONE_Msk | USBD_INTEN_ENDEPIN0_Msk | USBD_INTEN_ENDEPOUT0_Msk;
|
USBD_INTEN_EP0SETUP_Msk | USBD_INTEN_EP0DATADONE_Msk | USBD_INTEN_ENDEPIN0_Msk | USBD_INTEN_ENDEPOUT0_Msk;
|
||||||
|
|
||||||
// Enable interrupt, Priorities 0,1,4,5 (nRF52) are reserved for SoftDevice
|
// Enable interrupt, priorities should be set by application
|
||||||
NVIC_SetPriority(USBD_IRQn, USB_NVIC_PRIO);
|
|
||||||
NVIC_ClearPendingIRQ(USBD_IRQn);
|
NVIC_ClearPendingIRQ(USBD_IRQn);
|
||||||
NVIC_EnableIRQ(USBD_IRQn);
|
NVIC_EnableIRQ(USBD_IRQn);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user