3.13 I3C Controller Driver

Overview

The Improved Inter-Integrated Circuit (I3C) Controller driver provides implementation for operating the dsPIC33AK I3C peripheral in Controller (Master) mode. The I3C interface, developed by the MIPI® Alliance, is a high-speed, low-power, managed two-wire digital interface designed for sensor and device integration. It is backward compatible with legacy I2C devices and adheres to the MIPI I3C® Basic Specification v1.1.1.

In Controller mode, the device initiates and manages all transfers on the bus, performs dynamic address assignment to I3C targets, services In-Band Interrupts (IBI) from targets, and handles Hot-Join requests from devices joining the bus. The Controller supports mixed-bus operation with both I3C and legacy I2C devices. Data transfers are DMA-assisted for efficient high-throughput operation without CPU intervention during the data phase.

Features

  • Two-wire serial interface supporting SDR speeds up to 12.5 MHz and HDR-DDR mode.
  • I2C backward compatible with legacy I2C device support at FM and FM+ speeds.
  • Dynamic address assignment via ENTDAA, SETDASA, SETAASA, and SETNEWDA Common Command Codes.
  • Device Address Table supporting up to 18 target devices (I3C and legacy I2C combined).
  • In-Band Interrupt (IBI) servicing with configurable per-target IBI acceptance and up to 64-byte payload support.
  • Hot-Join support with configurable ACK/NACK response for devices joining an active bus.
  • DMA-based transmit and receive for efficient transfers without CPU-managed byte loops.
  • HDR-DDR (High Data Rate – Double Data Rate) private transfer support for increased throughput.
  • Packet Error Check (PEC) with CRC-8 generation and validation on SDR transfers.
  • Comprehensive Common Command Code (CCC) support including broadcast, direct, and vendor-specific commands.
  • Multi-message transfer API for complex read/write sequences with configurable RESTART/STOP termination.
  • Burst read and burst write operations for efficient register-based target access.
  • Bus recovery mechanism with abort and resume capability for error recovery.
  • Target Reset Pattern support for resetting unresponsive target devices.
  • ECC protection on internal SRAM (FIFOs/queues) with single-bit correction and double-bit detection interrupts.
  • Configurable NACK retry count per target device.
  • Callback-driven architecture with event, IBI, error, and ECC callbacks for application notification.

3.13.1 Module Documentation

3.13.1.1 I3C Controller Driver

I3C Controller driver interface using dsPIC MCUs.

3.13.1.1.1 Module description

I3C Controller driver interface using dsPIC MCUs.

Data structures
Enumerations
Functions
Variables

3.13.1.1.2 Typedef Documentation

I3C_Controller_I2CDeviceDesc_t

typedef struct i3c_i2c_device_desc I3C_Controller_I2CDeviceDesc_t

Legacy I2C device descriptor for I2C devices on the I3C bus.

I3C_Controller_TargetDevicDesc_t

typedef struct i3c_device_desc I3C_Controller_TargetDevicDesc_t

I3C Target device descriptor containing device identification and configuration.

3.13.1.1.3 Function Documentation

I3C1_Controller_Abort()

I3C_ControllerStatus_t I3C1_Controller_Abort (void )

Aborts the current I3C transfer operation.

Returns:

I3C_ControllerStatus_t - Status of abort operation

Return values:
I3C_CONTROLLER_OK

- Abort completed

I3C_CONTROLLER_TIMEOUT

- Abort timed out

I3C1_Controller_AbortIsDone()

I3C_ControllerStatus_t I3C1_Controller_AbortIsDone (void )

Checks if abort operation has completed.

Returns:

I3C_ControllerStatus_t - Status of abort operation

Return values:
I3C_CONTROLLER_OK

- Abort completed

I3C_CONTROLLER_BUS_RECOV_MODE

- Abort still in progress

I3C1_Controller_AttachI2CDevice()

I3C_ControllerStatus_t I3C1_Controller_AttachI2CDevice (I3C_Controller_I2CDeviceDesc_t * i2cDevice)

Attaches an I2C device to the controller's device address table.

Precondition:

I3C1_Controller_Initialize() must be called first.

Parameters:
i2cDevice

- Pointer to the I2C device descriptor

Returns:

I3C_ControllerStatus_t - Status of attach operation

Return values:
I3C_CONTROLLER_OK

- Device attached successfully

I3C_CONTROLLER_DEVICE_TABLE_FULL

- No available slots in device table

I3C1_Controller_AttachI3CDevice()

I3C_ControllerStatus_t I3C1_Controller_AttachI3CDevice (I3C_Controller_TargetDevicDesc_t * i3cTarget)

Attaches an I3C device to the controller's device address table.

Precondition:

I3C1_Controller_Initialize() must be called first.

Parameters:
target

- Pointer to the I3C target device descriptor

Returns:

I3C_ControllerStatus_t - Status of attach operation

Return values:
I3C_CONTROLLER_OK

- Device attached successfully

I3C_CONTROLLER_DEVICE_TABLE_FULL

- No available slots in device table

I3C1_Controller_BufferResetAll()

void I3C1_Controller_BufferResetAll (void )

Resets all TX/RX FIFOs, command queue, response queue, and IBI queue.

Returns:
I3C1_Controller_BurstRead()

I3C_ControllerStatus_t I3C1_Controller_BurstRead (I3C_Controller_TargetDevicDesc_t * target, uint8_t start_addr, uint8_t * buf, uint32_t num_bytes)

Performs a burst read from consecutive registers starting at specified address.

Precondition:

I3C1_Controller_Initialize() must be called first.

Target device must be attached and have a valid dynamic address assigned.

If num_bytes > 4, the buf must be 4-byte aligned.

Only one transfer can be in progress at a time. Returns I3C_CONTROLLER_TRANFER_BUSY if a transfer is already active.

Parameters:
target

- Pointer to the target device descriptor

start_addr

- Starting register address for burst read

buf

- Pointer to buffer to store read data

num_bytes

- Number of bytes to read

Returns:

I3C_ControllerStatus_t - Status of read operation

Note:

Operations may timeout - always check return status.

I3C1_Controller_BurstWrite()

I3C_ControllerStatus_t I3C1_Controller_BurstWrite (I3C_Controller_TargetDevicDesc_t * target, uint8_t start_addr, uint8_t * buf, uint32_t num_bytes)

Performs a burst write to consecutive registers starting at specified address.

Precondition:

I3C1_Controller_Initialize() must be called first.

Target device must be attached and have a valid dynamic address assigned.

If num_bytes > 4, the buf must be 4-byte aligned.

Only one transfer can be in progress at a time. Returns I3C_CONTROLLER_TRANFER_BUSY if a transfer is already active.

Parameters:
target

- Pointer to the target device descriptor

start_addr

- Starting register address for burst write

buf

- Pointer to data buffer to write

num_bytes

- Number of bytes to write

Returns:

I3C_ControllerStatus_t - Status of write operation

Note:

Operations may timeout - always check return status.

I3C1_Controller_BusReset()

void I3C1_Controller_BusReset (void )

Initiates target reset via I3C bus reset pattern.

Returns:
I3C1_Controller_CccDoDeftgtsAll()

I3C_ControllerStatus_t I3C1_Controller_CccDoDeftgtsAll (I3C_Controller_CccDeftgts_t * deftgts)

Executes broadcast DEFTGTS CCC to define list of targets.

Parameters:
deftgts

- Pointer to structure containing target list definition

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoEntas()

I3C_ControllerStatus_t I3C1_Controller_CccDoEntas (const I3C_Controller_TargetDevicDesc_t * target, uint8_t as)

Executes directed ENTAS CCC to enter activity state for specific target.

Parameters:
target

- Pointer to the target device descriptor

as

- Activity state (0-3)

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoEntasAll()

I3C_ControllerStatus_t I3C1_Controller_CccDoEntasAll (uint8_t as)

Executes broadcast ENTAS CCC to enter activity state for all targets.

Parameters:
as

- Activity state (0-3)

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoEnttm()

I3C_ControllerStatus_t I3C1_Controller_CccDoEnttm (I3C_Controller_CccEnttmDefbyte_t defbyte)

Executes ENTTM CCC to enter test mode.

Parameters:
defbyte

- Defining byte for test mode

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoEventsAllSet()

I3C_ControllerStatus_t I3C1_Controller_CccDoEventsAllSet (bool enable, I3C_Controller_CccEvents_t * events)

Executes broadcast ENEC/DISEC CCC to enable/disable events for all targets.

Parameters:
enable

- True to enable events, false to disable

events

- Pointer to events structure specifying which events to control

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoEventsSet()

I3C_ControllerStatus_t I3C1_Controller_CccDoEventsSet (I3C_Controller_TargetDevicDesc_t * target, bool enable, I3C_Controller_CccEvents_t * events)

Executes directed ENEC/DISEC CCC to enable/disable events for specific target.

Parameters:
target

- Pointer to the target device descriptor

enable

- True to enable events, false to disable

events

- Pointer to events structure specifying which events to control

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoGetAcccr()

I3C_ControllerStatus_t I3C1_Controller_CccDoGetAcccr (const I3C_Controller_TargetDevicDesc_t * target, uint8_t * handoff_address)

Executes GETACCR CCC to get accept controller role handoff address.

Parameters:
target

- Pointer to the target device descriptor

handoff_address

- Pointer to store handoff address

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoGetBcr()

I3C_ControllerStatus_t I3C1_Controller_CccDoGetBcr (I3C_Controller_TargetDevicDesc_t * target, I3C_Controller_CccBcr_t * bcr)

Executes GETBCR CCC to retrieve Bus Characteristics Register.

Parameters:
target

- Pointer to the target device descriptor

bcr

- Pointer to structure to store BCR value

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoGetCaps()

I3C_ControllerStatus_t I3C1_Controller_CccDoGetCaps (const I3C_Controller_TargetDevicDesc_t * target, I3C_Controller_CccCaps_t * caps, I3C_Controller_CccCapsFmt_t fmt, uint8_t defbyte)

