<libmaple/bitband.h>

Bit-banding support.

Functions

static uint8 bb_sram_get_bit(volatile void *address, uint32 bit)

Get a bit from an address in the SRAM bit-band region.

Return
bit’s value in address.
Parameters
  • address -

    Address in the SRAM bit-band region to read from

  • bit -

    Bit in address to read

static void bb_sram_set_bit(volatile void *address, uint32 bit, uint8 val)

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.

static uint8 bb_peri_get_bit(volatile void *address, uint32 bit)

Get a bit from an address in the peripheral bit-band region.

Return
bit’s value in address.
Parameters
  • address -

    Address in the peripheral bit-band region to read from

  • bit -

    Bit in address to read

static void bb_peri_set_bit(volatile void *address, uint32 bit, uint8 val)

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.