mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-18 21:41:12 +00:00
Merge pull request #1847 from HiFiPhile/dwc2_iar
dwc2: fix iar warnings
This commit is contained in:
commit
ea098aeda1
@ -529,8 +529,10 @@ void dcd_init (uint8_t rhport)
|
||||
dwc2->dcfg |= DCFG_NZLSOHSK;
|
||||
|
||||
// Clear all interrupts
|
||||
dwc2->gintsts |= dwc2->gintsts;
|
||||
dwc2->gotgint |= dwc2->gotgint;
|
||||
uint32_t int_mask = dwc2->gintsts;
|
||||
dwc2->gintsts |= int_mask;
|
||||
int_mask = dwc2->gotgint;
|
||||
dwc2->gotgint |= int_mask;
|
||||
|
||||
// Required as part of core initialization.
|
||||
// TODO: How should mode mismatch be handled? It will cause
|
||||
@ -1219,7 +1221,8 @@ void dcd_int_handler(uint8_t rhport)
|
||||
{
|
||||
dwc2_regs_t *dwc2 = DWC2_REG(rhport);
|
||||
|
||||
uint32_t const int_status = dwc2->gintsts & dwc2->gintmsk;
|
||||
uint32_t const int_mask = dwc2->gintmsk;
|
||||
uint32_t const int_status = dwc2->gintsts & int_mask;
|
||||
|
||||
if(int_status & GINTSTS_USBRST)
|
||||
{
|
||||
|
@ -122,13 +122,13 @@ static const dwc2_controller_t _dwc2_controller[] =
|
||||
TU_ATTR_ALWAYS_INLINE
|
||||
static inline void dwc2_dcd_int_enable(uint8_t rhport)
|
||||
{
|
||||
NVIC_EnableIRQ(_dwc2_controller[rhport].irqnum);
|
||||
NVIC_EnableIRQ((IRQn_Type)_dwc2_controller[rhport].irqnum);
|
||||
}
|
||||
|
||||
TU_ATTR_ALWAYS_INLINE
|
||||
static inline void dwc2_dcd_int_disable (uint8_t rhport)
|
||||
{
|
||||
NVIC_DisableIRQ(_dwc2_controller[rhport].irqnum);
|
||||
NVIC_DisableIRQ((IRQn_Type)_dwc2_controller[rhport].irqnum);
|
||||
}
|
||||
|
||||
TU_ATTR_ALWAYS_INLINE
|
||||
|
Loading…
x
Reference in New Issue
Block a user