Executes GETCAPS CCC to retrieve device capabilities from target.

Parameters:
target

- Pointer to the target device descriptor

caps

- Pointer to union to store capabilities result

fmt

- Format of capabilities response

defbyte

- Defining byte for capabilities request

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoGetDcr()

I3C_ControllerStatus_t I3C1_Controller_CccDoGetDcr (I3C_Controller_TargetDevicDesc_t * target, I3C_Controller_CccDcr_t * dcr)

Executes GETDCR CCC to retrieve Device Characteristics Register.

Parameters:
target

- Pointer to the target device descriptor

dcr

- Pointer to structure to store DCR value

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoGetMrl()

I3C_ControllerStatus_t I3C1_Controller_CccDoGetMrl (const I3C_Controller_TargetDevicDesc_t * target, I3C_Controller_CccMrl_t * mrl)

Executes GETMRL CCC to retrieve max read length from target.

Parameters:
target

- Pointer to the target device descriptor

mrl

- Pointer to MRL structure to store result

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoGetMwl()

I3C_ControllerStatus_t I3C1_Controller_CccDoGetMwl (const I3C_Controller_TargetDevicDesc_t * target, I3C_Controller_CccMwl_t * mwl)

Executes GETMWL CCC to retrieve max write length from target.

Parameters:
target

- Pointer to the target device descriptor

mwl

- Pointer to MWL structure to store result

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoGetmxds()

I3C_ControllerStatus_t I3C1_Controller_CccDoGetmxds (const I3C_Controller_TargetDevicDesc_t * target, I3C_Controller_CccMxds_t * caps, I3C_Controller_CccMxdsFmt_t fmt, I3C_Controller_CccMxdsDefbyte_t defbyte)

Executes GETMXDS CCC to retrieve max data speed from target.

Parameters:
target

- Pointer to the target device descriptor

caps

- Pointer to union to store result

fmt

- Format of response

defbyte

- Defining byte for request

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoGetPid()

I3C_ControllerStatus_t I3C1_Controller_CccDoGetPid (I3C_Controller_TargetDevicDesc_t * target, I3C_Controller_CCCPid_t * pid)

Executes GETPID CCC to retrieve Provisional ID.

Parameters:
target

- Pointer to the target device descriptor

pid

- Pointer to structure to store 48-bit PID

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoGetStatus()

I3C_ControllerStatus_t I3C1_Controller_CccDoGetStatus (const I3C_Controller_TargetDevicDesc_t * target, I3C_Controller_CccStatus_t * status, I3C_Controller_CccStatusFmt_t fmt, I3C_Controller_CccStatusDefbyte_t defbyte)

Executes GETSTATUS CCC to retrieve device status from target.

Parameters:
target

- Pointer to the target device descriptor

status

- Pointer to union to store status result

fmt

- Format of status response

defbyte

- Defining byte for status request

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoGetVendor()

I3C_ControllerStatus_t I3C1_Controller_CccDoGetVendor (const I3C_Controller_TargetDevicDesc_t * target, uint8_t id, uint8_t * payload, size_t len, size_t * num_xfer)

Executes vendor-specific directed read CCC.

Parameters:
target

- Pointer to the target device descriptor

id

- Vendor CCC ID

payload

- Pointer to buffer to store response

len

- Maximum length of response buffer

num_xfer

- Pointer to store actual bytes transferred

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoGetVendorDefbyte()

I3C_ControllerStatus_t I3C1_Controller_CccDoGetVendorDefbyte (const I3C_Controller_TargetDevicDesc_t * target, uint8_t id, uint8_t defbyte, uint8_t * payload, size_t len, size_t * num_xfer)

Executes vendor-specific directed read CCC with defining byte.

Parameters:
target

- Pointer to the target device descriptor

id

- Vendor CCC ID

defbyte

- Defining byte for vendor CCC

payload

- Pointer to buffer to store response

len

- Maximum length of response buffer

num_xfer

- Pointer to store actual bytes transferred

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoRstact()

I3C_ControllerStatus_t I3C1_Controller_CccDoRstact (const I3C_Controller_TargetDevicDesc_t * target, I3C_Controller_CCCRstactDefiningByte_t action, bool get, uint8_t * data)

Executes directed RSTACT CCC to specific target.

Parameters:
target

- Pointer to the target device descriptor

action

- Reset action defining byte

get

- True for read, false for write

data

- Pointer to data buffer for read/write

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoRstactAll()

I3C_ControllerStatus_t I3C1_Controller_CccDoRstactAll (I3C_Controller_CCCRstactDefiningByte_t action)

Executes broadcast RSTACT CCC to all targets.

Parameters:
action

- Reset action defining byte

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoRstdaa()

I3C_ControllerStatus_t I3C1_Controller_CccDoRstdaa (I3C_Controller_TargetDevicDesc_t * target)

Executes directed RSTDAA CCC to reset dynamic address of specific target.

Parameters:
target

- Pointer to the target device descriptor

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoRstdaaAll()

I3C_ControllerStatus_t I3C1_Controller_CccDoRstdaaAll (void )

Executes broadcast RSTDAA CCC to reset dynamic addresses of all targets.

Returns:
I3C1_Controller_CccDoSetAasaAll()

I3C_ControllerStatus_t I3C1_Controller_CccDoSetAasaAll (void )

Executes broadcast SETAASA CCC to set all addresses to static.

Returns:
I3C1_Controller_CccDoSetBuscon()

I3C_ControllerStatus_t I3C1_Controller_CccDoSetBuscon (uint8_t * context, uint16_t length)

Executes SETBUSCON CCC to set bus context.

Parameters:
context

- Pointer to bus context data

length

- Length of context data

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoSetDasa()

I3C_ControllerStatus_t I3C1_Controller_CccDoSetDasa (I3C_Controller_TargetDevicDesc_t * target, uint8_t da)

Executes SETDASA CCC to set dynamic address from static address.

Parameters:
target

- Pointer to the target device descriptor

da

- Dynamic address to assign

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoSetMrl()

I3C_ControllerStatus_t I3C1_Controller_CccDoSetMrl (const I3C_Controller_TargetDevicDesc_t * target, const I3C_Controller_CccMrl_t * mrl)

Executes directed SETMRL CCC to set max read length for specific target.

Parameters:
target

- Pointer to the target device descriptor

mrl

- Pointer to MRL structure containing max read length

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoSetMrlAll()

I3C_ControllerStatus_t I3C1_Controller_CccDoSetMrlAll (const I3C_Controller_CccMrl_t * mrl, bool has_ibi_size)

Executes broadcast SETMRL CCC to set max read length for all targets.

Parameters:
mrl

- Pointer to MRL structure containing max read length

has_ibi_size

- True if IBI size field is included

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoSetMwl()

I3C_ControllerStatus_t I3C1_Controller_CccDoSetMwl (const I3C_Controller_TargetDevicDesc_t * target, const I3C_Controller_CccMwl_t * mwl)

Executes directed SETMWL CCC to set max write length for specific target.

Parameters:
target

- Pointer to the target device descriptor

mwl

- Pointer to MWL structure containing max write length

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoSetMwlAll()

I3C_ControllerStatus_t I3C1_Controller_CccDoSetMwlAll (const I3C_Controller_CccMwl_t * mwl)

Executes broadcast SETMWL CCC to set max write length for all targets.

Parameters:
mwl

- Pointer to MWL structure containing max write length

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoSetNewda()

I3C_ControllerStatus_t I3C1_Controller_CccDoSetNewda (I3C_Controller_TargetDevicDesc_t * target, uint8_t new_da)

Executes SETNEWDA CCC to set a new dynamic address.

Parameters:
target

- Pointer to the target device descriptor

new_da

- New dynamic address to assign

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoSetVendor()

I3C_ControllerStatus_t I3C1_Controller_CccDoSetVendor (const I3C_Controller_TargetDevicDesc_t * target, uint8_t id, uint8_t * payload, size_t len)

Executes vendor-specific directed write CCC.

Parameters:
target

- Pointer to the target device descriptor

id

- Vendor CCC ID

payload

- Pointer to payload data

len

- Length of payload data

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_CccDoSetVendorAll()

I3C_ControllerStatus_t I3C1_Controller_CccDoSetVendorAll (uint8_t id, uint8_t * payload, size_t len)

Executes vendor-specific broadcast write CCC.

Parameters:
id

- Vendor CCC ID

payload

- Pointer to payload data

len

- Length of payload data

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_DECCCallback()

void I3C1_Controller_DECCCallback (void )

Default double-bit ECC error callback handler (weak implementation)

Returns:
I3C1_Controller_DECCCallbackRegister()

void I3C1_Controller_DECCCallbackRegister (void(*)(void) handler)

Registers a custom double-bit ECC error callback handler.

Parameters:
handler

- Function pointer to custom callback

Returns:

None

I3C1_Controller_Deinitialize()

I3C_ControllerStatus_t I3C1_Controller_Deinitialize (void )

Deinitializes the I3C1 Controller module and releases resources.

Returns:

I3C_ControllerStatus_t - Status of deinitialization operation

Return values:
I3C_CONTROLLER_OK

- Deinitialization successful

I3C_CONTROLLER_TIMEOUT

- Deinitialization timed out

I3C1_Controller_Disable()

void I3C1_Controller_Disable (void )

Disables the I3C1 Controller module.

Returns:
I3C1_Controller_DoCcc()

I3C_ControllerStatus_t I3C1_Controller_DoCcc (I3C_Controller_CccPayload_t * payload)

Executes a generic CCC command using payload structure.

Parameters:
payload

- Pointer to CCC payload structure

Returns:

I3C_ControllerStatus_t - Status of CCC operation

I3C1_Controller_DoDaa()

I3C_ControllerStatus_t I3C1_Controller_DoDaa (uint8_t startNode, uint8_t targetCount)

Performs Dynamic Address Assignment (DAA) for I3C target devices using ENTDAA CCC.

Precondition:

I3C1_Controller_Initialize() must be called first.

Target devices must be attached using AttachI3CDevice before DAA.

Parameters:
startNode

