v2.0.0
Macros | Typedefs | Functions
address_mapped.h File Reference
`#include "pico.h"`
`#include "hardware/regs/addressmap.h"`
Include dependency graph for address_mapped.h:

Go to the source code of this file.

## Macros
#define | check_hw_layout(type, member, offset) static_assert(offsetof(type, member) == (offset), "hw offset mismatch")
#define | check_hw_size(type, size) static_assert(sizeof(type) == (size), "hw size mismatch")
#define | PARAM_ASSERTIONS_ENABLED_ADDRESS_ALIAS 0
#define | _REG_(x)
#define | hw_alias_check_addr(addr) ((uintptr_t)(addr))
#define | hw_set_alias_untyped(addr) ((void *)(REG_ALIAS_SET_BITS + hw_alias_check_addr(addr)))
#define | hw_clear_alias_untyped(addr) ((void *)(REG_ALIAS_CLR_BITS + hw_alias_check_addr(addr)))
#define | hw_xor_alias_untyped(addr) ((void *)(REG_ALIAS_XOR_BITS + hw_alias_check_addr(addr)))
#define | xip_noalloc_alias_untyped(addr) ((void *)(XIP_NOALLOC_BASE | xip_alias_check_addr(addr)))
#define | xip_nocache_alias_untyped(addr) ((void *)(XIP_NOCACHE_BASE | xip_alias_check_addr(addr)))
#define | xip_nocache_noalloc_alias_untyped(addr) ((void *)(XIP_NOCACHE_NOALLOC_BASE | xip_alias_check_addr(addr)))
#define | hw_set_alias(p) ((typeof(p))hw_set_alias_untyped(p))
#define | hw_clear_alias(p) ((typeof(p))hw_clear_alias_untyped(p))
#define | hw_xor_alias(p) ((typeof(p))hw_xor_alias_untyped(p))
#define | xip_noalloc_alias(p) ((typeof(p))xip_noalloc_alias_untyped(p))
#define | xip_nocache_alias(p) ((typeof(p))xip_nocache_alias_untyped(p))
#define | xip_nocache_noalloc_alias(p) ((typeof(p))xip_nocache_noalloc_alias_untyped(p))

## Typedefs
typedef volatile uint64_t | io_rw_64
typedef const volatile uint64_t | io_ro_64
typedef volatile uint64_t | io_wo_64
typedef volatile uint32_t | io_rw_32
typedef const volatile uint32_t | io_ro_32
typedef volatile uint32_t | io_wo_32
typedef volatile uint16_t | io_rw_16
typedef const volatile uint16_t | io_ro_16
typedef volatile uint16_t | io_wo_16
typedef volatile uint8_t | io_rw_8
typedef const volatile uint8_t | io_ro_8
typedef volatile uint8_t | io_wo_8
typedef volatile uint8_t *const | ioptr
typedef ioptr const | const_ioptr

## Functions
static __force_inline uint32_t | xip_alias_check_addr (const void *addr)
static __force_inline void | hw_set_bits (io_rw_32 *addr, uint32_t mask)
| Atomically set the specified bits to 1 in a HW register. More...
static __force_inline void | hw_clear_bits (io_rw_32 *addr, uint32_t mask)
| Atomically clear the specified bits to 0 in a HW register. More...
static __force_inline void | hw_xor_bits (io_rw_32 *addr, uint32_t mask)
| Atomically flip the specified bits in a HW register. More...
static __force_inline void | hw_write_masked (io_rw_32 *addr, uint32_t values, uint32_t write_mask)
| Set new values for a sub-set of the bits in a HW register. More...