From 099d3b377fd619e664e60c948e6f73d7276dd81d Mon Sep 17 00:00:00 2001 From: hathach Date: Sun, 17 Oct 2021 17:33:14 +0700 Subject: [PATCH] add volatile to EPx_REGS for -Wcast-qual since gcc does difference between volatile struct and member when casting pointer --- src/portable/dialog/da146xx/dcd_da146xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/portable/dialog/da146xx/dcd_da146xx.c b/src/portable/dialog/da146xx/dcd_da146xx.c index a36165343..b5c656d94 100644 --- a/src/portable/dialog/da146xx/dcd_da146xx.c +++ b/src/portable/dialog/da146xx/dcd_da146xx.c @@ -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)