- Starting device index in the device address table from which DAA begins. This corresponds to the node index assigned during AttachI3CDevice.

targetCount

- Number of target devices to assign dynamic addresses to.

Returns:

I3C_ControllerStatus_t - Status of DAA operation

Return values:
I3C_CONTROLLER_OK

- DAA initiated successfully

Note:

This function initiates the ENTDAA (Enter Dynamic Address Assignment) process. The DAA completion is indicated via the I3C_CONTROLLER_EVENT_ADDR_ASSIGN event callback. Target's PID, BCR, and DCR are populated in the device descriptor only after DAA completes successfully. If some devices do not ACK during DAA, the remaining device count is available in the response data length field.

I3C1_Controller_Enable()

void I3C1_Controller_Enable (void )

Enables the I3C1 Controller module.

Precondition:

I3C1_Controller_Initialize() must be called first.

Attach devices using AttachI3CDevice/AttachI2CDevice before enabling if pre-configured targets exist.

Returns:

None

I3C1_Controller_ErrorCallback()

void I3C1_Controller_ErrorCallback (I3C_ControllerErrorStatus_t error)

Default error callback handler (weak implementation)

Parameters:
error

- Error status that occurred

Returns:

None

I3C1_Controller_ErrorCallbackRegister()

void I3C1_Controller_ErrorCallbackRegister (void(*)(I3C_ControllerErrorStatus_t) handler)

Registers a custom error callback handler.

Parameters:
handler

- Function pointer to custom callback

Returns:

None

I3C1_Controller_EventCallback()

void I3C1_Controller_EventCallback (I3C_ControllerEvent_t event)

Default event callback handler (weak implementation)

Parameters:
event

- Event type that occurred

Returns:

None

I3C1_Controller_EventCallbackRegister()

void I3C1_Controller_EventCallbackRegister (void(*)(I3C_ControllerEvent_t) handler)

Registers a custom event callback handler.

Parameters:
handler

- Function pointer to custom callback

Returns:

None

I3C1_Controller_GetCurrentState()

I3C_ControllerState_t I3C1_Controller_GetCurrentState (void )

Gets the current state of the controller state machine.

Returns:
I3C1_Controller_GetTargetCount()

uint8_t I3C1_Controller_GetTargetCount (void )

Gets the total count of attached I3C and I2C target devices.

Returns:
I3C1_Controller_GetTransferState()

I3C_ControllerTransferState_t I3C1_Controller_GetTransferState (void )

Gets the current transfer state of the controller.

Returns:
I3C1_Controller_HotjoinDisable()

void I3C1_Controller_HotjoinDisable (void )

Disables Hot-Join acceptance on the I3C bus.

Returns:
I3C1_Controller_HotjoinEnable()

void I3C1_Controller_HotjoinEnable (void )

Enables Hot-Join acceptance on the I3C bus.

Returns:
I3C1_Controller_I2CRead()

I3C_ControllerStatus_t I3C1_Controller_I2CRead (I3C_Controller_I2CDeviceDesc_t * device, uint8_t * data, size_t dataLength, uint8_t speed)

Performs an I2C read transfer from a legacy I2C device.

Precondition:

I3C1_Controller_Initialize() must be called first.

I2C device must be attached using AttachI2CDevice.

If dataLength > 4 bytes, the data buffer must be 4-byte aligned.

Only one transfer can be in progress at a time. Returns I3C_CONTROLLER_TRANFER_BUSY if a transfer is already active.

Parameters:
device

- Pointer to the I2C device descriptor

data

- Pointer to buffer to store read data

dataLength

- Number of bytes to read

speed

- I2C speed mode (I3C_SPEED_I2C_FM or I3C_SPEED_I2C_FM_PLUS)

Returns:

I3C_ControllerStatus_t - Status of read operation

Note:

Operations may timeout - always check return status.

I3C1_Controller_I2CWrite()

I3C_ControllerStatus_t I3C1_Controller_I2CWrite (I3C_Controller_I2CDeviceDesc_t * device, uint8_t * data, size_t dataLength, uint8_t speed)

Performs an I2C write transfer to a legacy I2C device.

Precondition:

I3C1_Controller_Initialize() must be called first.

I2C device must be attached using AttachI2CDevice.

If dataLength > 4 bytes, the data buffer must be 4-byte aligned.

Only one transfer can be in progress at a time. Returns I3C_CONTROLLER_TRANFER_BUSY if a transfer is already active.

Parameters:
device

- Pointer to the I2C device descriptor

data

- Pointer to data buffer to write

dataLength

- Number of bytes to write

speed

- I2C speed mode (I3C_SPEED_I2C_FM or I3C_SPEED_I2C_FM_PLUS)

Returns:

I3C_ControllerStatus_t - Status of write operation

Note:

Operations may timeout - always check return status.

I3C1_Controller_I2CWriteRead()

I3C_ControllerStatus_t I3C1_Controller_I2CWriteRead (I3C_Controller_I2CDeviceDesc_t * device, uint8_t * writeData, size_t writeLength, uint8_t * readData, size_t readLength, uint8_t speed)

Performs a combined I2C write-read transfer to a legacy I2C device.

Precondition:

I3C1_Controller_Initialize() must be called first.

I2C device must be attached using AttachI2CDevice.

If writeLength > 4 bytes, writeData must be 4-byte aligned.

If readLength > 4 bytes, readData must be 4-byte aligned.

Only one transfer can be in progress at a time. Returns I3C_CONTROLLER_TRANFER_BUSY if a transfer is already active.

Parameters:
device

- Pointer to the I2C device descriptor

writeData

- Pointer to data buffer to write

writeLength

- Number of bytes to write

readData

- Pointer to buffer to store read data

readLength

- Number of bytes to read

speed

- I2C speed mode

Returns:

I3C_ControllerStatus_t - Status of transfer operation

Note:

Operations may timeout - always check return status.

I3C1_Controller_IBICallback()

void I3C1_Controller_IBICallback (uint8_t dynamicAddress, uint8_t ibiLength, uint8_t * payload)

Default IBI callback handler (weak implementation)

Parameters:
dynamicAddress

- dynamic address of the IBI requested target

ibiLength

- IBI data length

payload

- IBI payload pointer if data length > 0

Returns:

None

I3C1_Controller_IBICallbackRegister()

void I3C1_Controller_IBICallbackRegister (void(*)(uint8_t dynamicAddress, uint8_t ibiLength, uint8_t *payload) handler)

Registers a custom IBI callback handler.

Parameters:
handler

- Function pointer to custom callback

Returns:

None

I3C1_Controller_IBIDataRead()

uint8_t I3C1_Controller_IBIDataRead (uint32_t * ibiData, uint16_t length)

Reads IBI payload data from IBI queue (call only when IBI data length > 0)

Parameters:
ibiData

- Pointer to buffer to store IBI payload words

length

- Number of bytes to read

Returns:

uint8_t - Number of words actually read

I3C1_Controller_IBIDisable()

I3C_ControllerStatus_t I3C1_Controller_IBIDisable (I3C_Controller_TargetDevicDesc_t * target)

Disables In-Band Interrupt (IBI) for a specific target device.

Parameters:
target

- Pointer to the target device descriptor

Returns:

I3C_ControllerStatus_t - Status of IBI disable operation

Return values:
I3C_CONTROLLER_OK

- IBI disabled successfully

I3C_CONTROLLER_INVALID_PARAM

- Invalid target or node index

I3C1_Controller_IBIEnable()

I3C_ControllerStatus_t I3C1_Controller_IBIEnable (I3C_Controller_TargetDevicDesc_t * target)

Enables In-Band Interrupt (IBI) for a specific target device.

Parameters:
target

- Pointer to the target device descriptor

Returns:

I3C_ControllerStatus_t - Status of IBI enable operation

Return values:
I3C_CONTROLLER_OK

- IBI enabled successfully

I3C_CONTROLLER_INVALID_PARAM

- Invalid target or node index

I3C1_Controller_IBIHotJoinResponse()

I3C_ControllerStatus_t I3C1_Controller_IBIHotJoinResponse (bool ack)

Configures Hot-Join response behavior for the controller.

Parameters:
ack

- True to ACK Hot-Join requests, false to NACK them

Returns:

I3C_ControllerStatus_t - Status of Hot-Join configuration

Return values:
I3C_CONTROLLER_OK

- Hot-Join response configured successfully

I3C1_Controller_IBIStatusRead()

uint8_t I3C1_Controller_IBIStatusRead (I3C_IBIData_t * ibiStatus)

Reads IBI status from IBI queue (must be called in callback context)

Parameters:
ibiStatus

- Pointer to structure to store IBI status data

Returns:

uint8_t - Remaining IBI status count in queue

I3C1_Controller_Initialize()

I3C_ControllerStatus_t I3C1_Controller_Initialize (void )

Initializes the I3C1 Controller module with configured settings.

Returns:

I3C_ControllerStatus_t - Status of initialization operation

Return values:
I3C_CONTROLLER_OK

- Initialization successful

I3C_CONTROLLER_TIMEOUT

- Initialization timed out

Note:

This function must be called before any other I3C1 Controller API. Operations may timeout - always check return status.

I3C1_Controller_Read()

I3C_ControllerStatus_t I3C1_Controller_Read (I3C_Controller_TargetDevicDesc_t * target, uint8_t * buf, uint32_t num_bytes)

Performs a private I3C read transfer from a target device.

Precondition:

I3C1_Controller_Initialize() must be called first.

Target device must be attached and have a valid dynamic address assigned.

If num_bytes > 4, the buf must be 4-byte aligned.

Only one transfer can be in progress at a time. Returns I3C_CONTROLLER_TRANFER_BUSY if a transfer is already active.

Parameters:
target

- Pointer to the target device descriptor

buf

- Pointer to buffer to store read data

num_bytes

- Number of bytes to read

Returns:

I3C_ControllerStatus_t - Status of read operation

Note:

Operations may timeout - always check return status.

I3C1_Controller_ReadResponse()

