Bit-banding utility functions.
More...
Go to the source code of this file.
|
static volatile uint32_t * | __bb_addr (volatile void *, uint32_t, uint32_t, uint32_t) |
|
static volatile uint32_t * | bb_sramp (volatile void *address, uint32_t bit) |
| Obtain a pointer to the bit-band address corresponding to a bit in a volatile SRAM address. More...
|
|
static uint8_t | bb_sram_get_bit (volatile void *address, uint32_t bit) |
| Get a bit from an address in the SRAM bit-band region. More...
|
|
static void | bb_sram_set_bit (volatile void *address, uint32_t bit, uint8_t val) |
| Set a bit in an address in the SRAM bit-band region. More...
|
|
static volatile uint32_t * | bb_perip (volatile void *address, uint32_t bit) |
| Obtain a pointer to the bit-band address corresponding to a bit in a peripheral address. More...
|
|
static uint8_t | bb_peri_get_bit (volatile void *address, uint32_t bit) |
| Get a bit from an address in the peripheral bit-band region. More...
|
|
static void | bb_peri_set_bit (volatile void *address, uint32_t bit, uint8_t val) |
| Set a bit in an address in the peripheral bit-band region. More...
|
|
Bit-banding utility functions.
Definition in file bitband.h.
◆ __bb_addr()
static volatile uint32_t * __bb_addr |
( |
volatile void * |
address, |
|
|
uint32_t |
bit, |
|
|
uint32_t |
bb_base, |
|
|
uint32_t |
bb_ref |
|
) |
| |
|
inlinestatic |
◆ bb_peri_get_bit()
static uint8_t bb_peri_get_bit |
( |
volatile void * |
address, |
|
|
uint32_t |
bit |
|
) |
| |
|
inlinestatic |
Get a bit from an address in the peripheral bit-band region.
- Parameters
-
address | Address in the peripheral bit-band region to read from |
bit | Bit in address to read |
- Returns
- bit's value in address.
Definition at line 95 of file bitband.h.
◆ bb_peri_set_bit()
static void bb_peri_set_bit |
( |
volatile void * |
address, |
|
|
uint32_t |
bit, |
|
|
uint8_t |
val |
|
) |
| |
|
inlinestatic |
Set a bit in an address in the peripheral bit-band region.
- Parameters
-
address | Address in the peripheral bit-band region to write to |
bit | Bit in address to write to |
val | Value to write for bit, either 0 or 1. |
Definition at line 105 of file bitband.h.
◆ bb_perip()
static volatile uint32_t* bb_perip |
( |
volatile void * |
address, |
|
|
uint32_t |
bit |
|
) |
| |
|
inlinestatic |
Obtain a pointer to the bit-band address corresponding to a bit in a peripheral address.
- Parameters
-
address | Address in the bit-banded peripheral region |
bit | Bit in address to bit-band |
Definition at line 85 of file bitband.h.
Referenced by bb_peri_get_bit(), bb_peri_set_bit(), timer_cc_disable(), timer_cc_enable(), timer_cc_get_pol(), timer_cc_set_pol(), timer_dma_disable_req(), timer_dma_disable_trg_req(), timer_dma_enable_req(), timer_dma_enable_trg_req(), timer_generate_update(), timer_pause(), and timer_resume().
◆ bb_sram_get_bit()
static uint8_t bb_sram_get_bit |
( |
volatile void * |
address, |
|
|
uint32_t |
bit |
|
) |
| |
|
inlinestatic |
Get a bit from an address in the SRAM bit-band region.
- Parameters
-
address | Address in the SRAM bit-band region to read from |
bit | Bit in address to read |
- Returns
- bit's value in address.
Definition at line 63 of file bitband.h.
◆ bb_sram_set_bit()
static void bb_sram_set_bit |
( |
volatile void * |
address, |
|
|
uint32_t |
bit, |
|
|
uint8_t |
val |
|
) |
| |
|
inlinestatic |
Set a bit in an address in the SRAM bit-band region.
- Parameters
-
address | Address in the SRAM bit-band region to write to |
bit | Bit in address to write to |
val | Value to write for bit, either 0 or 1. |
Definition at line 73 of file bitband.h.
◆ bb_sramp()
static volatile uint32_t* bb_sramp |
( |
volatile void * |
address, |
|
|
uint32_t |
bit |
|
) |
| |
|
inlinestatic |
Obtain a pointer to the bit-band address corresponding to a bit in a volatile SRAM address.
- Parameters
-
address | Address in the bit-banded SRAM region |
bit | Bit in address to bit-band |
Definition at line 53 of file bitband.h.
Referenced by bb_sram_get_bit(), and bb_sram_set_bit().