Type | Name |
---|---|
uint32_t | bea_get_reg_bits
(volatile uint32_t *base_addr, uint8_t msb, uint8_t lsb) Get bits in a hardware memory-mapped register (assumed to be 32 bits wide). Reading from an incorrect memory address is undefined behavior and may trigger a hard fault or other interrupt. |
void | bea_set_reg_bits
(volatile uint32_t *base_addr, uint8_t msb, uint8_t lsb, uint32_t value)
Set bits in a hardware memory-mapped register (assumed to be 32 bits wide). Writing to an incorrect memory address is undefined behavior and may trigger a hard fault or other interrupt. |
bea_get_reg_bits
Get bits in a hardware memory-mapped register (assumed to be 32 bits wide). Reading from an incorrect memory address is undefined behavior and may trigger a hard fault or other interrupt.
uint32_t bea_get_reg_bits (
volatile uint32_t *base_addr,
uint8_t msb,
uint8_t lsb
)
Parameters:
base_addr
The base memory address of the registermsb
The “highest” bit (inclusive) to read,
zero-indexed, big-endianlsb
The “lowest” bit (inclusive) to read, zero-indexed,
big-endian #### function bea_set_reg_bits
Set bits in a hardware memory-mapped register (assumed to be 32 bits wide). Writing to an incorrect memory address is undefined behavior and may trigger a hard fault or other interrupt.
void bea_set_reg_bits (
volatile uint32_t *base_addr,
uint8_t msb,
uint8_t lsb,
uint32_t value
)
Parameters:
base_addr
The base memory address of the registermsb
The “highest” bit (inclusive) to set, zero-indexed,
big-endianlsb
The “lowest” bit (inclusive) to set, zero-indexed,
big-endianvalue
The value to write into that range of the
register. Only the lowest (1 + msb - lsb)
bits will be
written, all others will be discarded