uint8_t I3C1_Controller_ReadResponse (I3C_ResponseData_t * response)

Reads the most recent response from response queue.

Parameters:
response

- Pointer to structure to store response data

Returns:

uint8_t - Response queue level

I3C1_Controller_RecoverBus()

I3C_ControllerStatus_t I3C1_Controller_RecoverBus (void )

Attempts bus recovery via abort and resume sequence.

Returns:

I3C_ControllerStatus_t - Status of bus recovery operation

Return values:
I3C_CONTROLLER_OK

- Bus recovery successful

I3C_CONTROLLER_TIMEOUT

- Bus recovery timed out

I3C1_Controller_Reset()

I3C_ControllerStatus_t I3C1_Controller_Reset (void )

Resets all FIFOs and queues of the I3C1 Controller.

Returns:

I3C_ControllerStatus_t - Status of reset operation

Return values:
I3C_CONTROLLER_OK

- Reset successful

I3C1_Controller_Resume()

void I3C1_Controller_Resume (void )

Resumes I3C operations after abort.

Returns:
I3C1_Controller_SECCCallback()

void I3C1_Controller_SECCCallback (void )

Default single-bit ECC error callback handler (weak implementation)

Returns:
I3C1_Controller_SECCCallbackRegister()

void I3C1_Controller_SECCCallbackRegister (void(*)(void) handler)

Registers a custom single-bit ECC error callback handler.

Parameters:
handler

- Function pointer to custom callback

Returns:

None

I3C1_Controller_Write()

I3C_ControllerStatus_t I3C1_Controller_Write (I3C_Controller_TargetDevicDesc_t * target, uint8_t * buf, uint32_t num_bytes)

Performs a private I3C write transfer to a target device.

Precondition:

I3C1_Controller_Initialize() must be called first.

Target device must be attached and have a valid dynamic address assigned.

If num_bytes > 4, the buf must be 4-byte aligned.

Only one transfer can be in progress at a time. Returns I3C_CONTROLLER_TRANFER_BUSY if a transfer is already active.

Parameters:
target

- Pointer to the target device descriptor

buf

- Pointer to data buffer to write

num_bytes

- Number of bytes to write

Returns:

I3C_ControllerStatus_t - Status of write operation

Note:

Operations may timeout - always check return status.

I3C1_Controller_WriteRead()

I3C_ControllerStatus_t I3C1_Controller_WriteRead (I3C_Controller_TargetDevicDesc_t * target, const void * write_buf, size_t num_write, void * read_buf, size_t num_read)

Performs a combined I3C write-read transfer to a target device.

Precondition:

I3C1_Controller_Initialize() must be called first.

Target device must be attached and have a valid dynamic address assigned.

If num_write > 4 bytes, write_buf must be 4-byte aligned.

If num_read > 4 bytes, read_buf must be 4-byte aligned.

Only one transfer can be in progress at a time. Returns I3C_CONTROLLER_TRANFER_BUSY if a transfer is already active.

Parameters:
target

- Pointer to the target device descriptor

write_buf

- Pointer to data buffer to write

num_write

- Number of bytes to write

read_buf

- Pointer to buffer to store read data

num_read

- Number of bytes to read

Returns:

I3C_ControllerStatus_t - Status of transfer operation

Note:

Operations may timeout - always check return status.

I3C1_FindTargetByDynamicAddress()

I3C_Controller_TargetDevicDesc_t* I3C1_FindTargetByDynamicAddress (uint8_t dynamicAddress)

Finds a target device by its assigned dynamic address.

Parameters:
dynamicAddress

- 7-bit dynamic address to search for

Returns:

I3C_Controller_TargetDevicDesc_t* - Pointer to target descriptor or NULL if not found

I3C_Controller_Transfer()

I3C_ControllerStatus_t I3C_Controller_Transfer (I3C_Controller_TargetDevicDesc_t * target, I3C_Controller_Msg_t * msgs, uint8_t num_msgs)

Performs multiple I3C transfers as a sequence of messages.

Precondition:

I3C1_Controller_Initialize() must be called first.

Target device must be attached and have a valid dynamic address assigned.

If message buffer length > 4 bytes, the buffer must be 4-byte aligned.

Only one transfer can be in progress at a time. Returns I3C_CONTROLLER_TRANFER_BUSY if a transfer is already active.

Parameters:
target

- Pointer to the target device descriptor

msgs

- Array of message descriptors

num_msgs

- Number of messages in the array

Returns:

I3C_ControllerStatus_t - Status of transfer operation

Note:

Operations may timeout - always check return status.

3.13.1.1.4 Enumeration Type Documentation

I3C_Controller_CccCapsFmt_t

enum I3C_Controller_CccCapsFmt_t

GETCAPS CCC response format enumeration.

I3C_CONTROLLER_CCC_GETCAPS_FMT_1_LEN_2

Format 1: 2 capability bytes

I3C_CONTROLLER_CCC_GETCAPS_FMT_1_LEN_3

Format 1: 3 capability bytes

I3C_CONTROLLER_CCC_GETCAPS_FMT_1_LEN_4

Format 1: 4 capability bytes

I3C_Controller_CccEnttmDefbyte_t

enum I3C_Controller_CccEnttmDefbyte_t

ENTTM CCC defining byte enumeration.

I3C_CONTROLLER_CCC_ENTTM_DEFBYTE_NONE

No defining byte

I3C_Controller_CccMxdsDefbyte_t

enum I3C_Controller_CccMxdsDefbyte_t

GETMXDS CCC defining byte enumeration.

I3C_CONTROLLER_CCC_GETMXDS_DEFBYTE_NONE

No defining byte

I3C_Controller_CccMxdsFmt_t

enum I3C_Controller_CccMxdsFmt_t

GETMXDS CCC response format enumeration.

I3C_CONTROLLER_CCC_GETMXDS_FMT_1

Format 1: Standard max data speed format

I3C_Controller_CCCRstactDefiningByte_t

enum I3C_Controller_CCCRstactDefiningByte_t

RSTACT CCC defining byte values for target reset actions.

I3C_CCC_RSTACT_NO_RESET

No reset action

I3C_CCC_RSTACT_PERIPHERAL_ONLY

Reset peripheral logic only

I3C_CCC_RSTACT_RESET_WHOLE_TARGET

Reset entire target device

I3C_CCC_RSTACT_DEBUG_NETWORK_ADAPTER

Reset debug network adapter

I3C_CCC_RSTACT_VIRTUAL_TARGET_DETECT

Virtual target detection

I3C_CCC_RSTACT_RETURN_TIME_TO_RESET_PERIPHERAL

Return time required to reset peripheral

I3C_CCC_RSTACT_RETURN_TIME_TO_WHOLE_TARGET

Return time required to reset whole target

I3C_CCC_RSTACT_RETURN_TIME_FOR_DEBUG_NETWORK_ADAPTER_RESET

Return time for debug adapter reset

I3C_CCC_RSTACT_RETURN_VIRTUAL_TARGET_INDICATION

Return virtual target indication

I3C_Controller_CccStatusDefbyte_t

enum I3C_Controller_CccStatusDefbyte_t

GETSTATUS CCC defining byte enumeration.

I3C_CONTROLLER_CCC_GETSTATUS_DEFBYTE_NONE

No defining byte

I3C_Controller_CccStatusFmt_t

enum I3C_Controller_CccStatusFmt_t

GETSTATUS CCC response format enumeration.

I3C_CONTROLLER_CCC_GETSTATUS_FMT_1

Format 1: Standard 16-bit status word

I3C_Controller_IBIType_t

enum I3C_Controller_IBIType_t

IBI (In-Band Interrupt) type enumeration.

I3C_IBI_TARGET_INTR

Standard target interrupt.

I3C_IBI_CONTROLLER_ROLE_REQUEST

Controller role request.

I3C_IBI_HOTJOIN

Hot-Join request.

I3C_Controller_TranferFlags

enum I3C_Controller_TranferFlags

Transfer flags for I3C message configuration.

I3C_MSG_READ

Read transfer flag

I3C_MSG_WRITE

Write transfer flag (default)

I3C_MSG_STOP

End transfer with STOP condition

I3C_MSG_RESTART

End transfer with RESTART condition (default)

I3C_MSG_HDR

HDR mode transfer flag

I3C_MSG_PEC

Enable Packet Error Check

I3C_ControllerCcc_t

enum I3C_ControllerCcc_t

I3C Common Command Codes (CCC) as per MIPI I3C Specification v1.1.1.

I3C_BCCC_ENEC
I3C_BCCC_DISEC
I3C_BCCC_ENTAS0
I3C_BCCC_ENTAS1
I3C_BCCC_ENTAS2
I3C_BCCC_ENTAS3
I3C_BCCC_RSTDAA
I3C_BCCC_ENTDAA
I3C_BCCC_DEFTGTS
I3C_BCCC_SETMWL
I3C_BCCC_SETMRL
I3C_BCCC_ENTTM
I3C_BCCC_SETBUSCON
I3C_BCCC_ENDXFER
I3C_BCCC_ENTHDR0
I3C_BCCC_SETXTIME
I3C_BCCC_SETAASA
I3C_BCCC_RSTACT
I3C_BCCC_DEFGRPA
I3C_BCCC_RSTGRPA
I3C_BCCC_MLANE
I3C_DCCC_ENEC
I3C_DCCC_DISEC
I3C_DCCC_ENTAS0
I3C_DCCC_ENTAS1
I3C_DCCC_ENTAS2
I3C_DCCC_ENTAS3
I3C_DCCC_SETDASA
I3C_DCCC_SETNEWDA
I3C_DCCC_SETMWL
I3C_DCCC_SETMRL
I3C_DCCC_GETMWL
I3C_DCCC_GETMRL
I3C_DCCC_GETPID
I3C_DCCC_GETBCR
I3C_DCCC_GETDCR
I3C_DCCC_GETSTATUS
I3C_DCCC_GETACCR
I3C_DCCC_ENDXFER
I3C_DCCC_SETBRGTGT
I3C_DCCC_GETMXDS
I3C_DCCC_GETCAPS
I3C_DCCC_SETROUTE
I3C_DCCC_SETXTIME
I3C_DCCC_GETXTIME
I3C_DCCC_RSTACT
I3C_DCCC_SETGRPA
I3C_DCCC_RSTGRPA
I3C_DCCC_MLANE
I3C_ControllerDeviceType_t

