Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sys_bitops.h File Reference
#include <zephyr/toolchain.h>
#include <zephyr/types.h>
#include <zephyr/sys/sys_io.h>

Go to the source code of this file.

Functions

static ALWAYS_INLINE void sys_set_bit (mem_addr_t addr, unsigned int bit)
 
static ALWAYS_INLINE void sys_clear_bit (mem_addr_t addr, unsigned int bit)
 
static ALWAYS_INLINE int sys_test_bit (mem_addr_t addr, unsigned int bit)
 
static ALWAYS_INLINE void sys_set_bits (mem_addr_t addr, unsigned int mask)
 Masking the designated bits from addr to 1.
 
static ALWAYS_INLINE void sys_clear_bits (mem_addr_t addr, unsigned int mask)
 Masking the designated bits from addr to 0.
 
static ALWAYS_INLINE void sys_bitfield_set_bit (mem_addr_t addr, unsigned int bit)
 
static ALWAYS_INLINE void sys_bitfield_clear_bit (mem_addr_t addr, unsigned int bit)
 
static ALWAYS_INLINE int sys_bitfield_test_bit (mem_addr_t addr, unsigned int bit)
 
static ALWAYS_INLINE int sys_test_and_set_bit (mem_addr_t addr, unsigned int bit)
 
static ALWAYS_INLINE int sys_test_and_clear_bit (mem_addr_t addr, unsigned int bit)
 
static ALWAYS_INLINE int sys_bitfield_test_and_set_bit (mem_addr_t addr, unsigned int bit)
 
static ALWAYS_INLINE int sys_bitfield_test_and_clear_bit (mem_addr_t addr, unsigned int bit)
 

Function Documentation

◆ sys_bitfield_clear_bit()

static ALWAYS_INLINE void sys_bitfield_clear_bit ( mem_addr_t addr,
unsigned int bit )
static

◆ sys_bitfield_set_bit()

static ALWAYS_INLINE void sys_bitfield_set_bit ( mem_addr_t addr,
unsigned int bit )
static

◆ sys_bitfield_test_and_clear_bit()

static ALWAYS_INLINE int sys_bitfield_test_and_clear_bit ( mem_addr_t addr,
unsigned int bit )
static

◆ sys_bitfield_test_and_set_bit()

static ALWAYS_INLINE int sys_bitfield_test_and_set_bit ( mem_addr_t addr,
unsigned int bit )
static

◆ sys_bitfield_test_bit()

static ALWAYS_INLINE int sys_bitfield_test_bit ( mem_addr_t addr,
unsigned int bit )
static

◆ sys_clear_bit()

static ALWAYS_INLINE void sys_clear_bit ( mem_addr_t addr,
unsigned int bit )
static

◆ sys_clear_bits()

static ALWAYS_INLINE void sys_clear_bits ( mem_addr_t addr,
unsigned int mask )
static

Masking the designated bits from addr to 0.

This functions masking designated bits from addr to 0.

Parameters
addrthe memory address from where to look for the bits
maskthe bit mask of a 32 bits data to set

◆ sys_set_bit()

static ALWAYS_INLINE void sys_set_bit ( mem_addr_t addr,
unsigned int bit )
static

◆ sys_set_bits()

static ALWAYS_INLINE void sys_set_bits ( mem_addr_t addr,
unsigned int mask )
static

Masking the designated bits from addr to 1.

This functions masking designated bits from addr to 1.

Parameters
addrthe memory address from where to look for the bits
maskthe bit mask of a 32 bits data to set

◆ sys_test_and_clear_bit()

static ALWAYS_INLINE int sys_test_and_clear_bit ( mem_addr_t addr,
unsigned int bit )
static

◆ sys_test_and_set_bit()

static ALWAYS_INLINE int sys_test_and_set_bit ( mem_addr_t addr,
unsigned int bit )
static

◆ sys_test_bit()

static ALWAYS_INLINE int sys_test_bit ( mem_addr_t addr,
unsigned int bit )
static