7#ifndef ZEPHYR_INCLUDE_DRIVERS_I3C_ADDRESSES_H_
8#define ZEPHYR_INCLUDE_DRIVERS_I3C_ADDRESSES_H_
26#define I3C_BROADCAST_ADDR 0x7E
29#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:29
i3c_addr_slot_status
Enum to indicate whether an address is reserved, has I2C/I3C device attached, or no device attached.
Definition: addresses.h:37
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:141
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:167
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:154
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:128
@ I3C_ADDR_SLOT_STATUS_RSVD
Address is reserved.
Definition: addresses.h:42
@ I3C_ADDR_SLOT_STATUS_MASK
Bit masks used to filter status bits.
Definition: addresses.h:51
@ I3C_ADDR_SLOT_STATUS_I3C_DEV
Address is associated with an I3C device.
Definition: addresses.h:45
@ I3C_ADDR_SLOT_STATUS_FREE
Address has not device attached.
Definition: addresses.h:39
@ I3C_ADDR_SLOT_STATUS_I2C_DEV
Address is associated with an I2C device.
Definition: addresses.h:48
#define BITS_PER_LONG
Number of bits in a long int.
Definition: util.h:61
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition: device.h:399
Structure to keep track of addresses on I3C bus.
Definition: addresses.h:57
unsigned long slots[((0x7F+1) *2)/BITS_PER_LONG]
Definition: addresses.h:59
Structure for describing known devices for a controller.
Definition: i3c.h:1202