enum I3C_ControllerDeviceType_t

Device type enumeration (I3C vs legacy I2C)

I3C_CONTROLLER_DEV_I3C
I3C_CONTROLLER_DEV_I2C
I3C_ControllerErrorStatus_t

enum I3C_ControllerErrorStatus_t

Controller error status codes for error callback notifications.

I3C_CONTROLLER_NO_ERR
I3C_CONTROLLER_ERR_CRC
I3C_CONTROLLER_ERR_PARITY
I3C_CONTROLLER_ERR_FRAME
I3C_CONTROLLER_ERR_BROADCAST_ADDR_NACK
I3C_CONTROLLER_ERR_ADDR_NACK
I3C_CONTROLLER_ERR_OVL_URL
I3C_CONTROLLER_ERR_USER_ABORT
I3C_CONTROLLER_ERR_WR_DATA_NACK
I3C_CONTROLLER_ERR_GETACCCR
I3C_CONTROLLER_ERR_PEC
I3C_CONTROLLER_ERR_IBI
I3C_ControllerEvent_t

enum I3C_ControllerEvent_t

Controller event types for event callback notifications.

I3C_CONTROLLER_EVENT_RESPONSE
I3C_CONTROLLER_EVENT_WRITE_COMPLETE
I3C_CONTROLLER_EVENT_READ_COMPLETE
I3C_CONTROLLER_EVENT_ADDR_ASSIGN
I3C_CONTROLLER_EVENT_RESET_COMPLETE
I3C_CONTROLLER_EVENT_TRANSFER_ERROR
I3C_CONTROLLER_EVENT_ABORT_DONE
I3C_CONTROLLER_EVENT_HOT_JOIN
I3C_CONTROLLER_EVENT_CONTROLLER_REQ
I3C_ControllerState_t

enum I3C_ControllerState_t

Controller state machine states.

I3C_CONTROLLER_IDLE
I3C_CONTROLLER_START
I3C_CONTROLLER_RESTART
I3C_CONTROLLER_STOP
I3C_CONTROLLER_TGT_START_HOLD
I3C_CONTROLLER_BCAST_WRITE_ADDR
I3C_CONTROLLER_BCAST_READ_ADDR
I3C_CONTROLLER_DAA
I3C_CONTROLLER_TARGET_ADDR
I3C_CONTROLLER_CCC_BYTE
I3C_CONTROLLER_HDR_CMD
I3C_CONTROLLER_WRITE_DATA
I3C_CONTROLLER_READ_DATA
I3C_CONTROLLER_IBI_SIR_READ
I3C_CONTROLLER_IBI_AUTO_DISABLE
I3C_CONTROLLER_HDR_DDR_CRC
I3C_CONTROLLER_CLOCK_EXT
I3C_CONTROLLER_HALT
I3C_ControllerStatus_t

enum I3C_ControllerStatus_t

Controller API return status codes.

I3C_CONTROLLER_OK
I3C_CONTROLLER_ADDR_ASSIGN
I3C_CONTROLLER_TRANFER_BUSY
I3C_CONTROLLER_ADDR_ALIGN_ERR
I3C_CONTROLLER_BUS_RECOV_MODE
I3C_CONTROLLER_ADDR_ERR
I3C_CONTROLLER_WRITE_LEN_ERR
I3C_CONTROLLER_READ_LEN_ERR
I3C_CONTROLLER_DEVICE_TABLE_FULL
I3C_CONTROLLER_TID_INVALID
I3C_CONTROLLER_TIMEOUT
I3C_CONTROLLER_ATTACH_FAIL
I3C_CONTROLLER_INVALID_PARAM
I3C_ControllerTransferState_t

enum I3C_ControllerTransferState_t

Controller transfer state machine states.

I3C_CONTROLLER_TRANSFER_IDLE
I3C_CONTROLLER_TRANSFER_BCAST_CCC_WRITE
I3C_CONTROLLER_TRANSFER_DIR_CCC_WRITE
I3C_CONTROLLER_TRANSFER_DIR_CCC_READ
I3C_CONTROLLER_TRANSFER_ENTDAA
I3C_CONTROLLER_TRANSFER_SETDASA
I3C_CONTROLLER_TRANSFER_I3C_SDR_WRITE
I3C_CONTROLLER_TRANSFER_I3C_SDR_READ
I3C_CONTROLLER_TRANSFER_I2C_SDR_WRITE
I3C_CONTROLLER_TRANSFER_I2C_SDR_READ
I3C_CONTROLLER_TRANSFER_HDR_DDR_WRITE
I3C_CONTROLLER_TRANSFER_HDR_DDR_READ
I3C_CONTROLLER_TRANSFER_IBI_SERVICE
I3C_CONTROLLER_TRANSFER_HALT

3.13.1.1.5 Variable Documentation

I3C1_Controller

const struct I3C_CONTROLLER_INTERFACE I3C1_Controller

Structure object of type I3C_CONTROLLER_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. I3C1_Controller can be changed by the user in the I3C user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

initI2CTargets

I3C_Controller_I2CDeviceDesc_t initI2CTargets[]

Array of I2C target device descriptors initialized from UI configuration.

initI3CTargets

I3C_Controller_TargetDevicDesc_t initI3CTargets[]

Array of I3C target device descriptors initialized from UI configuration.

3.13.2 Data Structure Documentation

3.13.2.1 I3C_AddrAssignCommand_t Union Reference

Address assignment command register union (internal use)

3.13.2.1.2 Field Documentation

The documentation for this union was generated from the following file:

source/

i3c_controller_types.h

__pad0__

uint32_t __pad0__

__pad1__

uint32_t __pad1__

AddrAssignCommand

uint32_t AddrAssignCommand

CMD

uint32_t CMD

CMD_ATTR

uint32_t CMD_ATTR

DEV_COUNT

uint32_t DEV_COUNT

DEV_INDEX

uint32_t DEV_INDEX

frame

struct { ... } frame

RESERVED

uint32_t RESERVED

ROC

uint32_t ROC

TID

uint32_t TID

TOC

uint32_t TOC

3.13.2.2 I3C_Controller_CccBcr_t Struct Reference

GETBCR CCC response structure containing Bus Characteristics Register.

3.13.2.2.1 Detailed Description

GETBCR CCC response structure containing Bus Characteristics Register.

#include <i3c_controller_types.h>

Data Fields

3.13.2.2.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

bcr

uint8_t bcr

Bus Characteristics Register.

3.13.2.3 I3C_Controller_CccCaps_t Union Reference

Union for GETCAPS CCC response formats.

3.13.2.3.1 Detailed Description

Union for GETCAPS CCC response formats.

#include <i3c_controller_types.h>

3.13.2.3.2 Field Documentation

The documentation for this union was generated from the following file:

source/

i3c_controller_types.h

fmt1

I3C_Controller_CccCapsFmt fmt1

raw

uint8_t raw[4]

3.13.2.4 I3C_Controller_CccCapsFmt Struct Reference

GETCAPS/GETHDRCAP CCC response structure containing capability bytes.

3.13.2.4.1 Detailed Description

GETCAPS/GETHDRCAP CCC response structure containing capability bytes.

#include <i3c_controller_types.h>

Data Fields

3.13.2.4.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

caps

uint8_t caps[4]

Up to 4 capability bytes.

len

uint8_t len

Number of valid bytes in caps[].

3.13.2.5 I3C_Controller_CccDcr_t Struct Reference

GETDCR CCC response structure containing Device Characteristics Register.

3.13.2.5.1 Detailed Description

GETDCR CCC response structure containing Device Characteristics Register.

#include <i3c_controller_types.h>

Data Fields

3.13.2.5.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

dcr

uint8_t dcr

Device Characteristics Register.

3.13.2.6 I3C_Controller_CccDeftgts_t Struct Reference

DEFTGTS CCC payload structure for defining target list.

3.13.2.6.1 Detailed Description

DEFTGTS CCC payload structure for defining target list.

Note:

If length > 4 bytes, payload must be 4-byte aligned.

#include <i3c_controller_types.h>

3.13.2.6.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

length

uint16_t length

Length of payload data in bytes

payload

uint8_t* payload

Pointer to target list payload data. Must be 4-byte aligned if length > 4

3.13.2.7 I3C_Controller_CccEvents_t Struct Reference

Event control structure for ENEC/DISEC CCCs.

3.13.2.7.1 Detailed Description

Event control structure for ENEC/DISEC CCCs.

#include <i3c_controller_types.h>

Data Fields

3.13.2.7.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

hj

bool hj

Hot-Join event enable/disable

ibi

bool ibi

In-Band Interrupt event enable/disable

mr

bool mr

Controller Role Request event enable/disable

3.13.2.8 I3C_Controller_CccMrl_t Struct Reference

MRL payload structure for SETMRL CCC and GETMRL CCC response containing max read length and IBI length.

3.13.2.8.1 Detailed Description

MRL payload structure for SETMRL CCC and GETMRL CCC response containing max read length and IBI length.

#include <i3c_controller_types.h>

3.13.2.8.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

ibi_len

uint8_t ibi_len

Max IBI payload length (optional).

len

uint16_t len

Max read length in bytes.

3.13.2.9 I3C_Controller_CccMwl_t Struct Reference

MWL payload structure for SETMWL CCC and GETMWL CCC response containing max write length.

3.13.2.9.1 Detailed Description

MWL payload structure for SETMWL CCC and GETMWL CCC response containing max write length.

#include <i3c_controller_types.h>

Data Fields

3.13.2.9.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

len

uint16_t len

Max write length in bytes.

3.13.2.10 I3C_Controller_CccMxds_t Union Reference

Union for GETMXDS CCC response formats.

3.13.2.10.1 Detailed Description

