| 
    Zephyr Project API
    3.4.0
    
   A Scalable Open Source RTOS 
   | 
 
I3C Address-related Helper Code. More...
Data Structures | |
| struct | i3c_addr_slots | 
| Structure to keep track of addresses on I3C bus.  More... | |
Macros | |
| #define | I3C_BROADCAST_ADDR 0x7E | 
| #define | I3C_MAX_ADDR 0x7F | 
Enumerations | |
| enum | i3c_addr_slot_status {  I3C_ADDR_SLOT_STATUS_FREE = 0U , I3C_ADDR_SLOT_STATUS_RSVD , I3C_ADDR_SLOT_STATUS_I3C_DEV , I3C_ADDR_SLOT_STATUS_I2C_DEV , I3C_ADDR_SLOT_STATUS_MASK = 0x03U }  | 
Functions | |
| int | i3c_addr_slots_init (const struct device *dev) | 
| Initialize the I3C address slots struct.  More... | |
| 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.  More... | |
| 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.  More... | |
| bool | i3c_addr_slots_is_free (struct i3c_addr_slots *slots, uint8_t dev_addr) | 
| Check if the address is free.  More... | |
| uint8_t | i3c_addr_slots_next_free_find (struct i3c_addr_slots *slots) | 
| Find the next free address.  More... | |
| 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.  More... | |
| static void | i3c_addr_slots_mark_rsvd (struct i3c_addr_slots *addr_slots, uint8_t addr) | 
| Mark the address as reserved in device list.  More... | |
| 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.  More... | |
| 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.  More... | |
I3C Address-related Helper Code.
| #define I3C_BROADCAST_ADDR 0x7E | 
#include <include/zephyr/drivers/i3c/addresses.h>
| #define I3C_MAX_ADDR 0x7F | 
#include <include/zephyr/drivers/i3c/addresses.h>
| enum i3c_addr_slot_status | 
#include <include/zephyr/drivers/i3c/addresses.h>
| Enumerator | |
|---|---|
| I3C_ADDR_SLOT_STATUS_FREE | |
| I3C_ADDR_SLOT_STATUS_RSVD | |
| I3C_ADDR_SLOT_STATUS_I3C_DEV | |
| I3C_ADDR_SLOT_STATUS_I2C_DEV | |
| I3C_ADDR_SLOT_STATUS_MASK | |
| int i3c_addr_slots_init | ( | const struct device * | dev | ) | 
#include <include/zephyr/drivers/i3c/addresses.h>
Initialize the I3C address slots struct.
This clears out the assigned address bits, and set the reserved address bits according to the I3C specification.
| dev | Pointer to controller device driver instance. | 
| 0 | if successful. | 
| -EINVAL | if duplicate addresses. | 
| bool i3c_addr_slots_is_free | ( | struct i3c_addr_slots * | slots, | 
| uint8_t | dev_addr | ||
| ) | 
#include <include/zephyr/drivers/i3c/addresses.h>
Check if the address is free.
| slots | Pointer to the address slots structure. | 
| dev_addr | Device address. | 
| true | if address is free. | 
| false | if address is not free. | 
      
  | 
  inlinestatic | 
#include <include/zephyr/drivers/i3c/addresses.h>
Mark the address as free (not used) in device list.
| addr_slots | Pointer to the address slots struct. | 
| addr | Device address. | 
      
  | 
  inlinestatic | 
#include <include/zephyr/drivers/i3c/addresses.h>
Mark the address as I2C device in device list.
| addr_slots | Pointer to the address slots struct. | 
| addr | Device address. | 
      
  | 
  inlinestatic | 
#include <include/zephyr/drivers/i3c/addresses.h>
Mark the address as I3C device in device list.
| addr_slots | Pointer to the address slots struct. | 
| addr | Device address. | 
      
  | 
  inlinestatic | 
#include <include/zephyr/drivers/i3c/addresses.h>
Mark the address as reserved in device list.
| addr_slots | Pointer to the address slots struct. | 
| addr | Device address. | 
| uint8_t i3c_addr_slots_next_free_find | ( | struct i3c_addr_slots * | slots | ) | 
#include <include/zephyr/drivers/i3c/addresses.h>
Find the next free address.
This can be used to find the next free address that can be assigned to a new device.
| slots | Pointer to the address slots structure. | 
| void i3c_addr_slots_set | ( | struct i3c_addr_slots * | slots, | 
| uint8_t | dev_addr, | ||
| enum i3c_addr_slot_status | status | ||
| ) | 
#include <include/zephyr/drivers/i3c/addresses.h>
Set the address status of a device.
| slots | Pointer to the address slots structure. | 
| dev_addr | Device address. | 
| status | New status for the address dev_addr.  | 
| enum i3c_addr_slot_status i3c_addr_slots_status | ( | struct i3c_addr_slots * | slots, | 
| uint8_t | dev_addr | ||
| ) | 
#include <include/zephyr/drivers/i3c/addresses.h>
Get the address status of a device.
| slots | Pointer to the address slots structure. | 
| dev_addr | Device address. | 
dev_addr.