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:
@@ -33,7 +33,7 @@
|
||||
#define FPB_REMAP MMIO32(FPB_BASE + 4)
|
||||
|
||||
/* Flash Patch Comparator (FPB_COMPx) */
|
||||
#define FPB_COMP (volatile uint32_t *)(FPB_BASE + 8)
|
||||
#define FPB_COMP (&MMIO32(FPB_BASE + 8))
|
||||
|
||||
/* TODO: PID, CID */
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
/* --- ITM registers ------------------------------------------------------- */
|
||||
|
||||
/* Stimulus Port x (ITM_STIM[x]) */
|
||||
#define ITM_STIM ((volatile uint32_t*)(ITM_BASE))
|
||||
#define ITM_STIM (&MMIO32(ITM_BASE))
|
||||
|
||||
/* Trace Enable ports (ITM_TER[x]) */
|
||||
#define ITM_TER ((volatile uint32_t*)(ITM_BASE + 0xE00))
|
||||
#define ITM_TER (&MMIO32(ITM_BASE + 0xE00))
|
||||
|
||||
/* Trace Privilege (ITM_TPR) */
|
||||
#define ITM_TPR MMIO32(ITM_BASE + 0xE40)
|
||||
|
||||
Reference in New Issue
Block a user