Union for GETMXDS CCC response formats.

#include <i3c_controller_types.h>

3.13.2.10.2 Field Documentation

The documentation for this union was generated from the following file:

source/

i3c_controller_types.h

fmt1

I3C_Controller_CccMxdsFmt fmt1

raw

uint8_t raw[6]

3.13.2.11 I3C_Controller_CccMxdsFmt Struct Reference

GETMXDS CCC response structure containing max data speed info (format 1)

3.13.2.11.1 Detailed Description

GETMXDS CCC response structure containing max data speed info (format 1)

#include <i3c_controller_types.h>

3.13.2.11.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

maxrd

uint8_t maxrd

Max read data speed.

maxrd_turnaround

uint32_t maxrd_turnaround

Max read turnaround (us).

maxwr

uint8_t maxwr

Max write data speed.

3.13.2.12 I3C_Controller_CccPayload_t Struct Reference

CCC payload structure for generic CCC execution.

3.13.2.12.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

ccc

struct { ... } ccc

CCC command sub-structure (broadcast data / defining byte)

data

uint8_t* data

Pointer to broadcast TX data (NULL if no payload). Must be 4-byte aligned if data_len > 4

data_len

uint16_t data_len

Length of broadcast TX data in bytes

id

uint8_t id

CCC command code (one of the I3C_BCCC_* or I3C_DCCC_* defines)

num_targets

uint8_t num_targets

Number of targets in the targets array (0 = broadcast CCC)

targets[1/2]

I3C_Controller_CCCTargetPayload_t* targets

Array of per-target payloads (for direct CCCs)

targets[2/2]

struct { ... } targets

Direct CCC target information sub-structure

3.13.2.13 I3C_Controller_CCCPid_t Struct Reference

GETPID CCC response structure containing 48-bit Provisional ID.

3.13.2.13.1 Detailed Description

GETPID CCC response structure containing 48-bit Provisional ID.

#include <i3c_controller_types.h>

Data Fields

3.13.2.13.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

pid

uint64_t pid

48-bit PID (upper 16 bits zero).

3.13.2.14 I3C_Controller_CccStatus_t Union Reference

Union for GETSTATUS CCC response formats.

3.13.2.14.1 Detailed Description

Union for GETSTATUS CCC response formats.

#include <i3c_controller_types.h>

3.13.2.14.2 Field Documentation

The documentation for this union was generated from the following file:

source/

i3c_controller_types.h

fmt1

I3C_Controller_CccStatusFmt fmt1

raw

uint8_t raw[2]

3.13.2.15 I3C_Controller_CccStatusFmt Struct Reference

GETSTATUS CCC response structure containing device status word.

3.13.2.15.1 Detailed Description

GETSTATUS CCC response structure containing device status word.

#include <i3c_controller_types.h>

3.13.2.15.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

status

uint16_t status

16-bit device status word.

3.13.2.16 I3C_Controller_CCCTargetPayload_t Struct Reference

CCC target payload structure for direct CCCs.

3.13.2.16.1 Detailed Description

CCC target payload structure for direct CCCs.

Note:

If data_len > 4 bytes, data must be 4-byte aligned.

#include <i3c_controller_types.h>

3.13.2.16.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

addr

uint8_t addr

Dynamic address of the target (7-bit)

data

uint8_t* data

Pointer to the data buffer (TX for write CCCs, RX for read CCCs). Must be 4-byte aligned if data_len > 4

data_len

uint16_t data_len

Length of the data buffer in bytes

3.13.2.17 I3C_Controller_I2CTransfer_t Struct Reference

I3C Controller legacy I2C transfer descriptor.

3.13.2.17.1 Detailed Description

I3C Controller legacy I2C transfer descriptor.

Note:

If wlen > 4 bytes, wbuff must be 4-byte aligned. If rlen > 4 bytes, rbuff must be 4-byte aligned.

#include <i3c_controller_types.h>

3.13.2.17.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

node

uint8_t node

Target device node index in device address table

rbuff

uint8_t* rbuff

Pointer to read data buffer (must be 4-byte aligned if rlen > 4)

rlen

uint16_t rlen

Number of bytes to read (0 if write-only transfer)

speed

uint8_t speed

I2C speed mode: I3C_SPEED_I2C_FM or I3C_SPEED_I2C_FM_PLUS

termination

uint8_t termination

Transfer termination: 0 = RESTART, 1 = STOP

transID

uint8_t transID

Transaction ID for tracking (0-15)

wbuff

const uint8_t* wbuff

Pointer to write data buffer (must be 4-byte aligned if wlen > 4)

wlen

uint16_t wlen

Number of bytes to write (0 if read-only transfer)

3.13.2.18 I3C_CONTROLLER_INTERFACE Struct Reference

Structure containing the function pointers of I3C Controller driver.

3.13.2.18.1 Detailed Description

Structure containing the function pointers of I3C Controller driver.

#include <i3c_controller_interface.h>

Data Fields

3.13.2.18.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_interface.h

Abort

I3C_ControllerStatus_t(* Abort) (void)

Pointer to I3Cx_Controller_Abort e.g. I3C1_Controller_Abort.

AttachI2CDevice

I3C_ControllerStatus_t(* AttachI2CDevice) (I3C_Controller_I2CDeviceDesc_t *i2cDevice)

Pointer to I3Cx_Controller_AttachI2CDevice e.g. I3C1_Controller_AttachI2CDevice.

AttachI3CDevice

I3C_ControllerStatus_t(* AttachI3CDevice) (I3C_Controller_TargetDevicDesc_t *i3cTarget)

Pointer to I3Cx_Controller_AttachI3CDevice e.g. I3C1_Controller_AttachI3CDevice.

BurstRead

I3C_ControllerStatus_t(* BurstRead) (I3C_Controller_TargetDevicDesc_t *target, uint8_t start_addr, uint8_t *buf, uint32_t num_bytes)

Pointer to I3Cx_Controller_BurstRead e.g. I3C1_Controller_BurstRead. Note: If num_bytes > 4, buf must be 4-byte aligned.

BurstWrite

I3C_ControllerStatus_t(* BurstWrite) (I3C_Controller_TargetDevicDesc_t *target, uint8_t start_addr, uint8_t *buf, uint32_t num_bytes)

Pointer to I3Cx_Controller_BurstWrite e.g. I3C1_Controller_BurstWrite. Note: If num_bytes > 4, buf must be 4-byte aligned.

CccDoDeftgtsAll

I3C_ControllerStatus_t(* CccDoDeftgtsAll) (I3C_Controller_CccDeftgts_t *deftgts)

Pointer to I3Cx_Controller_CccDoDeftgtsAll e.g. I3C1_Controller_CccDoDeftgtsAll.

CccDoEntas

I3C_ControllerStatus_t(* CccDoEntas) (const I3C_Controller_TargetDevicDesc_t *target, uint8_t as)

Pointer to I3Cx_Controller_CccDoEntas e.g. I3C1_Controller_CccDoEntas.

CccDoEnttm

I3C_ControllerStatus_t(* CccDoEnttm) (I3C_Controller_CccEnttmDefbyte_t defbyte)

Pointer to I3Cx_Controller_CccDoEnttm e.g. I3C1_Controller_CccDoEnttm.

CccDoEventsAllSet

I3C_ControllerStatus_t(* CccDoEventsAllSet) (bool enable, I3C_Controller_CccEvents_t *events)

Pointer to I3Cx_Controller_CccDoEventsAllSet e.g. I3C1_Controller_CccDoEventsAllSet.

CccDoEventsSet

I3C_ControllerStatus_t(* CccDoEventsSet) (I3C_Controller_TargetDevicDesc_t *target, bool enable, I3C_Controller_CccEvents_t *events)

Pointer to I3Cx_Controller_CccDoEventsSet e.g. I3C1_Controller_CccDoEventsSet.

CccDoGetAcccr

I3C_ControllerStatus_t(* CccDoGetAcccr) (const I3C_Controller_TargetDevicDesc_t *target, uint8_t *handoff_address)

Pointer to I3Cx_Controller_CccDoGetAcccr e.g. I3C1_Controller_CccDoGetAcccr.

CccDoGetBcr

I3C_ControllerStatus_t(* CccDoGetBcr) (I3C_Controller_TargetDevicDesc_t *target, I3C_Controller_CccBcr_t *bcr)

Pointer to I3Cx_Controller_CccDoGetBcr e.g. I3C1_Controller_CccDoGetBcr.

CccDoGetCaps

I3C_ControllerStatus_t(* CccDoGetCaps) (const I3C_Controller_TargetDevicDesc_t *target, I3C_Controller_CccCaps_t *caps, I3C_Controller_CccCapsFmt_t fmt, uint8_t defbyte)

Pointer to I3Cx_Controller_CccDoGetCaps e.g. I3C1_Controller_CccDoGetCaps.

CccDoGetDcr

I3C_ControllerStatus_t(* CccDoGetDcr) (I3C_Controller_TargetDevicDesc_t *target, I3C_Controller_CccDcr_t *dcr)

Pointer to I3Cx_Controller_CccDoGetDcr e.g. I3C1_Controller_CccDoGetDcr.

CccDoGetMrl

I3C_ControllerStatus_t(* CccDoGetMrl) (const I3C_Controller_TargetDevicDesc_t *target, I3C_Controller_CccMrl_t *mrl)

Pointer to I3Cx_Controller_CccDoGetMrl e.g. I3C1_Controller_CccDoGetMrl.

CccDoGetMwl

I3C_ControllerStatus_t(* CccDoGetMwl) (const I3C_Controller_TargetDevicDesc_t *target, I3C_Controller_CccMwl_t *mwl)

Pointer to I3Cx_Controller_CccDoGetMwl e.g. I3C1_Controller_CccDoGetMwl.

CccDoGetmxds

I3C_ControllerStatus_t(* CccDoGetmxds) (const I3C_Controller_TargetDevicDesc_t *target, I3C_Controller_CccMxds_t *caps, I3C_Controller_CccMxdsFmt_t fmt, I3C_Controller_CccMxdsDefbyte_t defbyte)

