33 #ifndef __SILICON_LABS_EM_BUS__
34 #define __SILICON_LABS_EM_BUS__
77 #if defined( BITBAND_RAM_BASE )
81 *(
volatile uint32_t *)aliasAddr = (uint32_t)val;
86 *addr = (tmp & ~(1 << bit)) | ((val & 1) << bit);
115 #if defined( BITBAND_RAM_BASE )
119 return *(
volatile uint32_t *)aliasAddr;
121 return ((*addr) >> bit) & 1;
150 #if defined( BITBAND_PER_BASE )
154 *(
volatile uint32_t *)aliasAddr = (uint32_t)val;
156 uint32_t tmp = *addr;
159 *addr = (tmp & ~(1 << bit)) | ((val & 1) << bit);
188 #if defined( BITBAND_PER_BASE )
192 return *(
volatile uint32_t *)aliasAddr;
194 return ((*addr) >> bit) & 1;
222 #if defined( PER_BITSET_MEM_BASE )
223 uint32_t aliasAddr = PER_BITSET_MEM_BASE + ((uint32_t)addr -
PER_MEM_BASE);
224 *(
volatile uint32_t *)aliasAddr = mask;
254 #if defined( PER_BITCLR_MEM_BASE )
255 uint32_t aliasAddr = PER_BITCLR_MEM_BASE + ((uint32_t)addr -
PER_MEM_BASE);
256 *(
volatile uint32_t *)aliasAddr = mask;
287 #if defined( PER_BITCLR_MEM_BASE )
291 *addr = (*addr & ~mask) | val;
__STATIC_INLINE void BUS_RamBitWrite(volatile uint32_t *addr, unsigned int bit, unsigned int val)
Perform a single-bit write operation on a 32-bit word in RAM.
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
__STATIC_INLINE unsigned int BUS_RegBitRead(volatile const uint32_t *addr, unsigned int bit)
Perform a single-bit read operation on a peripheral register.
__STATIC_INLINE void BUS_RegMaskedSet(volatile uint32_t *addr, uint32_t mask)
Perform a masked set operation on peripheral register address.
__STATIC_INLINE void BUS_RegMaskedClear(volatile uint32_t *addr, uint32_t mask)
Perform a masked clear operation on peripheral register address.
__STATIC_INLINE uint32_t BUS_RegMaskedRead(volatile const uint32_t *addr, uint32_t mask)
Perform a peripheral register masked read.
__STATIC_INLINE unsigned int BUS_RamBitRead(volatile const uint32_t *addr, unsigned int bit)
Perform a single-bit read operation on a 32-bit word in RAM.
__STATIC_INLINE void BUS_RegMaskedWrite(volatile uint32_t *addr, uint32_t mask, uint32_t val)
Perform peripheral register masked clear and value write.
__STATIC_INLINE void BUS_RegBitWrite(volatile uint32_t *addr, unsigned int bit, unsigned int val)
Perform a single-bit write operation on a peripheral register.