EFM32 Gecko Software Documentation  efm32g-doc-4.2.1
BITBAND

BITBAND Peripheral API (deprecated - use em_bus.h)

. More...

Macros

#define BITBAND_Peripheral(addr, bit, val)   BUS_RegBitWrite(addr, bit, val)
 Perform bit-band operation on peripheral memory location. More...
 
#define BITBAND_PeripheralRead(addr, bit)   BUS_RegBitRead(addr, bit)
 Perform a read operation on the peripheral bit-band memory location. More...
 
#define BITBAND_SRAM(addr, bit, val)   BUS_RamBitWrite(addr, bit, val)
 Perform bit-band operation on SRAM memory location. More...
 
#define BITBAND_SRAMRead(addr, bit)   BUS_RamBitRead(addr, bit)
 Read a single bit from the SRAM bit-band alias region. More...
 

Detailed Description

Macro Definition Documentation

#define BITBAND_Peripheral (   addr,
  bit,
  val 
)    BUS_RegBitWrite(addr, bit, val)

Bit-banding provides atomic read-modify-write cycle for single bit modification. Please refer to the reference manual for further details about bit-banding.

Note
This function is only atomic on cores which fully support bitbanding.
Parameters
[in]addrPeripheral address location to modify bit in.
[in]bitBit position to modify, 0-31.
[in]valValue to set bit to, 0 or 1.

Definition at line 71 of file em_bitband.h.

#define BITBAND_PeripheralRead (   addr,
  bit 
)    BUS_RegBitRead(addr, bit)

This function reads a single bit from the peripheral bit-band alias region. Bit-banding provides atomic read-modify-write cycle for single bit modification. Please refer to the reference manual for further details about bit-banding.

Parameters
[in]addrPeripheral address location to read.
[in]bitBit position to read, 0-31.
Returns
Value of the requested bit.

Definition at line 90 of file em_bitband.h.

#define BITBAND_SRAM (   addr,
  bit,
  val 
)    BUS_RamBitWrite(addr, bit, val)

Bit-banding provides atomic read-modify-write cycle for single bit modification. Please refer to the reference manual for further details about bit-banding.

Note
This function is only atomic on cores which fully support bitbanding.
Parameters
[in]addrSRAM address location to modify bit in.
[in]bitBit position to modify, 0-31.
[in]valValue to set bit to, 0 or 1.

Definition at line 111 of file em_bitband.h.

#define BITBAND_SRAMRead (   addr,
  bit 
)    BUS_RamBitRead(addr, bit)

This function reads a single bit from the SRAM bit-band alias region. Bit-banding provides atomic read-modify-write cycle for single bit modification. Please refer to the reference manual for further details about bit-banding.

Parameters
[in]addrSRAM address location to modify bit in.
[in]bitBit position to modify, 0-31.
Returns
Value of the requested bit.

Definition at line 130 of file em_bitband.h.