Pointer to I3Cx_Controller_CccDoGetmxds e.g. I3C1_Controller_CccDoGetmxds.

CccDoGetPid

I3C_ControllerStatus_t(* CccDoGetPid) (I3C_Controller_TargetDevicDesc_t *target, I3C_Controller_CCCPid_t *pid)

Pointer to I3Cx_Controller_CccDoGetPid e.g. I3C1_Controller_CccDoGetPid.

CccDoGetStatus

I3C_ControllerStatus_t(* CccDoGetStatus) (const I3C_Controller_TargetDevicDesc_t *target, I3C_Controller_CccStatus_t *status, I3C_Controller_CccStatusFmt_t fmt, I3C_Controller_CccStatusDefbyte_t defbyte)

Pointer to I3Cx_Controller_CccDoGetStatus e.g. I3C1_Controller_CccDoGetStatus.

CccDoGetVendor

I3C_ControllerStatus_t(* CccDoGetVendor) (const I3C_Controller_TargetDevicDesc_t *target, uint8_t id, uint8_t *payload, size_t len, size_t *num_xfer)

Pointer to I3Cx_Controller_CccDoGetVendor e.g. I3C1_Controller_CccDoGetVendor.

CccDoGetVendorDefbyte

I3C_ControllerStatus_t(* CccDoGetVendorDefbyte) (const I3C_Controller_TargetDevicDesc_t *target, uint8_t id, uint8_t defbyte, uint8_t *payload, size_t len, size_t *num_xfer)

Pointer to I3Cx_Controller_CccDoGetVendorDefbyte e.g. I3C1_Controller_CccDoGetVendorDefbyte.

CccDoRstact

I3C_ControllerStatus_t(* CccDoRstact) (const I3C_Controller_TargetDevicDesc_t *target, I3C_Controller_CCCRstactDefiningByte_t action, bool get, uint8_t *data)

Pointer to I3Cx_Controller_CccDoRstact e.g. I3C1_Controller_CccDoRstact.

CccDoRstactAll

I3C_ControllerStatus_t(* CccDoRstactAll) (I3C_Controller_CCCRstactDefiningByte_t action)

Pointer to I3Cx_Controller_CccDoRstactAll e.g. I3C1_Controller_CccDoRstactAll.

CccDoRstdaa

I3C_ControllerStatus_t(* CccDoRstdaa) (I3C_Controller_TargetDevicDesc_t *target)

Pointer to I3Cx_Controller_CccDoRstdaa e.g. I3C1_Controller_CccDoRstdaa.

CccDoSetBuscon

I3C_ControllerStatus_t(* CccDoSetBuscon) (uint8_t *context, uint16_t length)

Pointer to I3Cx_Controller_CccDoSetBuscon e.g. I3C1_Controller_CccDoSetBuscon.

CccDoSetDasa

I3C_ControllerStatus_t(* CccDoSetDasa) (I3C_Controller_TargetDevicDesc_t *target, uint8_t da)

Pointer to I3Cx_Controller_CccDoSetDasa e.g. I3C1_Controller_CccDoSetDasa.

CccDoSetMrl

I3C_ControllerStatus_t(* CccDoSetMrl) (const I3C_Controller_TargetDevicDesc_t *target, const I3C_Controller_CccMrl_t *mrl)

Pointer to I3Cx_Controller_CccDoSetMrl e.g. I3C1_Controller_CccDoSetMrl.

CccDoSetMrlAll

I3C_ControllerStatus_t(* CccDoSetMrlAll) (const I3C_Controller_CccMrl_t *mrl, bool has_ibi_size)

Pointer to I3Cx_Controller_CccDoSetMrlAll e.g. I3C1_Controller_CccDoSetMrlAll.

CccDoSetMwl

I3C_ControllerStatus_t(* CccDoSetMwl) (const I3C_Controller_TargetDevicDesc_t *target, const I3C_Controller_CccMwl_t *mwl)

Pointer to I3Cx_Controller_CccDoSetMwl e.g. I3C1_Controller_CccDoSetMwl.

CccDoSetMwlAll

I3C_ControllerStatus_t(* CccDoSetMwlAll) (const I3C_Controller_CccMwl_t *mwl)

Pointer to I3Cx_Controller_CccDoSetMwlAll e.g. I3C1_Controller_CccDoSetMwlAll.

CccDoSetNewda

I3C_ControllerStatus_t(* CccDoSetNewda) (I3C_Controller_TargetDevicDesc_t *target, uint8_t new_da)

Pointer to I3Cx_Controller_CccDoSetNewda e.g. I3C1_Controller_CccDoSetNewda.

CccDoSetVendor

I3C_ControllerStatus_t(* CccDoSetVendor) (const I3C_Controller_TargetDevicDesc_t *target, uint8_t id, uint8_t *payload, size_t len)

Pointer to I3Cx_Controller_CccDoSetVendor e.g. I3C1_Controller_CccDoSetVendor.

CccDoSetVendorAll

I3C_ControllerStatus_t(* CccDoSetVendorAll) (uint8_t id, uint8_t *payload, size_t len)

Pointer to I3Cx_Controller_CccDoSetVendorAll e.g. I3C1_Controller_CccDoSetVendorAll.

DoCcc

I3C_ControllerStatus_t(* DoCcc) (I3C_Controller_CccPayload_t *payload)

Pointer to I3Cx_Controller_DoCcc e.g. I3C1_Controller_DoCcc.

DoDaa

I3C_ControllerStatus_t(* DoDaa) (uint8_t startNode, uint8_t targetCount)

Pointer to I3Cx_Controller_DoDaa e.g. I3C1_Controller_DoDaa.

ErrorCallbackRegister

void(* ErrorCallbackRegister) (void(*handler)(I3C_ControllerErrorStatus_t))

Pointer to I3Cx_Controller_ErrorCallbackRegister e.g. I3C1_Controller_ErrorCallbackRegister.

EventCallbackRegister

void(* EventCallbackRegister) (void(*handler)(I3C_ControllerEvent_t))

Pointer to I3Cx_Controller_EventCallbackRegister e.g. I3C1_Controller_EventCallbackRegister.

FindTargetByDynamicAddress

I3C_Controller_TargetDevicDesc_t*(* FindTargetByDynamicAddress) (uint8_t dynamicAddress)

Pointer to I3Cx_FindTargetByDynamicAddress e.g. I3C1_FindTargetByDynamicAddress.

I2CRead

I3C_ControllerStatus_t(* I2CRead) (I3C_Controller_I2CDeviceDesc_t *device, uint8_t *data, size_t dataLength, uint8_t speed)

Pointer to I3Cx_Controller_I2CRead e.g. I3C1_Controller_I2CRead. Note: If dataLength > 4 bytes, data buffer must be 4-byte aligned.

I2CWrite

I3C_ControllerStatus_t(* I2CWrite) (I3C_Controller_I2CDeviceDesc_t *device, uint8_t *data, size_t dataLength, uint8_t speed)

Pointer to I3Cx_Controller_I2CWrite e.g. I3C1_Controller_I2CWrite. Note: If dataLength > 4 bytes, data buffer must be 4-byte aligned.

I2CWriteRead

I3C_ControllerStatus_t(* I2CWriteRead) (I3C_Controller_I2CDeviceDesc_t *device, uint8_t *writeData, size_t writeLength, uint8_t *readData, size_t readLength, uint8_t speed)

Pointer to I3Cx_Controller_I2CWriteRead e.g. I3C1_Controller_I2CWriteRead. Note: If length > 4 bytes, buffers must be 4-byte aligned.

IBICallbackRegister

void(* IBICallbackRegister) (void(*handler)(uint8_t dynamicAddress, uint8_t ibiLength, uint8_t *payload))

Pointer to I3Cx_Controller_IBICallbackRegister e.g. I3C1_Controller_IBICallbackRegister.

IBIDataRead

uint8_t(* IBIDataRead) (uint32_t *ibiData, uint16_t length)

Pointer to I3Cx_Controller_IBIDataRead e.g. I3C1_Controller_IBIDataRead.

IBIDisable

I3C_ControllerStatus_t(* IBIDisable) (I3C_Controller_TargetDevicDesc_t *target)

Pointer to I3Cx_Controller_IBIDisable e.g. I3C1_Controller_IBIDisable.

IBIEnable

I3C_ControllerStatus_t(* IBIEnable) (I3C_Controller_TargetDevicDesc_t *target)

Pointer to I3Cx_Controller_IBIEnable e.g. I3C1_Controller_IBIEnable.

Read

I3C_ControllerStatus_t(* Read) (I3C_Controller_TargetDevicDesc_t *target, uint8_t *buf, uint32_t num_bytes)

Pointer to I3Cx_Controller_Read e.g. I3C1_Controller_Read. Note: If num_bytes > 4, buf must be 4-byte aligned.

ReadResponse

uint8_t(* ReadResponse) (I3C_ResponseData_t *response)

Pointer to I3Cx_Controller_ReadResponse e.g. I3C1_Controller_ReadResponse.

Reset

I3C_ControllerStatus_t(* Reset) (void)

Pointer to I3Cx_Controller_Reset e.g. I3C1_Controller_Reset.

Transfer

I3C_ControllerStatus_t(* Transfer) (I3C_Controller_TargetDevicDesc_t *target, I3C_Controller_Msg_t *msgs, uint8_t num_msgs)

Pointer to I3C_Controller_Transfer. Note: If message buffer length > 4 bytes, the buffer must be 4-byte aligned.

Write

I3C_ControllerStatus_t(* Write) (I3C_Controller_TargetDevicDesc_t *target, uint8_t *buf, uint32_t num_bytes)

Pointer to I3Cx_Controller_Write e.g. I3C1_Controller_Write. Note: If num_bytes > 4, buf must be 4-byte aligned.

WriteRead

I3C_ControllerStatus_t(* WriteRead) (I3C_Controller_TargetDevicDesc_t *target, const void *write_buf, size_t num_write, void *read_buf, size_t num_read)

