7#ifndef ZEPHYR_INCLUDE_DRIVERS_I3C_ADDRESSES_H_
8#define ZEPHYR_INCLUDE_DRIVERS_I3C_ADDRESSES_H_
27#define I3C_BROADCAST_ADDR 0x7E
30#define I3C_MAX_ADDR 0x7F
enum i3c_addr_slot_status i3c_addr_slots_status(struct i3c_addr_slots *slots, uint8_t dev_addr)
Get the address status of a device.
#define I3C_MAX_ADDR
Maximum value of device addresses.
Definition addresses.h:30
i3c_addr_slot_status
Enum to indicate whether an address is reserved, has I2C/I3C device attached, or no device attached.
Definition addresses.h:38
static void i3c_addr_slots_mark_rsvd(struct i3c_addr_slots *addr_slots, uint8_t addr)
Mark the address as reserved in device list.
Definition addresses.h:142
static void i3c_addr_slots_mark_i2c(struct i3c_addr_slots *addr_slots, uint8_t addr)
Mark the address as I2C device in device list.
Definition addresses.h:168
uint8_t i3c_addr_slots_next_free_find(struct i3c_addr_slots *slots, uint8_t start_addr)
Find the next free address.
bool i3c_addr_slots_is_free(struct i3c_addr_slots *slots, uint8_t dev_addr)
Check if the address is free.
static void i3c_addr_slots_mark_i3c(struct i3c_addr_slots *addr_slots, uint8_t addr)
Mark the address as I3C device in device list.
Definition addresses.h:155
void i3c_addr_slots_set(struct i3c_addr_slots *slots, uint8_t dev_addr, enum i3c_addr_slot_status status)
Set the address status of a device.
int i3c_addr_slots_init(const struct device *dev)
Initialize the I3C address slots struct.
static void i3c_addr_slots_mark_free(struct i3c_addr_slots *addr_slots, uint8_t addr)
Mark the address as free (not used) in device list.
Definition addresses.h:129
@ I3C_ADDR_SLOT_STATUS_RSVD
Address is reserved.
Definition addresses.h:43
@ I3C_ADDR_SLOT_STATUS_MASK
Bit masks used to filter status bits.
Definition addresses.h:52
@ I3C_ADDR_SLOT_STATUS_I3C_DEV
Address is associated with an I3C device.
Definition addresses.h:46
@ I3C_ADDR_SLOT_STATUS_FREE
Address has not device attached.
Definition addresses.h:40
@ I3C_ADDR_SLOT_STATUS_I2C_DEV
Address is associated with an I2C device.
Definition addresses.h:49
#define BITS_PER_LONG
Number of bits in a long int.
Definition util.h:70
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:412
Structure to keep track of addresses on I3C bus.
Definition addresses.h:58
unsigned long slots[((0x7F+1) *2)/BITS_PER_LONG]
Definition addresses.h:60
Structure for describing known devices for a controller.
Definition i3c.h:1163