@@ -202,6 +202,49 @@ struct i3c_target_callbacks {
202202 int (* read_processed_cb )(struct i3c_target_config * config ,
203203 uint8_t * val );
204204
205+ #ifdef CONFIG_I3C_TARGET_BUFFER_MODE
206+ /** @brief Function called when a write to the device is completed.
207+ *
208+ * This function is invoked by the controller when it completes
209+ * reception of data from the source buffer to the destination
210+ * buffer in an ongoing write operation to the device.
211+ *
212+ * @param config Configuration structure associated with the
213+ * device to which the operation is addressed.
214+ *
215+ * @param ptr pointer to the buffer that contains the data to be transferred.
216+ *
217+ * @param len the length of the data to be transferred.
218+ */
219+ void (* buf_write_received_cb )(struct i3c_target_config * config , uint8_t * ptr , uint32_t len );
220+
221+ /** @brief Function called when a read from the device is initiated.
222+ *
223+ * This function is invoked by the controller when the bus is ready to
224+ * provide additional data by buffer for a read operation from the address
225+ * associated with the device.
226+ *
227+ * The value returned in @p **ptr and @p *len will be transmitted. A success
228+ * return shall cause the controller to react to additional read operations.
229+ * An error return shall cause the controller to ignore bus operations until
230+ * a new start condition is received.
231+ *
232+ * @param config the configuration structure associated with the
233+ * device to which the operation is addressed.
234+ *
235+ * @param ptr pointer to storage for the address of data buffer to return
236+ * for the read request.
237+ *
238+ * @param len pointer to storage for the length of the data to be transferred
239+ * for the read request.
240+ *
241+ * @param hdr_mode HDR mode
242+ *
243+ * @return 0 if data has been provided, or a negative error code.
244+ */
245+ int (* buf_read_requested_cb )(struct i3c_target_config * config , uint8_t * * ptr , uint32_t * len ,
246+ uint8_t * hdr_mode );
247+ #endif
205248 /**
206249 * @brief Function called when a stop condition is observed after a
207250 * start condition addressed to a particular device.
0 commit comments