add volatile to EPx_REGS for -Wcast-qual

since gcc does difference between volatile struct and member when
casting pointer
This commit is contained in:
hathach 2021-10-17 17:33:14 +07:00
parent 31cd366935
commit 099d3b377f
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ typedef struct
__IOM uint32_t USB_RXC2_REG; /*!< (@ 0x000000DC) Receive Command Register 2 */
__IOM uint32_t USB_RXC3_REG; /*!< (@ 0x000000FC) Receive Command Register 3 */
};
} EPx_REGS;
} volatile EPx_REGS;
#define EP_REGS(first_ep_reg) (EPx_REGS*)(&USB->first_ep_reg)