11#ifndef ZEPHYR_INCLUDE_ARCH_COMMON_SYS_BITOPS_H_
12#define ZEPHYR_INCLUDE_ARCH_COMMON_SYS_BITOPS_H_
28 *(
volatile uint32_t *)addr = temp | (1 << bit);
35 *(
volatile uint32_t *)addr = temp & ~(1 << bit);
42 return temp & (1 << bit);
49 *(
volatile uint32_t *)addr = temp | mask;
56 *(
volatile uint32_t *)addr = temp & ~mask;
77 return sys_test_bit(addr + ((bit >> 5) << 2), bit & 0x1F);
#define ALWAYS_INLINE
Definition common.h:129
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
uintptr_t mem_addr_t
Definition sys_io.h:21
static ALWAYS_INLINE int sys_test_and_set_bit(mem_addr_t addr, unsigned int bit)
Definition sys_bitops.h:81
static ALWAYS_INLINE void sys_set_bit(mem_addr_t addr, unsigned int bit)
Definition sys_bitops.h:24
static ALWAYS_INLINE void sys_clear_bit(mem_addr_t addr, unsigned int bit)
Definition sys_bitops.h:31
static ALWAYS_INLINE int sys_test_bit(mem_addr_t addr, unsigned int bit)
Definition sys_bitops.h:38
static ALWAYS_INLINE void sys_clear_bits(mem_addr_t addr, unsigned int mask)
Masking the designated bits from addr to 0.
Definition sys_bitops.h:52
static ALWAYS_INLINE int sys_test_and_clear_bit(mem_addr_t addr, unsigned int bit)
Definition sys_bitops.h:92
static ALWAYS_INLINE void sys_set_bits(mem_addr_t addr, unsigned int mask)
Masking the designated bits from addr to 1.
Definition sys_bitops.h:45
#define sys_bitfield_set_bit
Definition arch.h:208
#define sys_bitfield_test_bit
Definition arch.h:210
#define sys_bitfield_clear_bit
Definition arch.h:209
#define sys_bitfield_test_and_set_bit
Definition arch.h:211
#define sys_bitfield_test_and_clear_bit
Definition arch.h:212