This section describes the C declarations that are used in
the examples described in this appendix.The C declarations are:
/* C Declarations to support example code */
typedef unsigned int UINT32;
/* Access 32-bit memory-mapped registers */#define GET_UINT32(address, pData) (*(pData) = *((volatile UINT32 *)(address)))
#define PUT_UINT32(address, data) (*((volatile UINT32 *)(address)) = (data))
/* Barrier operations defined using compiler intrinsics */
#define DataMemoryBarrier() __dmb(0xF) /* DMB */
#define DataSynchronizationBarrier() __dsb(0xF) /* DSB */
#define InstructionSynchronizationBarrier() __isb(0xF) /* ISB */
/* Global interrupt enable operations on PRIMASK using compiler intrinsics */
#define DisableInterrupts() __disable_irq() /* CPSID I */
#define EnableInterrupts() __enable_irq() /* CPSIE I */
/* SCS and NVIC register addresses */
#define CORTEXM1_SYSTICK_CSR 0xE000E010
#define CORTEXM1_SYSTICK_RELOAD 0xE000E014
#define CORTEXM1_SYSTICK_CURRENT 0xE000E018
#define CORTEXM1_NVIC_IRQ_SET_ENABLE 0xE000E100
#define CORTEXM1_NVIC_IRQ_CLR_ENABLE 0xE000E180
#define CORTEXM1_NVIC_IRQ_SET_PENDING 0xE000E200
#define CORTEXM1_NVIC_IRQ_CLR_PENDING 0xE000E280
#define CORTEXM1_SCB_ICS 0xE000ED04
#define CORTEXM1_SCB_SHPR3 0xE000ED20