Lines Matching +full:address +full:- +full:0
4 * SPDX-License-Identifier: Apache-2.0
11 * @brief I3C Address-related Helper Code
12 * @defgroup i3c_addresses I3C Address-related Helper Code
26 /** Broadcast Address on I3C bus. */
27 #define I3C_BROADCAST_ADDR 0x7E
30 #define I3C_MAX_ADDR 0x7F
35 * Enum to indicate whether an address is reserved, has I2C/I3C device attached,
39 /** Address has not device attached. */
40 I3C_ADDR_SLOT_STATUS_FREE = 0U,
42 /** Address is reserved. */
45 /** Address is associated with an I3C device. */
48 /** Address is associated with an I2C device. */
52 I3C_ADDR_SLOT_STATUS_MASK = 0x03U,
64 * @brief Initialize the I3C address slots struct.
66 * This clears out the assigned address bits, and set the reserved
67 * address bits according to the I3C specification.
71 * @retval 0 if successful.
72 * @retval -EINVAL if duplicate addresses.
77 * @brief Set the address status of a device.
79 * @param slots Pointer to the address slots structure.
80 * @param dev_addr Device address.
81 * @param status New status for the address @p dev_addr.
88 * @brief Get the address status of a device.
90 * @param slots Pointer to the address slots structure.
91 * @param dev_addr Device address.
93 * @return Address status for the address @p dev_addr.
99 * @brief Check if the address is free.
101 * @param slots Pointer to the address slots structure.
102 * @param dev_addr Device address.
104 * @retval true if address is free.
105 * @retval false if address is not free.
111 * @brief Find the next free address.
113 * This can be used to find the next free address that can be
116 * @param slots Pointer to the address slots structure.
119 * @return The next free address, or 0 if none found.
124 * @brief Mark the address as free (not used) in device list.
126 * @param addr_slots Pointer to the address slots struct.
127 * @param addr Device address.
137 * @brief Mark the address as reserved in device list.
139 * @param addr_slots Pointer to the address slots struct.
140 * @param addr Device address.
150 * @brief Mark the address as I3C device in device list.
152 * @param addr_slots Pointer to the address slots struct.
153 * @param addr Device address.
163 * @brief Mark the address as I2C device in device list.
165 * @param addr_slots Pointer to the address slots struct.
166 * @param addr Device address.