MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Data Structures | |
struct | i3c_register_ibi_addr_t |
Structure with setting master IBI rules and slave registry. More... | |
struct | i3c_baudrate_hz_t |
Structure with I3C baudrate settings. More... | |
struct | i3c_master_config_t |
Structure with settings to initialize the I3C master module. More... | |
struct | i3c_master_transfer_t |
Non-blocking transfer descriptor structure. More... | |
struct | i3c_master_handle_t |
Driver handle for master non-blocking APIs. More... | |
Typedefs | |
typedef void(* | i3c_master_transfer_callback_t )(I3C_Type *base, i3c_master_handle_t *handle, status_t completionStatus, void *userData) |
Master completion callback function pointer type. More... | |
Initialization and deinitialization | |
void | I3C_MasterGetDefaultConfig (i3c_master_config_t *masterConfig) |
Provides a default configuration for the I3C master peripheral. More... | |
void | I3C_MasterInit (I3C_Type *base, const i3c_master_config_t *masterConfig, uint32_t sourceClock_Hz) |
Initializes the I3C master peripheral. More... | |
void | I3C_MasterDeinit (I3C_Type *base) |
Deinitializes the I3C master peripheral. More... | |
status_t | I3C_MasterCheckAndClearError (I3C_Type *base, uint32_t status) |
status_t | I3C_CheckForBusyBus (I3C_Type *base) |
static void | I3C_MasterEnable (I3C_Type *base, i3c_master_enable_t enable) |
Set I3C module master mode. More... | |
void | I3C_SlaveGetDefaultConfig (i3c_slave_config_t *slaveConfig) |
Provides a default configuration for the I3C slave peripheral. More... | |
void | I3C_SlaveInit (I3C_Type *base, const i3c_slave_config_t *slaveConfig, uint32_t slowClock_Hz) |
Initializes the I3C slave peripheral. More... | |
void | I3C_SlaveDeinit (I3C_Type *base) |
Deinitializes the I3C slave peripheral. More... | |
Status | |
static uint32_t | I3C_MasterGetStatusFlags (I3C_Type *base) |
Gets the I3C master status flags. More... | |
static void | I3C_MasterClearStatusFlags (I3C_Type *base, uint32_t statusMask) |
Clears the I3C master status flag state. More... | |
static uint32_t | I3C_MasterGetErrorStatusFlags (I3C_Type *base) |
Gets the I3C master error status flags. More... | |
static void | I3C_MasterClearErrorStatusFlags (I3C_Type *base, uint32_t statusMask) |
Clears the I3C master error status flag state. More... | |
i3c_master_state_t | I3C_MasterGetState (I3C_Type *base) |
Gets the I3C master state. More... | |
static uint32_t | I3C_SlaveGetStatusFlags (I3C_Type *base) |
Gets the I3C slave status flags. More... | |
static void | I3C_SlaveClearStatusFlags (I3C_Type *base, uint32_t statusMask) |
Clears the I3C slave status flag state. More... | |
static uint32_t | I3C_SlaveGetErrorStatusFlags (I3C_Type *base) |
Gets the I3C slave error status flags. More... | |
static void | I3C_SlaveClearErrorStatusFlags (I3C_Type *base, uint32_t statusMask) |
Clears the I3C slave error status flag state. More... | |
i3c_slave_activity_state_t | I3C_SlaveGetActivityState (I3C_Type *base) |
Gets the I3C slave state. More... | |
Interrupts | |
static void | I3C_MasterEnableInterrupts (I3C_Type *base, uint32_t interruptMask) |
Enables the I3C master interrupt requests. More... | |
static void | I3C_MasterDisableInterrupts (I3C_Type *base, uint32_t interruptMask) |
Disables the I3C master interrupt requests. More... | |
static uint32_t | I3C_MasterGetEnabledInterrupts (I3C_Type *base) |
Returns the set of currently enabled I3C master interrupt requests. More... | |
static uint32_t | I3C_MasterGetPendingInterrupts (I3C_Type *base) |
Returns the set of pending I3C master interrupt requests. More... | |
static void | I3C_SlaveEnableInterrupts (I3C_Type *base, uint32_t interruptMask) |
Enables the I3C slave interrupt requests. More... | |
static void | I3C_SlaveDisableInterrupts (I3C_Type *base, uint32_t interruptMask) |
Disables the I3C slave interrupt requests. More... | |
static uint32_t | I3C_SlaveGetEnabledInterrupts (I3C_Type *base) |
Returns the set of currently enabled I3C slave interrupt requests. More... | |
static uint32_t | I3C_SlaveGetPendingInterrupts (I3C_Type *base) |
Returns the set of pending I3C slave interrupt requests. More... | |
DMA control | |
static void | I3C_MasterEnableDMA (I3C_Type *base, bool enableTx, bool enableRx, uint32_t width) |
Enables or disables I3C master DMA requests. More... | |
static uint32_t | I3C_MasterGetTxFifoAddress (I3C_Type *base, uint32_t width) |
Gets I3C master transmit data register address for DMA transfer. More... | |
static uint32_t | I3C_MasterGetRxFifoAddress (I3C_Type *base, uint32_t width) |
Gets I3C master receive data register address for DMA transfer. More... | |
static void | I3C_SlaveEnableDMA (I3C_Type *base, bool enableTx, bool enableRx, uint32_t width) |
Enables or disables I3C slave DMA requests. More... | |
static uint32_t | I3C_SlaveGetTxFifoAddress (I3C_Type *base, uint32_t width) |
Gets I3C slave transmit data register address for DMA transfer. More... | |
static uint32_t | I3C_SlaveGetRxFifoAddress (I3C_Type *base, uint32_t width) |
Gets I3C slave receive data register address for DMA transfer. More... | |
FIFO control | |
static void | I3C_MasterSetWatermarks (I3C_Type *base, i3c_tx_trigger_level_t txLvl, i3c_rx_trigger_level_t rxLvl, bool flushTx, bool flushRx) |
Sets the watermarks for I3C master FIFOs. More... | |
static void | I3C_MasterGetFifoCounts (I3C_Type *base, size_t *rxCount, size_t *txCount) |
Gets the current number of bytes in the I3C master FIFOs. More... | |
static void | I3C_SlaveSetWatermarks (I3C_Type *base, i3c_tx_trigger_level_t txLvl, i3c_rx_trigger_level_t rxLvl, bool flushTx, bool flushRx) |
Sets the watermarks for I3C slave FIFOs. More... | |
static void | I3C_SlaveGetFifoCounts (I3C_Type *base, size_t *rxCount, size_t *txCount) |
Gets the current number of bytes in the I3C slave FIFOs. More... | |
Bus operations | |
void | I3C_MasterSetBaudRate (I3C_Type *base, const i3c_baudrate_hz_t *baudRate_Hz, uint32_t sourceClock_Hz) |
Sets the I3C bus frequency for master transactions. More... | |
static bool | I3C_MasterGetBusIdleState (I3C_Type *base) |
Returns whether the bus is idle. More... | |
status_t | I3C_MasterStart (I3C_Type *base, i3c_bus_type_t type, uint8_t address, i3c_direction_t dir, uint32_t rxSize) |
Sends a START signal and slave address on the I2C/I3C bus. More... | |
status_t | I3C_MasterRepeatedStart (I3C_Type *base, i3c_bus_type_t type, uint8_t address, i3c_direction_t dir, uint32_t rxSize) |
Sends a repeated START signal and slave address on the I2C/I3C bus. More... | |
status_t | I3C_MasterSend (I3C_Type *base, const void *txBuff, size_t txSize, uint32_t flags) |
Performs a polling send transfer on the I2C/I3C bus. More... | |
status_t | I3C_MasterReceive (I3C_Type *base, void *rxBuff, size_t rxSize, uint32_t flags) |
Performs a polling receive transfer on the I2C/I3C bus. More... | |
status_t | I3C_MasterStop (I3C_Type *base) |
Sends a STOP signal on the I2C/I3C bus. More... | |
void | I3C_MasterEmitRequest (I3C_Type *base, i3c_bus_request_t masterReq) |
I3C master emit request. More... | |
void | I3C_MasterRegisterIBI (I3C_Type *base, i3c_register_ibi_addr_t *ibiRule) |
I3C master register IBI rule. More... | |
status_t | I3C_MasterProcessDAA (I3C_Type *base, uint8_t *addressList, uint32_t count) |
Performs a DAA in the i3c bus. More... | |
status_t | I3C_MasterTransferBlocking (I3C_Type *base, i3c_master_transfer_t *transfer) |
Performs a master polling transfer on the I2C/I3C bus. More... | |
void | I3C_SlaveRequestEvent (I3C_Type *base, i3c_slave_event_t event, uint8_t data) |
I3C slave request event. More... | |
status_t | I3C_SlaveSend (I3C_Type *base, const void *txBuff, size_t txSize) |
Performs a polling send transfer on the I3C bus. More... | |
status_t | I3C_SlaveReceive (I3C_Type *base, void *rxBuff, size_t rxSize) |
Performs a polling receive transfer on the I3C bus. More... | |
Non-blocking | |
void | I3C_MasterTransferCreateHandle (I3C_Type *base, i3c_master_handle_t *handle, i3c_master_transfer_callback_t callback, void *userData) |
Creates a new handle for the I3C master non-blocking APIs. More... | |
status_t | I3C_MasterTransferNonBlocking (I3C_Type *base, i3c_master_handle_t *handle, i3c_master_transfer_t *transfer) |
Performs a non-blocking transaction on the I2C/I3C bus. More... | |
status_t | I3C_MasterTransferGetCount (I3C_Type *base, i3c_master_handle_t *handle, size_t *count) |
Returns number of bytes transferred so far. More... | |
void | I3C_MasterTransferAbort (I3C_Type *base, i3c_master_handle_t *handle) |
Terminates a non-blocking I3C master transmission early. More... | |
IRQ handler | |
void | I3C_MasterTransferHandleIRQ (I3C_Type *base, i3c_master_handle_t *handle) |
Reusable routine to handle master interrupts. More... | |
struct i3c_register_ibi_addr_t |
Data Fields | |
uint8_t | address [5] |
Address array for registry. More... | |
bool | ibiHasPayload |
Whether the address array has mandatory IBI byte. More... | |
uint8_t i3c_register_ibi_addr_t::address[5] |
bool i3c_register_ibi_addr_t::ibiHasPayload |
struct i3c_baudrate_hz_t |
Data Fields | |
uint32_t | i2cBaud |
Desired I2C baud rate in Hertz. More... | |
uint32_t | i3cPushPullBaud |
Desired I3C push-pull baud rate in Hertz. More... | |
uint32_t | i3cOpenDrainBaud |
Desired I3C open-drain baud rate in Hertz. More... | |
uint32_t i3c_baudrate_hz_t::i2cBaud |
uint32_t i3c_baudrate_hz_t::i3cPushPullBaud |
uint32_t i3c_baudrate_hz_t::i3cOpenDrainBaud |
struct i3c_master_config_t |
This structure holds configuration settings for the I3C peripheral. To initialize this structure to reasonable defaults, call the I3C_MasterGetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
Data Fields | |
i3c_master_enable_t | enableMaster |
Enable master mode. More... | |
bool | disableTimeout |
Whether to disable timeout to prevent the ERRWARN. More... | |
i3c_master_hkeep_t | hKeep |
High keeper mode setting. More... | |
bool | enableOpenDrainStop |
Whether to emit open-drain speed STOP. More... | |
bool | enableOpenDrainHigh |
Enable Open-Drain High to be 1 PPBAUD count for i3c messages, or 1 ODBAUD. More... | |
i3c_baudrate_hz_t | baudRate_Hz |
Desired baud rate settings. More... | |
i3c_master_enable_t i3c_master_config_t::enableMaster |
bool i3c_master_config_t::disableTimeout |
i3c_master_hkeep_t i3c_master_config_t::hKeep |
bool i3c_master_config_t::enableOpenDrainStop |
bool i3c_master_config_t::enableOpenDrainHigh |
i3c_baudrate_hz_t i3c_master_config_t::baudRate_Hz |
struct _i3c_master_transfer |
This structure is used to pass transaction parameters to the I3C_MasterTransferNonBlocking() API.
Data Fields | |
uint32_t | flags |
Bit mask of options for the transfer. More... | |
uint8_t | slaveAddress |
The 7-bit slave address. More... | |
i3c_direction_t | direction |
Either kI3C_Read or kI3C_Write. More... | |
uint32_t | subaddress |
Sub address. More... | |
size_t | subaddressSize |
Length of sub address to send in bytes. More... | |
void * | data |
Pointer to data to transfer. More... | |
size_t | dataSize |
Number of bytes to transfer. More... | |
i3c_bus_type_t | busType |
bus type. More... | |
i3c_ibi_response_t | ibiResponse |
ibi response during transfer. More... | |
uint32_t i3c_master_transfer_t::flags |
See enumeration _i3c_master_transfer_flags for available options. Set to 0 or kI3C_TransferDefaultFlag for normal transfers.
uint8_t i3c_master_transfer_t::slaveAddress |
i3c_direction_t i3c_master_transfer_t::direction |
uint32_t i3c_master_transfer_t::subaddress |
Transferred MSB first.
size_t i3c_master_transfer_t::subaddressSize |
Maximum size is 4 bytes.
void* i3c_master_transfer_t::data |
size_t i3c_master_transfer_t::dataSize |
i3c_bus_type_t i3c_master_transfer_t::busType |
i3c_ibi_response_t i3c_master_transfer_t::ibiResponse |
struct _i3c_master_handle |
Data Fields | |
uint8_t | state |
Transfer state machine current state. More... | |
uint32_t | remainingBytes |
Remaining byte count in current state. More... | |
i3c_master_transfer_t | transfer |
Copy of the current transfer info. More... | |
uint8_t | ibiAddress |
Slave address which request IBI. More... | |
uint8_t | ibiBuff [I3C_IBI_BUFF_SIZE] |
IBI buffer to keep ibi bytes. More... | |
size_t | ibiPayloadSize |
IBI payload size. More... | |
i3c_master_transfer_callback_t | completionCallback |
Callback function pointer. More... | |
void * | userData |
Application data passed to callback. More... | |
uint8_t i3c_master_handle_t::state |
uint32_t i3c_master_handle_t::remainingBytes |
i3c_master_transfer_t i3c_master_handle_t::transfer |
uint8_t i3c_master_handle_t::ibiAddress |
uint8_t i3c_master_handle_t::ibiBuff[I3C_IBI_BUFF_SIZE] |
size_t i3c_master_handle_t::ibiPayloadSize |
i3c_master_transfer_callback_t i3c_master_handle_t::completionCallback |
void* i3c_master_handle_t::userData |
typedef void(* i3c_master_transfer_callback_t)(I3C_Type *base, i3c_master_handle_t *handle, status_t completionStatus, void *userData) |
This callback is used only for the non-blocking master transfer API. Specify the callback you wish to use in the call to I3C_MasterTransferCreateHandle().
base | The I3C peripheral base address. |
completionStatus | Either #kStatus_Success or an error code describing how the transfer completed. |
userData | Arbitrary pointer-sized value passed from the application. |
enum _i3c_master_flags |
The following status register flags can be cleared:
All flags except kI3C_MasterBetweenFlag and kI3C_MasterNackDetectFlag can be enabled as interrupts.
enum i3c_master_state_t |
enum i3c_master_enable_t |
enum i3c_master_hkeep_t |
enum i3c_bus_request_t |
by message.
enum i3c_bus_type_t |
enum i3c_ibi_response_t |
enum i3c_direction_t |
void I3C_MasterGetDefaultConfig | ( | i3c_master_config_t * | masterConfig | ) |
This function provides the following default configuration for the I3C master peripheral:
After calling this function, you can override any settings in order to customize the configuration, prior to initializing the master driver with I3C_MasterInit().
[out] | masterConfig | User provided configuration structure for default values. Refer to i3c_master_config_t. |
void I3C_MasterInit | ( | I3C_Type * | base, |
const i3c_master_config_t * | masterConfig, | ||
uint32_t | sourceClock_Hz | ||
) |
This function enables the peripheral clock and initializes the I3C master peripheral as described by the user provided configuration. A software reset is performed prior to configuration.
base | The I3C peripheral base address. |
masterConfig | User provided peripheral configuration. Use I3C_MasterGetDefaultConfig() to get a set of defaults that you can override. |
sourceClock_Hz | Frequency in Hertz of the I3C functional clock. Used to calculate the baud rate divisors, filter widths, and timeout periods. |
void I3C_MasterDeinit | ( | I3C_Type * | base | ) |
This function disables the I3C master peripheral and gates the clock. It also performs a software reset to restore the peripheral to reset conditions.
base | The I3C peripheral base address. |
|
inlinestatic |
base | The I3C peripheral base address. |
enable | Enable master mode. |
|
inlinestatic |
A bit mask with the state of all I3C master status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
base | The I3C peripheral base address. |
|
inlinestatic |
The following status register flags can be cleared:
Attempts to clear other flags has no effect.
base | The I3C peripheral base address. |
statusMask | A bitmask of status flags that are to be cleared. The mask is composed of _i3c_master_flags enumerators OR'd together. You may pass the result of a previous call to I3C_MasterGetStatusFlags(). |
|
inlinestatic |
A bit mask with the state of all I3C master error status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
base | The I3C peripheral base address. |
|
inlinestatic |
base | The I3C peripheral base address. |
statusMask | A bitmask of error status flags that are to be cleared. The mask is composed of _i3c_master_error_flags enumerators OR'd together. You may pass the result of a previous call to I3C_MasterGetStatusFlags(). |
i3c_master_state_t I3C_MasterGetState | ( | I3C_Type * | base | ) |
base | The I3C peripheral base address. |
|
inlinestatic |
All flags except kI3C_MasterBetweenFlag and kI3C_MasterNackDetectFlag can be enabled as interrupts.
base | The I3C peripheral base address. |
interruptMask | Bit mask of interrupts to enable. See _i3c_master_flags for the set of constants that should be OR'd together to form the bit mask. |
|
inlinestatic |
All flags except kI3C_MasterBetweenFlag and kI3C_MasterNackDetectFlag can be enabled as interrupts.
base | The I3C peripheral base address. |
interruptMask | Bit mask of interrupts to disable. See _i3c_master_flags for the set of constants that should be OR'd together to form the bit mask. |
|
inlinestatic |
base | The I3C peripheral base address. |
|
inlinestatic |
base | The I3C peripheral base address. |
|
inlinestatic |
base | The I3C peripheral base address. |
enableTx | Enable flag for transmit DMA request. Pass true for enable, false for disable. |
enableRx | Enable flag for receive DMA request. Pass true for enable, false for disable. |
width | DMA read/write unit in bytes. |
|
inlinestatic |
base | The I3C peripheral base address. |
width | DMA read/write unit in bytes. |
|
inlinestatic |
base | The I3C peripheral base address. |
width | DMA read/write unit in bytes. |
|
inlinestatic |
base | The I3C peripheral base address. |
txLvl | Transmit FIFO watermark level. The kI3C_MasterTxReadyFlag flag is set whenever the number of words in the transmit FIFO reaches txLvl. |
rxLvl | Receive FIFO watermark level. The kI3C_MasterRxReadyFlag flag is set whenever the number of words in the receive FIFO reaches rxLvl. |
flushTx | true if TX FIFO is to be cleared, otherwise TX FIFO remains unchanged. |
flushRx | true if RX FIFO is to be cleared, otherwise RX FIFO remains unchanged. |
|
inlinestatic |
base | The I3C peripheral base address. | |
[out] | txCount | Pointer through which the current number of bytes in the transmit FIFO is returned. Pass NULL if this value is not required. |
[out] | rxCount | Pointer through which the current number of bytes in the receive FIFO is returned. Pass NULL if this value is not required. |
void I3C_MasterSetBaudRate | ( | I3C_Type * | base, |
const i3c_baudrate_hz_t * | baudRate_Hz, | ||
uint32_t | sourceClock_Hz | ||
) |
The I3C master is automatically disabled and re-enabled as necessary to configure the baud rate. Do not call this function during a transfer, or the transfer is aborted.
base | The I3C peripheral base address. |
baudRate_Hz | Pointer to structure of requested bus frequency in Hertz. |
sourceClock_Hz | I3C functional clock frequency in Hertz. |
|
inlinestatic |
Requires the master mode to be enabled.
base | The I3C peripheral base address. |
true | Bus is busy. |
false | Bus is idle. |
status_t I3C_MasterStart | ( | I3C_Type * | base, |
i3c_bus_type_t | type, | ||
uint8_t | address, | ||
i3c_direction_t | dir, | ||
uint32_t | rxSize | ||
) |
This function is used to initiate a new master mode transfer. First, the bus state is checked to ensure that another master is not occupying the bus. Then a START signal is transmitted, followed by the 7-bit address specified in the address parameter. Note that this function does not actually wait until the START and address are successfully sent on the bus before returning.
base | The I3C peripheral base address. |
type | The bus type to use in this transaction. |
address | 7-bit slave device address, in bits [6:0]. |
dir | Master transfer direction, either kI3C_Read or kI3C_Write. This parameter is used to set the R/w bit (bit 0) in the transmitted slave address. |
rxSize | if dir is kI3C_Read, this assigns bytes to read. Otherwise set to 0. |
#kStatus_Success | START signal and address were successfully enqueued in the transmit FIFO. |
kStatus_I3C_Busy | Another master is currently utilizing the bus. |
status_t I3C_MasterRepeatedStart | ( | I3C_Type * | base, |
i3c_bus_type_t | type, | ||
uint8_t | address, | ||
i3c_direction_t | dir, | ||
uint32_t | rxSize | ||
) |
This function is used to send a Repeated START signal when a transfer is already in progress. Like I3C_MasterStart(), it also sends the specified 7-bit address.
base | The I3C peripheral base address. |
type | The bus type to use in this transaction. |
address | 7-bit slave device address, in bits [6:0]. |
dir | Master transfer direction, either kI3C_Read or kI3C_Write. This parameter is used to set the R/w bit (bit 0) in the transmitted slave address. |
rxSize | if dir is kI3C_Read, this assigns bytes to read. Otherwise set to 0. |
#kStatus_Success | Repeated START signal and address were successfully enqueued in the transmit FIFO. |
status_t I3C_MasterSend | ( | I3C_Type * | base, |
const void * | txBuff, | ||
size_t | txSize, | ||
uint32_t | flags | ||
) |
Sends up to txSize number of bytes to the previously addressed slave device. The slave may reply with a NAK to any byte in order to terminate the transfer early. If this happens, this function returns kStatus_I3C_Nak.
base | The I3C peripheral base address. |
txBuff | The pointer to the data to be transferred. |
txSize | The length in bytes of the data to be transferred. |
flags | Bit mask of options for the transfer. See enumeration _i3c_master_transfer_flags for available options. |
#kStatus_Success | Data was sent successfully. |
kStatus_I3C_Busy | Another master is currently utilizing the bus. |
kStatus_I3C_Nak | The slave device sent a NAK in response to a byte. |
#kStatus_I3C_FifoError | FIFO under run or over run. |
#kStatus_I3C_ArbitrationLost | Arbitration lost error. |
#kStatus_I3C_PinLowTimeout | SCL or SDA were held low longer than the timeout. |
status_t I3C_MasterReceive | ( | I3C_Type * | base, |
void * | rxBuff, | ||
size_t | rxSize, | ||
uint32_t | flags | ||
) |
base | The I3C peripheral base address. |
rxBuff | The pointer to the data to be transferred. |
rxSize | The length in bytes of the data to be transferred. |
flags | Bit mask of options for the transfer. See enumeration _i3c_master_transfer_flags for available options. |
#kStatus_Success | Data was received successfully. |
kStatus_I3C_Busy | Another master is currently utilizing the bus. |
kStatus_I3C_Nak | The slave device sent a NAK in response to a byte. |
#kStatus_I3C_FifoError | FIFO under run or overrun. |
#kStatus_I3C_ArbitrationLost | Arbitration lost error. |
#kStatus_I3C_PinLowTimeout | SCL or SDA were held low longer than the timeout. |
status_t I3C_MasterStop | ( | I3C_Type * | base | ) |
This function does not return until the STOP signal is seen on the bus, or an error occurs.
base | The I3C peripheral base address. |
#kStatus_Success | The STOP signal was successfully sent on the bus and the transaction terminated. |
kStatus_I3C_Busy | Another master is currently utilizing the bus. |
kStatus_I3C_Nak | The slave device sent a NAK in response to a byte. |
#kStatus_I3C_FifoError | FIFO under run or overrun. |
#kStatus_I3C_ArbitrationLost | Arbitration lost error. |
#kStatus_I3C_PinLowTimeout | SCL or SDA were held low longer than the timeout. |
void I3C_MasterEmitRequest | ( | I3C_Type * | base, |
i3c_bus_request_t | masterReq | ||
) |
base | The I3C peripheral base address. |
masterReq | I3C master request of type i3c_bus_request_t |
void I3C_MasterRegisterIBI | ( | I3C_Type * | base, |
i3c_register_ibi_addr_t * | ibiRule | ||
) |
base | The I3C peripheral base address. |
ibiRule | Pointer to ibi rule description of type i3c_register_ibi_addr_t |
status_t I3C_MasterProcessDAA | ( | I3C_Type * | base, |
uint8_t * | addressList, | ||
uint32_t | count | ||
) |
base | The I3C peripheral base address. |
addressList | The pointer for address list which is used to do DAA. |
count | The address count in the address list. |
#kStatus_Success | The transaction was started successfully. |
kStatus_I3C_Busy | Either another master is currently utilizing the bus, or a non-blocking transaction is already in progress. |
status_t I3C_MasterTransferBlocking | ( | I3C_Type * | base, |
i3c_master_transfer_t * | transfer | ||
) |
base | The I3C peripheral base address. |
transfer | Pointer to the transfer structure. |
#kStatus_Success | Data was received successfully. |
kStatus_I3C_Busy | Another master is currently utilizing the bus. |
kStatus_I3C_Nak | The slave device sent a NAK in response to a byte. |
#kStatus_I3C_FifoError | FIFO under run or overrun. |
#kStatus_I3C_ArbitrationLost | Arbitration lost error. |
#kStatus_I3C_PinLowTimeout | SCL or SDA were held low longer than the timeout. |
void I3C_MasterTransferCreateHandle | ( | I3C_Type * | base, |
i3c_master_handle_t * | handle, | ||
i3c_master_transfer_callback_t | callback, | ||
void * | userData | ||
) |
The creation of a handle is for use with the non-blocking APIs. Once a handle is created, there is not a corresponding destroy handle. If the user wants to terminate a transfer, the I3C_MasterTransferAbort() API shall be called.
base | The I3C peripheral base address. | |
[out] | handle | Pointer to the I3C master driver handle. |
callback | User provided pointer to the asynchronous callback function. | |
userData | User provided pointer to the application callback data. |
status_t I3C_MasterTransferNonBlocking | ( | I3C_Type * | base, |
i3c_master_handle_t * | handle, | ||
i3c_master_transfer_t * | transfer | ||
) |
base | The I3C peripheral base address. |
handle | Pointer to the I3C master driver handle. |
transfer | The pointer to the transfer descriptor. |
#kStatus_Success | The transaction was started successfully. |
kStatus_I3C_Busy | Either another master is currently utilizing the bus, or a non-blocking transaction is already in progress. |
status_t I3C_MasterTransferGetCount | ( | I3C_Type * | base, |
i3c_master_handle_t * | handle, | ||
size_t * | count | ||
) |
base | The I3C peripheral base address. | |
handle | Pointer to the I3C master driver handle. | |
[out] | count | Number of bytes transferred so far by the non-blocking transaction. |
#kStatus_Success | |
#kStatus_NoTransferInProgress | There is not a non-blocking transaction currently in progress. |
void I3C_MasterTransferAbort | ( | I3C_Type * | base, |
i3c_master_handle_t * | handle | ||
) |
base | The I3C peripheral base address. |
handle | Pointer to the I3C master driver handle. |
#kStatus_Success | A transaction was successfully aborted. |
kStatus_I3C_Idle | There is not a non-blocking transaction currently in progress. |
void I3C_MasterTransferHandleIRQ | ( | I3C_Type * | base, |
i3c_master_handle_t * | handle | ||
) |
base | The I3C peripheral base address. |
handle | Pointer to the I3C master driver handle. |
void I3C_SlaveGetDefaultConfig | ( | i3c_slave_config_t * | slaveConfig | ) |
This function provides the following default configuration for the I3C slave peripheral:
After calling this function, you can override any settings in order to customize the configuration, prior to initializing the slave driver with I3C_SlaveInit().
[out] | slaveConfig | User provided configuration structure for default values. Refer to i3c_slave_config_t. |
void I3C_SlaveInit | ( | I3C_Type * | base, |
const i3c_slave_config_t * | slaveConfig, | ||
uint32_t | slowClock_Hz | ||
) |
This function enables the peripheral clock and initializes the I3C slave peripheral as described by the user provided configuration.
base | The I3C peripheral base address. |
slaveConfig | User provided peripheral configuration. Use I3C_SlaveGetDefaultConfig() to get a set of defaults that you can override. |
slowClock_Hz | Frequency in Hertz of the I3C slow clock. Used to calculate the bus match condition values. |
void I3C_SlaveDeinit | ( | I3C_Type * | base | ) |
This function disables the I3C slave peripheral and gates the clock.
base | The I3C peripheral base address. |
|
inlinestatic |
A bit mask with the state of all I3C slave status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
base | The I3C peripheral base address. |
|
inlinestatic |
The following status register flags can be cleared:
Attempts to clear other flags has no effect.
base | The I3C peripheral base address. |
statusMask | A bitmask of status flags that are to be cleared. The mask is composed of _i3c_slave_flags enumerators OR'd together. You may pass the result of a previous call to I3C_SlaveGetStatusFlags(). |
|
inlinestatic |
A bit mask with the state of all I3C slave error status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
base | The I3C peripheral base address. |
|
inlinestatic |
base | The I3C peripheral base address. |
statusMask | A bitmask of error status flags that are to be cleared. The mask is composed of _i3c_slave_error_flags enumerators OR'd together. You may pass the result of a previous call to I3C_SlaveGetErrorStatusFlags(). |
i3c_slave_activity_state_t I3C_SlaveGetActivityState | ( | I3C_Type * | base | ) |
base | The I3C peripheral base address. |
|
inlinestatic |
Only below flags can be enabled as interrupts.
base | The I3C peripheral base address. |
interruptMask | Bit mask of interrupts to enable. See _i3c_slave_flags for the set of constants that should be OR'd together to form the bit mask. |
|
inlinestatic |
Only below flags can be disabled as interrupts.
base | The I3C peripheral base address. |
interruptMask | Bit mask of interrupts to disable. See _i3c_slave_flags for the set of constants that should be OR'd together to form the bit mask. |
|
inlinestatic |
base | The I3C peripheral base address. |
|
inlinestatic |
base | The I3C peripheral base address. |
|
inlinestatic |
base | The I3C peripheral base address. |
enableTx | Enable flag for transmit DMA request. Pass true for enable, false for disable. |
enableRx | Enable flag for receive DMA request. Pass true for enable, false for disable. |
width | DMA read/write unit in bytes. |
|
inlinestatic |
base | The I3C peripheral base address. |
width | DMA read/write unit in bytes. |
|
inlinestatic |
base | The I3C peripheral base address. |
width | DMA read/write unit in bytes. |
|
inlinestatic |
base | The I3C peripheral base address. |
txLvl | Transmit FIFO watermark level. The kI3C_SlaveTxReadyFlag flag is set whenever the number of words in the transmit FIFO reaches txLvl. |
rxLvl | Receive FIFO watermark level. The kI3C_SlaveRxReadyFlag flag is set whenever the number of words in the receive FIFO reaches rxLvl. |
flushTx | true if TX FIFO is to be cleared, otherwise TX FIFO remains unchanged. |
flushRx | true if RX FIFO is to be cleared, otherwise RX FIFO remains unchanged. |
|
inlinestatic |
base | The I3C peripheral base address. | |
[out] | txCount | Pointer through which the current number of bytes in the transmit FIFO is returned. Pass NULL if this value is not required. |
[out] | rxCount | Pointer through which the current number of bytes in the receive FIFO is returned. Pass NULL if this value is not required. |
void I3C_SlaveRequestEvent | ( | I3C_Type * | base, |
i3c_slave_event_t | event, | ||
uint8_t | data | ||
) |
base | The I3C peripheral base address. |
event | I3C slave event of type i3c_slave_event_t |
data | IBI data if In-band interrupt has data, only applicable for event type kI3C_SlaveEventIBI |
status_t I3C_SlaveSend | ( | I3C_Type * | base, |
const void * | txBuff, | ||
size_t | txSize | ||
) |
base | The I3C peripheral base address. |
txBuff | The pointer to the data to be transferred. |
txSize | The length in bytes of the data to be transferred. |
status_t I3C_SlaveReceive | ( | I3C_Type * | base, |
void * | rxBuff, | ||
size_t | rxSize | ||
) |
base | The I3C peripheral base address. |
rxBuff | The pointer to the data to be transferred. |
rxSize | The length in bytes of the data to be transferred. |