13#ifndef ZEPHYR_INCLUDE_SYS_SYS_IO_H_
14#define ZEPHYR_INCLUDE_SYS_SYS_IO_H_
uint32_t io_port_t
I/O port address.
Definition sys_io.h:35
uintptr_t mm_reg_t
Memory-mapped register address.
Definition sys_io.h:38
uintptr_t mem_addr_t
Memory address.
Definition sys_io.h:41
static ALWAYS_INLINE int sys_test_and_set_bit(mem_addr_t addr, unsigned int bit)
Test the bit and set it.
static ALWAYS_INLINE void sys_set_bit(mem_addr_t addr, unsigned int bit)
Set the designated bit from addr to 1.
static ALWAYS_INLINE int sys_bitfield_test_bit(mem_addr_t addr, unsigned int bit)
Test the bit if it is set or not.
static ALWAYS_INLINE void sys_clear_bit(mem_addr_t addr, unsigned int bit)
Clear the designated bit from addr to 0.
static ALWAYS_INLINE int sys_test_bit(mem_addr_t addr, unsigned int bit)
Test the bit if it is set or not.
static ALWAYS_INLINE void sys_bitfield_set_bit(mem_addr_t addr, unsigned int bit)
Set the designated bit 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 int sys_bitfield_test_and_clear_bit(mem_addr_t addr, unsigned int bit)
Test the bit and clear it.
static ALWAYS_INLINE int sys_bitfield_test_and_set_bit(mem_addr_t addr, unsigned int bit)
Test the bit and set it.
static ALWAYS_INLINE int sys_test_and_clear_bit(mem_addr_t addr, unsigned int bit)
Test the bit and clear it.
static ALWAYS_INLINE void sys_bitfield_clear_bit(mem_addr_t addr, unsigned int bit)
Clear the designated bit from addr to 0.
static ALWAYS_INLINE void sys_set_bits(mem_addr_t addr, unsigned int mask)
Masking the designated bits from addr to 1.
static void sys_write64(uint64_t data, mm_reg_t addr)
Write 64 bits to a memory mapped register.
static uint64_t sys_read64(mm_reg_t addr)
Read 64 bits from a memory mapped register.
static uint16_t sys_read16(mm_reg_t addr)
Read 16 bits from a memory mapped register.
static uint8_t sys_read8(mm_reg_t addr)
Read a byte from a memory mapped register.
static void sys_write8(uint8_t data, mm_reg_t addr)
Write a byte to a memory mapped register.
static uint32_t sys_read32(mm_reg_t addr)
Read 32 bits from a memory mapped register.
static void sys_write16(uint16_t data, mm_reg_t addr)
Write 16 bits to a memory mapped register.
static void sys_write32(uint32_t data, mm_reg_t addr)
Write 32 bits to a memory mapped register.
static uint8_t sys_in8(io_port_t port)
Input a byte from an I/O port.
static void sys_io_clear_bit(io_port_t port, unsigned int bit)
Clear the designated bit from port to 0.
static uint16_t sys_in16(io_port_t port)
Input 16 bits from an I/O port.
static void sys_out16(uint16_t data, io_port_t port)
Output a 16 bits to an I/O port.
static void sys_out32(uint32_t data, io_port_t port)
Output 32 bits to an I/O port.
static void sys_io_set_bit(io_port_t port, unsigned int bit)
Set the designated bit from port to 1.
static int sys_io_test_and_set_bit(io_port_t port, unsigned int bit)
Test the bit from port and set it.
static int sys_io_test_bit(io_port_t port, unsigned int bit)
Test the bit from port if it is set or not.
static void sys_out8(uint8_t data, io_port_t port)
Output a byte to an I/O port.
static uint32_t sys_in32(io_port_t port)
Input 32 bits from an I/O port.
static int sys_io_test_and_clear_bit(io_port_t port, unsigned int bit)
Test the bit from port and clear it.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105
__UINT16_TYPE__ uint16_t
Definition stdint.h:89