Changed to use accessors instead of casting to volatile pointers.
In places where we were defining memory mapped peripheral buffers we were using directly a cast to "volatile int_type *". For consistency we should use dereferenced accessor like: &MMIO32(address)
This commit is contained in:
@@ -49,17 +49,17 @@ LGPL License Terms @ref lgpl_license
|
||||
/* --- USB general registers ----------------------------------------------- */
|
||||
|
||||
/* USB Control register */
|
||||
#define USB_CNTR_REG ((volatile uint32_t *)(USB_DEV_FS_BASE + 0x40))
|
||||
#define USB_CNTR_REG (&MMIO32(USB_DEV_FS_BASE + 0x40))
|
||||
/* USB Interrupt status register */
|
||||
#define USB_ISTR_REG ((volatile uint32_t *)(USB_DEV_FS_BASE + 0x44))
|
||||
#define USB_ISTR_REG (&MMIO32(USB_DEV_FS_BASE + 0x44))
|
||||
/* USB Frame number register */
|
||||
#define USB_FNR_REG ((volatile uint32_t *)(USB_DEV_FS_BASE + 0x48))
|
||||
#define USB_FNR_REG (&MMIO32(USB_DEV_FS_BASE + 0x48))
|
||||
/* USB Device address register */
|
||||
#define USB_DADDR_REG ((volatile uint32_t *)(USB_DEV_FS_BASE + 0x4C))
|
||||
#define USB_DADDR_REG (&MMIO32(USB_DEV_FS_BASE + 0x4C))
|
||||
/* USB Buffer table address register */
|
||||
#define USB_BTABLE_REG ((volatile uint32_t *)(USB_DEV_FS_BASE + 0x50))
|
||||
#define USB_BTABLE_REG (&MMIO32(USB_DEV_FS_BASE + 0x50))
|
||||
/* USB EP register */
|
||||
#define USB_EP_REG(EP) ((volatile uint32_t *)(USB_DEV_FS_BASE) + (EP))
|
||||
#define USB_EP_REG(EP) (&MMIO32(USB_DEV_FS_BASE) + (EP))
|
||||
|
||||
/* --- USB control register masks / bits ----------------------------------- */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user