1 #define REG(x)(*((volatile uint32_t *)(x)))
2 #define BIT(x)(0x1 << x)
4 /* Write a uint32_t value to a memory address. */
6 write32(uint32_t address
, uint32_t value
)
11 /* Read an uint32_t from a memory address */
12 static inline uint32_t
13 read32(uint32_t address
)
19 /* Set a 32 bits value depending on a mask */
21 set32(uint32_t address
, uint32_t mask
, uint32_t value
)
24 val
= read32(address
);
27 /* apply the value using the mask */
28 val
|= (value
& mask
);
29 write32(address
, val
);