Pointer to I3Cx_Controller_WriteRead e.g. I3C1_Controller_WriteRead. Note: If length > 4 bytes, buffers must be 4-byte aligned.

3.13.2.19 I3C_Controller_Msg_t Struct Reference

I3C message descriptor for multi-message transfers.

3.13.2.19.1 Detailed Description

I3C message descriptor for multi-message transfers.

Note:

If len > 4 bytes, buf must be 4-byte aligned.

#include <i3c_controller_types.h>

3.13.2.19.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

buf

uint8_t* buf

Pointer to the data buffer (TX or RX depending on flags). Must be 4-byte aligned if len > 4

flags

uint32_t flags

Combination of I3C_MSG_* flags controlling this segment

hdr_cmd_code

uint8_t hdr_cmd_code

HDR-DDR command code (7-bit, used only in HDR-DDR mode)

len

uint32_t len

Number of bytes to transfer

msg_id

uint8_t msg_id

Transfer message ID

3.13.2.20 I3C_ControllerCommand_t Struct Reference

I3C Controller Common Command Code (CCC) frame descriptor.

3.13.2.20.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

command

uint16_t command

CCC command code (one of I3C_BCCC_* or I3C_DCCC_* values)

definingByteData

uint8_t definingByteData

Defining byte value (used when definingBytePresent is true)

definingBytePresent

bool definingBytePresent

True if defining byte should be included in CCC frame

node

uint8_t node

Target device node index (0 for broadcast CCCs)

packetErrorCheck

uint8_t packetErrorCheck

Packet Error Check: 0 = disabled, 1 = enabled

rbuff

uint8_t* rbuff

Pointer to read data buffer (must be 4-byte aligned if rlen > 4)

rlen

uint16_t rlen

Number of bytes to read (0 if write CCC)

termination

bool termination

Transfer termination: false = RESTART, true = STOP

transID

uint8_t transID

Transaction ID for tracking (0-15)

wbuff

const uint8_t* wbuff

Pointer to write data buffer (must be 4-byte aligned if wlen > 4)

wlen

uint16_t wlen

Number of bytes to write (0 if read CCC)

3.13.2.21 I3C_ControllerI3CTransfer_t Struct Reference

I3C Controller private write/read transfer descriptor.

3.13.2.21.1 Detailed Description

I3C Controller private write/read transfer descriptor.

Note:

If wlen > 4 bytes, wbuff must be 4-byte aligned. If rlen > 4 bytes, rbuff must be 4-byte aligned.

#include <i3c_controller_types.h>

3.13.2.21.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

hdrCommand

uint8_t hdrCommand

HDR command code for HDR-DDR mode (7-bit)

node

uint8_t node

Target device node index in device address table

packetErrorCheck

uint8_t packetErrorCheck

Packet Error Check: 0 = disabled, 1 = enabled

rbuff

uint8_t* rbuff

Pointer to read data buffer (must be 4-byte aligned if rlen > 4)

rlen

uint16_t rlen

Number of bytes to read (0 if write-only transfer)

termination

uint8_t termination

Transfer termination: 0 = RESTART, 1 = STOP

transID

uint8_t transID

Transaction ID for tracking (0-15)

wbuff

const uint8_t* wbuff

Pointer to write data buffer (must be 4-byte aligned if wlen > 4)

wlen

uint16_t wlen

Number of bytes to write (0 if read-only transfer)

3.13.2.22 I3C_DCT_t Struct Reference

Device Characteristics Table entry structure (internal use)

3.13.2.22.1 Detailed Description

Device Characteristics Table entry structure (internal use)

#include <i3c_controller_types.h>

3.13.2.22.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

DCT_LOC1

uint32_t DCT_LOC1

DCT_LOC2

uint32_t DCT_LOC2

DCT_LOC3

uint32_t DCT_LOC3

DCT_LOC4

uint32_t DCT_LOC4

3.13.2.23 i3c_device_desc Struct Reference

I3C Target device descriptor containing device identification and configuration.

3.13.2.23.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

bcr

uint8_t bcr

Bus Characteristics Register.

con_req_rej

bool con_req_rej

controller request reject

dcr

uint8_t dcr

Device Characteristics Register.

dev_nack_retry_count

uint8_t dev_nack_retry_count

device NACK retry count

dynamic_addr

uint8_t dynamic_addr

Assigned dynamic address (7-bit, 0 = unassigned).

ibi_cb

void(* ibi_cb) (struct i3c_device_desc *target, const uint8_t *payload, uint8_t len)

ibi_mandatory_bytes

bool ibi_mandatory_bytes

true if IBI has at least one mandatory byte

ibi_pec_enabled

bool ibi_pec_enabled

true if IBI is packet error check enabled for this target.

node

uint8_t node

Node index value

pid

uint64_t pid

48-bit Provisional ID stored as a uint64_t (upper 16 bits zero).

static_addr

uint8_t static_addr

Static / I2C address (7-bit, 0 = none).

tar_int_req_rej

bool tar_int_req_rej

target interrupt request reject

3.13.2.24 I3C_Device_t Struct Reference

Generic I3C device structure (internal use)

3.13.2.24.1 Detailed Description

Generic I3C device structure (internal use)

#include <i3c_controller_types.h>

3.13.2.24.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

BCR

uint8_t BCR

DCR

uint8_t DCR

dynamicAdd

uint8_t dynamicAdd

PID

uint64_t PID

staticAdd

uint8_t staticAdd

3.13.2.25 i3c_i2c_device_desc Struct Reference

Legacy I2C device descriptor for I2C devices on the I3C bus.

3.13.2.25.1 Detailed Description

Legacy I2C device descriptor for I2C devices on the I3C bus.

#include <i3c_controller_types.h>

3.13.2.25.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

i3c_controller_types.h

addr

uint8_t addr

Static I2C address (7-bit).

node

uint8_t node

Node index value

3.13.2.26 I3C_IBIData_t Union Reference

IBI data register union (internal use)

3.13.2.26.2 Field Documentation

The documentation for this union was generated from the following file:

source/

i3c_controller_types.h

__pad0__

uint32_t __pad0__

__pad1__

uint32_t __pad1__

DATA_LENGTH

uint32_t DATA_LENGTH

frame

struct { ... } frame

IBI_ERROR_STAT

uint32_t IBI_ERROR_STAT

IBI_ID

uint32_t IBI_ID

IBI_NACK_STAT

uint32_t IBI_NACK_STAT

IBI_RnW

uint32_t IBI_RnW

IBIData

uint32_t IBIData

LAST_STATUS

uint32_t LAST_STATUS

TS

uint32_t TS

3.13.2.27 I3C_ResponseData_t Union Reference

Response data register union (internal use)

3.13.2.27.1 Detailed Description

Response data register union (internal use)

#include <i3c_controller_types.h>

3.13.2.27.2 Field Documentation

The documentation for this union was generated from the following file:

source/

i3c_controller_types.h

CCCT

uint32_t CCCT

DL

uint32_t DL

ERR_STS

uint32_t ERR_STS

frame

struct { ... } frame

RespondData

uint32_t RespondData

TID

uint32_t TID

3.13.2.28 I3C_ShortDataArgument_t Union Reference

Short data argument register union (internal use)

3.13.2.28.2 Field Documentation

The documentation for this union was generated from the following file:

source/

i3c_controller_types.h

__pad0__

uint32_t __pad0__

BYTE_STRB0

uint32_t BYTE_STRB0

BYTE_STRB1

uint32_t BYTE_STRB1

BYTE_STRB2

uint32_t BYTE_STRB2

CMD_ATTR

uint32_t CMD_ATTR

DATA_BYTE_0

uint32_t DATA_BYTE_0

DATA_BYTE_1

uint32_t DATA_BYTE_1

DATA_BYTE_2

uint32_t DATA_BYTE_2

frame

struct { ... } frame

ShortDataArgument

uint32_t ShortDataArgument

3.13.2.29 I3C_TransferArgument_t Union Reference

Transfer argument register union (internal use)

3.13.2.29.1 Detailed Description

Transfer argument register union (internal use)

#include <i3c_controller_types.h>

3.13.2.29.2 Field Documentation

The documentation for this union was generated from the following file:

source/

i3c_controller_types.h

CMD_ATTR

uint32_t CMD_ATTR

DB

uint32_t DB

DL

uint32_t DL

frame

struct { ... } frame

RESERVED

uint32_t RESERVED

TransferArgument

uint32_t TransferArgument

3.13.2.30 I3C_TransferCommand_t Union Reference

Transfer command register union (internal use)

3.13.2.30.2 Field Documentation

The documentation for this union was generated from the following file:

source/

i3c_controller_types.h

CMD

uint32_t CMD

CMD_ATTR

uint32_t CMD_ATTR

CP

uint32_t CP

DBP

uint32_t DBP

DEV_INDEX

uint32_t DEV_INDEX

frame

struct { ... } frame

PEC

uint32_t PEC

RESERVED

uint32_t RESERVED

RnW

uint32_t RnW

ROC

uint32_t ROC

SDAP

uint32_t SDAP

SPEED

uint32_t SPEED

TGT_RST

uint32_t TGT_RST

TID

uint32_t TID

TOC

uint32_t TOC

TransferCommand

uint32_t TransferCommand

3.13.3 File Documentation

3.13.3.1 source/i3c1.h File Reference

This is the generated driver header file for the I3C1 Controller driver.

3.13.3.1.1 Functions

3.13.3.1.2 Variables

3.13.3.1.3 Detailed Description

This is the generated driver header file for the I3C1 Controller driver.

I3C1 Generated Driver Header File

3.13.3.2 source/i3c_controller_interface.h File Reference

3.13.3.2.1 Data structures

3.13.3.3 source/i3c_controller_types.h File Reference

This file contains type definitions, enumerations, and structures for the I3C Controller driver.

3.13.3.3.1 Data structures

3.13.3.3.3 Enumerations

3.13.3.3.4 Detailed Description

This file contains type definitions, enumerations, and structures for the I3C Controller driver.

I3C Controller Types Header File