APM:Libraries
Functions
bitband.h File Reference

Bit-banding utility functions. More...

#include "hal_types.h"
Include dependency graph for bitband.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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...
 

Detailed Description

Bit-banding utility functions.

Definition in file bitband.h.

Function Documentation

◆ __bb_addr()

static volatile uint32_t * __bb_addr ( volatile void *  address,
uint32_t  bit,
uint32_t  bb_base,
uint32_t  bb_ref 
)
inlinestatic

Definition at line 111 of file bitband.h.

Referenced by bb_perip(), and bb_sramp().

Here is the caller graph for this function:

◆ 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
addressAddress in the peripheral bit-band region to read from
bitBit in address to read
Returns
bit's value in address.

Definition at line 95 of file bitband.h.

Here is the call graph for this function:

◆ 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
addressAddress in the peripheral bit-band region to write to
bitBit in address to write to
valValue to write for bit, either 0 or 1.

Definition at line 105 of file bitband.h.

Here is the call graph for this function:

◆ 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
addressAddress in the bit-banded peripheral region
bitBit 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
addressAddress in the SRAM bit-band region to read from
bitBit in address to read
Returns
bit's value in address.

Definition at line 63 of file bitband.h.

Here is the call graph for this function:

◆ 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
addressAddress in the SRAM bit-band region to write to
bitBit in address to write to
valValue to write for bit, either 0 or 1.

Definition at line 73 of file bitband.h.

Here is the call graph for this function:

◆ 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
addressAddress in the bit-banded SRAM region
bitBit in address to bit-band

Definition at line 53 of file bitband.h.

Referenced by bb_sram_get_bit(), and bb_sram_set_bit().

Here is the call graph for this function:
Here is the caller graph for this function: