Classes | |
struct | _lpi2c_slave_config |
Structure with settings to initialize the LPI2C slave module. More... | |
struct | _lpi2c_slave_handle |
LPI2C slave handle structure. More... | |
struct | _lpi2c_slave_transfer |
LPI2C slave transfer structure. More... | |
Typedefs | |
typedef enum _lpi2c_slave_address_match | lpi2c_slave_address_match_t |
LPI2C slave address match options. More... | |
typedef struct _lpi2c_slave_config | lpi2c_slave_config_t |
Structure with settings to initialize the LPI2C slave module. More... | |
typedef struct _lpi2c_slave_handle | lpi2c_slave_handle_t |
typedef void(* | lpi2c_slave_transfer_callback_t) (LPI2C_Type *base, lpi2c_slave_transfer_t *transfer, void *userData) |
Slave event callback function pointer type. More... | |
typedef enum _lpi2c_slave_transfer_event | lpi2c_slave_transfer_event_t |
Set of events sent to the callback for non blocking slave transfers. More... | |
typedef struct _lpi2c_slave_transfer | lpi2c_slave_transfer_t |
LPI2C slave transfer structure. More... | |
Slave initialization and deinitialization | |
void | LPI2C_SlaveGetDefaultConfig (lpi2c_slave_config_t *slaveConfig) |
Provides a default configuration for the LPI2C slave peripheral. More... | |
void | LPI2C_SlaveInit (LPI2C_Type *base, const lpi2c_slave_config_t *slaveConfig, uint32_t sourceClock_Hz) |
Initializes the LPI2C slave peripheral. More... | |
void | LPI2C_SlaveDeinit (LPI2C_Type *base) |
Deinitializes the LPI2C slave peripheral. More... | |
static void | LPI2C_SlaveReset (LPI2C_Type *base) |
Performs a software reset of the LPI2C slave peripheral. More... | |
static void | LPI2C_SlaveEnable (LPI2C_Type *base, bool enable) |
Enables or disables the LPI2C module as slave. More... | |
Slave status | |
static uint32_t | LPI2C_SlaveGetStatusFlags (LPI2C_Type *base) |
Gets the LPI2C slave status flags. More... | |
static void | LPI2C_SlaveClearStatusFlags (LPI2C_Type *base, uint32_t statusMask) |
Clears the LPI2C status flag state. More... | |
Slave interrupts | |
static void | LPI2C_SlaveEnableInterrupts (LPI2C_Type *base, uint32_t interruptMask) |
Enables the LPI2C slave interrupt requests. More... | |
static void | LPI2C_SlaveDisableInterrupts (LPI2C_Type *base, uint32_t interruptMask) |
Disables the LPI2C slave interrupt requests. More... | |
static uint32_t | LPI2C_SlaveGetEnabledInterrupts (LPI2C_Type *base) |
Returns the set of currently enabled LPI2C slave interrupt requests. More... | |
Slave DMA control | |
static void | LPI2C_SlaveEnableDMA (LPI2C_Type *base, bool enableAddressValid, bool enableRx, bool enableTx) |
Enables or disables the LPI2C slave peripheral DMA requests. More... | |
Slave bus operations | |
static bool | LPI2C_SlaveGetBusIdleState (LPI2C_Type *base) |
Returns whether the bus is idle. More... | |
static void | LPI2C_SlaveTransmitAck (LPI2C_Type *base, bool ackOrNack) |
Transmits either an ACK or NAK on the I2C bus in response to a byte from the master. More... | |
static uint32_t | LPI2C_SlaveGetReceivedAddress (LPI2C_Type *base) |
Returns the slave address sent by the I2C master. More... | |
status_t | LPI2C_SlaveSend (LPI2C_Type *base, void *txBuff, size_t txSize, size_t *actualTxSize) |
Performs a polling send transfer on the I2C bus. More... | |
status_t | LPI2C_SlaveReceive (LPI2C_Type *base, void *rxBuff, size_t rxSize, size_t *actualRxSize) |
Performs a polling receive transfer on the I2C bus. More... | |
Slave non-blocking | |
void | LPI2C_SlaveTransferCreateHandle (LPI2C_Type *base, lpi2c_slave_handle_t *handle, lpi2c_slave_transfer_callback_t callback, void *userData) |
Creates a new handle for the LPI2C slave non-blocking APIs. More... | |
status_t | LPI2C_SlaveTransferNonBlocking (LPI2C_Type *base, lpi2c_slave_handle_t *handle, uint32_t eventMask) |
Starts accepting slave transfers. More... | |
status_t | LPI2C_SlaveTransferGetCount (LPI2C_Type *base, lpi2c_slave_handle_t *handle, size_t *count) |
Gets the slave transfer status during a non-blocking transfer. More... | |
void | LPI2C_SlaveTransferAbort (LPI2C_Type *base, lpi2c_slave_handle_t *handle) |
Aborts the slave non-blocking transfers. More... | |
Slave IRQ handler | |
void | LPI2C_SlaveTransferHandleIRQ (LPI2C_Type *base, lpi2c_slave_handle_t *handle) |
Reusable routine to handle slave interrupts. More... | |
typedef enum _lpi2c_slave_address_match lpi2c_slave_address_match_t |
LPI2C slave address match options.
typedef struct _lpi2c_slave_config lpi2c_slave_config_t |
Structure with settings to initialize the LPI2C slave module.
This structure holds configuration settings for the LPI2C slave peripheral. To initialize this structure to reasonable defaults, call the LPI2C_SlaveGetDefaultConfig() function and pass a pointer to your configuration structure instance.
The configuration structure can be made constant so it resides in flash.
typedef struct _lpi2c_slave_handle lpi2c_slave_handle_t |
Definition at line 372 of file fsl_lpi2c.h.
typedef void(* lpi2c_slave_transfer_callback_t) (LPI2C_Type *base, lpi2c_slave_transfer_t *transfer, void *userData) |
Slave event callback function pointer type.
This callback is used only for the slave non-blocking transfer API. To install a callback, use the LPI2C_SlaveSetCallback() function after you have created a handle.
base | Base address for the LPI2C instance on which the event occurred. |
transfer | Pointer to transfer descriptor containing values passed to and/or from the callback. |
userData | Arbitrary pointer-sized value passed from the application. |
Definition at line 384 of file fsl_lpi2c.h.
typedef enum _lpi2c_slave_transfer_event lpi2c_slave_transfer_event_t |
Set of events sent to the callback for non blocking slave transfers.
These event enumerations are used for two related purposes. First, a bit mask created by OR'ing together events is passed to LPI2C_SlaveTransferNonBlocking() in order to specify which events to enable. Then, when the slave callback is invoked, it is passed the current event through its transfer parameter.
typedef struct _lpi2c_slave_transfer lpi2c_slave_transfer_t |
LPI2C slave transfer structure.
LPI2C slave address match options.
Definition at line 286 of file fsl_lpi2c.h.
enum _lpi2c_slave_flags |
LPI2C slave peripheral flags.
The following status register flags can be cleared:
All flags except kLPI2C_SlaveBusyFlag and kLPI2C_SlaveBusBusyFlag can be enabled as interrupts.
Definition at line 268 of file fsl_lpi2c.h.
Set of events sent to the callback for non blocking slave transfers.
These event enumerations are used for two related purposes. First, a bit mask created by OR'ing together events is passed to LPI2C_SlaveTransferNonBlocking() in order to specify which events to enable. Then, when the slave callback is invoked, it is passed the current event through its transfer parameter.
Definition at line 343 of file fsl_lpi2c.h.
|
inlinestatic |
Clears the LPI2C status flag state.
The following status register flags can be cleared:
Attempts to clear other flags has no effect.
base | The LPI2C peripheral base address. |
statusMask | A bitmask of status flags that are to be cleared. The mask is composed of _lpi2c_slave_flags enumerators OR'd together. You may pass the result of a previous call to LPI2C_SlaveGetStatusFlags(). |
Definition at line 1030 of file fsl_lpi2c.h.
void LPI2C_SlaveDeinit | ( | LPI2C_Type * | base | ) |
Deinitializes the LPI2C slave peripheral.
This function disables the LPI2C slave peripheral and gates the clock. It also performs a software reset to restore the peripheral to reset conditions.
base | The LPI2C peripheral base address. |
brief Deinitializes the LPI2C slave peripheral.
This function disables the LPI2C slave peripheral and gates the clock. It also performs a software reset to restore the peripheral to reset conditions.
param base The LPI2C peripheral base address.
Definition at line 1582 of file fsl_lpi2c.c.
|
inlinestatic |
Disables the LPI2C slave interrupt requests.
All flags except kLPI2C_SlaveBusyFlag and kLPI2C_SlaveBusBusyFlag can be enabled as interrupts.
base | The LPI2C peripheral base address. |
interruptMask | Bit mask of interrupts to disable. See _lpi2c_slave_flags for the set of constants that should be OR'd together to form the bit mask. |
Definition at line 1065 of file fsl_lpi2c.h.
|
inlinestatic |
Enables or disables the LPI2C module as slave.
base | The LPI2C peripheral base address. |
enable | Pass true to enable or false to disable the specified LPI2C as slave. |
Definition at line 986 of file fsl_lpi2c.h.
|
inlinestatic |
Enables or disables the LPI2C slave peripheral DMA requests.
base | The LPI2C peripheral base address. |
enableAddressValid | Enable flag for the address valid DMA request. Pass true for enable, false for disable. The address valid DMA request is shared with the receive data DMA request. |
enableRx | Enable flag for the receive data DMA request. Pass true for enable, false for disable. |
enableTx | Enable flag for the transmit data DMA request. Pass true for enable, false for disable. |
Definition at line 1095 of file fsl_lpi2c.h.
|
inlinestatic |
Enables the LPI2C slave interrupt requests.
All flags except kLPI2C_SlaveBusyFlag and kLPI2C_SlaveBusBusyFlag can be enabled as interrupts.
base | The LPI2C peripheral base address. |
interruptMask | Bit mask of interrupts to enable. See _lpi2c_slave_flags for the set of constants that should be OR'd together to form the bit mask. |
Definition at line 1050 of file fsl_lpi2c.h.
|
inlinestatic |
Returns whether the bus is idle.
Requires the slave mode to be enabled.
base | The LPI2C peripheral base address. |
true | Bus is busy. |
false | Bus is idle. |
Definition at line 1115 of file fsl_lpi2c.h.
void LPI2C_SlaveGetDefaultConfig | ( | lpi2c_slave_config_t * | slaveConfig | ) |
Provides a default configuration for the LPI2C slave peripheral.
This function provides the following default configuration for the LPI2C slave peripheral:
After calling this function, override any settings to customize the configuration, prior to initializing the master driver with LPI2C_SlaveInit(). Be sure to override at least the address0 member of the configuration structure with the desired slave address.
[out] | slaveConfig | User provided configuration structure that is set to default values. Refer to lpi2c_slave_config_t. |
brief Provides a default configuration for the LPI2C slave peripheral.
This function provides the following default configuration for the LPI2C slave peripheral: code slaveConfig->enableSlave = true; slaveConfig->address0 = 0U; slaveConfig->address1 = 0U; slaveConfig->addressMatchMode = kLPI2C_MatchAddress0; slaveConfig->filterDozeEnable = true; slaveConfig->filterEnable = true; slaveConfig->enableGeneralCall = false; slaveConfig->sclStall.enableAck = false; slaveConfig->sclStall.enableTx = true; slaveConfig->sclStall.enableRx = true; slaveConfig->sclStall.enableAddress = true; slaveConfig->ignoreAck = false; slaveConfig->enableReceivedAddressRead = false; slaveConfig->sdaGlitchFilterWidth_ns = 0; slaveConfig->sclGlitchFilterWidth_ns = 0; slaveConfig->dataValidDelay_ns = 0; slaveConfig->clockHoldTime_ns = 0; endcode
After calling this function, override any settings to customize the configuration, prior to initializing the master driver with LPI2C_SlaveInit(). Be sure to override at least the a address0 member of the configuration structure with the desired slave address.
param[out] slaveConfig User provided configuration structure that is set to default values. Refer to lpi2c_slave_config_t.
Definition at line 1490 of file fsl_lpi2c.c.
|
inlinestatic |
Returns the set of currently enabled LPI2C slave interrupt requests.
base | The LPI2C peripheral base address. |
Definition at line 1076 of file fsl_lpi2c.h.
|
inlinestatic |
Returns the slave address sent by the I2C master.
This function should only be called if the kLPI2C_SlaveAddressValidFlag is asserted.
base | The LPI2C peripheral base address. |
Definition at line 1144 of file fsl_lpi2c.h.
|
inlinestatic |
Gets the LPI2C slave status flags.
A bit mask with the state of all LPI2C slave status flags is returned. For each flag, the corresponding bit in the return value is set if the flag is asserted.
base | The LPI2C peripheral base address. |
Definition at line 1008 of file fsl_lpi2c.h.
void LPI2C_SlaveInit | ( | LPI2C_Type * | base, |
const lpi2c_slave_config_t * | slaveConfig, | ||
uint32_t | sourceClock_Hz | ||
) |
Initializes the LPI2C slave peripheral.
This function enables the peripheral clock and initializes the LPI2C slave peripheral as described by the user provided configuration.
base | The LPI2C peripheral base address. |
slaveConfig | User provided peripheral configuration. Use LPI2C_SlaveGetDefaultConfig() to get a set of defaults that you can override. |
sourceClock_Hz | Frequency in Hertz of the LPI2C functional clock. Used to calculate the filter widths, data valid delay, and clock hold time. |
brief Initializes the LPI2C slave peripheral.
This function enables the peripheral clock and initializes the LPI2C slave peripheral as described by the user provided configuration.
param base The LPI2C peripheral base address. param slaveConfig User provided peripheral configuration. Use LPI2C_SlaveGetDefaultConfig() to get a set of defaults that you can override. param sourceClock_Hz Frequency in Hertz of the LPI2C functional clock. Used to calculate the filter widths, data valid delay, and clock hold time.
Definition at line 1526 of file fsl_lpi2c.c.
status_t LPI2C_SlaveReceive | ( | LPI2C_Type * | base, |
void * | rxBuff, | ||
size_t | rxSize, | ||
size_t * | actualRxSize | ||
) |
Performs a polling receive transfer on the I2C bus.
base | The LPI2C peripheral base address. | |
rxBuff | The pointer to the data to be transferred. | |
rxSize | The length in bytes of the data to be transferred. | |
[out] | actualRxSize |
brief Performs a polling receive transfer on the I2C bus.
param base The LPI2C peripheral base address. param rxBuff The pointer to the data to be transferred. param rxSize The length in bytes of the data to be transferred. param[out] actualRxSize return Error or success status returned by API.
Definition at line 1730 of file fsl_lpi2c.c.
|
inlinestatic |
Performs a software reset of the LPI2C slave peripheral.
base | The LPI2C peripheral base address. |
Definition at line 974 of file fsl_lpi2c.h.
status_t LPI2C_SlaveSend | ( | LPI2C_Type * | base, |
void * | txBuff, | ||
size_t | txSize, | ||
size_t * | actualTxSize | ||
) |
Performs a polling send transfer on the I2C bus.
base | The LPI2C peripheral base address. | |
txBuff | The pointer to the data to be transferred. | |
txSize | The length in bytes of the data to be transferred. | |
[out] | actualTxSize |
brief Performs a polling send transfer on the I2C bus.
param base The LPI2C peripheral base address. param txBuff The pointer to the data to be transferred. param txSize The length in bytes of the data to be transferred. param[out] actualTxSize return Error or success status returned by API.
Definition at line 1649 of file fsl_lpi2c.c.
void LPI2C_SlaveTransferAbort | ( | LPI2C_Type * | base, |
lpi2c_slave_handle_t * | handle | ||
) |
Aborts the slave non-blocking transfers.
base | The LPI2C peripheral base address. |
handle | Pointer to lpi2c_slave_handle_t structure which stores the transfer state. |
kStatus_Success | |
kStatus_LPI2C_Idle | brief Aborts the slave non-blocking transfers. note This API could be called at any time to stop slave for handling the bus events. param base The LPI2C peripheral base address. param handle Pointer to lpi2c_slave_handle_t structure which stores the transfer state. retval kStatus_Success retval kStatus_LPI2C_Idle |
Definition at line 1957 of file fsl_lpi2c.c.
void LPI2C_SlaveTransferCreateHandle | ( | LPI2C_Type * | base, |
lpi2c_slave_handle_t * | handle, | ||
lpi2c_slave_transfer_callback_t | callback, | ||
void * | userData | ||
) |
Creates a new handle for the LPI2C slave non-blocking APIs.
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 LPI2C_SlaveTransferAbort() API shall be called.
base | The LPI2C peripheral base address. | |
[out] | handle | Pointer to the LPI2C slave driver handle. |
callback | User provided pointer to the asynchronous callback function. | |
userData | User provided pointer to the application callback data. |
brief Creates a new handle for the LPI2C slave non-blocking APIs.
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 LPI2C_SlaveTransferAbort() API shall be called.
note The function also enables the NVIC IRQ for the input LPI2C. Need to notice that on some SoCs the LPI2C IRQ is connected to INTMUX, in this case user needs to enable the associated INTMUX IRQ in application.
param base The LPI2C peripheral base address. param[out] handle Pointer to the LPI2C slave driver handle. param callback User provided pointer to the asynchronous callback function. param userData User provided pointer to the application callback data.
Definition at line 1818 of file fsl_lpi2c.c.
status_t LPI2C_SlaveTransferGetCount | ( | LPI2C_Type * | base, |
lpi2c_slave_handle_t * | handle, | ||
size_t * | count | ||
) |
Gets the slave transfer status during a non-blocking transfer.
base | The LPI2C peripheral base address. | |
handle | Pointer to i2c_slave_handle_t structure. | |
[out] | count | Pointer to a value to hold the number of bytes transferred. May be NULL if the count is not required. |
kStatus_Success | |
kStatus_NoTransferInProgress | brief Gets the slave transfer status during a non-blocking transfer. param base The LPI2C peripheral base address. param handle Pointer to i2c_slave_handle_t structure. param[out] count Pointer to a value to hold the number of bytes transferred. May be NULL if the count is not required. retval kStatus_Success retval kStatus_NoTransferInProgress |
Definition at line 1927 of file fsl_lpi2c.c.
void LPI2C_SlaveTransferHandleIRQ | ( | LPI2C_Type * | base, |
lpi2c_slave_handle_t * | handle | ||
) |
Reusable routine to handle slave interrupts.
base | The LPI2C peripheral base address. |
handle | Pointer to lpi2c_slave_handle_t structure which stores the transfer state. |
brief Reusable routine to handle slave interrupts. note This function does not need to be called unless you are reimplementing the non blocking API's interrupt handler routines to add special functionality. param base The LPI2C peripheral base address. param handle Pointer to lpi2c_slave_handle_t structure which stores the transfer state.
Definition at line 1985 of file fsl_lpi2c.c.
status_t LPI2C_SlaveTransferNonBlocking | ( | LPI2C_Type * | base, |
lpi2c_slave_handle_t * | handle, | ||
uint32_t | eventMask | ||
) |
Starts accepting slave transfers.
Call this API after calling I2C_SlaveInit() and LPI2C_SlaveTransferCreateHandle() to start processing transactions driven by an I2C master. The slave monitors the I2C bus and pass events to the callback that was passed into the call to LPI2C_SlaveTransferCreateHandle(). The callback is always invoked from the interrupt context.
The set of events received by the callback is customizable. To do so, set the eventMask parameter to the OR'd combination of lpi2c_slave_transfer_event_t enumerators for the events you wish to receive. The kLPI2C_SlaveTransmitEvent and kLPI2C_SlaveReceiveEvent events are always enabled and do not need to be included in the mask. Alternatively, you can pass 0 to get a default set of only the transmit and receive events that are always enabled. In addition, the kLPI2C_SlaveAllEvents constant is provided as a convenient way to enable all events.
base | The LPI2C peripheral base address. |
handle | Pointer to lpi2c_slave_handle_t structure which stores the transfer state. |
eventMask | Bit mask formed by OR'ing together lpi2c_slave_transfer_event_t enumerators to specify which events to send to the callback. Other accepted values are 0 to get a default set of only the transmit and receive events, and kLPI2C_SlaveAllEvents to enable all events. |
kStatus_Success | Slave transfers were successfully started. |
kStatus_LPI2C_Busy | Slave transfers have already been started on this handle. |
brief Starts accepting slave transfers.
Call this API after calling I2C_SlaveInit() and LPI2C_SlaveTransferCreateHandle() to start processing transactions driven by an I2C master. The slave monitors the I2C bus and pass events to the callback that was passed into the call to LPI2C_SlaveTransferCreateHandle(). The callback is always invoked from the interrupt context.
The set of events received by the callback is customizable. To do so, set the a eventMask parameter to the OR'd combination of lpi2c_slave_transfer_event_t enumerators for the events you wish to receive. The kLPI2C_SlaveTransmitEvent and kLPI2C_SlaveReceiveEvent events are always enabled and do not need to be included in the mask. Alternatively, you can pass 0 to get a default set of only the transmit and receive events that are always enabled. In addition, the kLPI2C_SlaveAllEvents constant is provided as a convenient way to enable all events.
param base The LPI2C peripheral base address. param handle Pointer to lpi2c_slave_handle_t structure which stores the transfer state. param eventMask Bit mask formed by OR'ing together lpi2c_slave_transfer_event_t enumerators to specify which events to send to the callback. Other accepted values are 0 to get a default set of only the transmit and receive events, and kLPI2C_SlaveAllEvents to enable all events.
retval kStatus_Success Slave transfers were successfully started. retval kStatus_LPI2C_Busy Slave transfers have already been started on this handle.
Definition at line 1875 of file fsl_lpi2c.c.
|
inlinestatic |
Transmits either an ACK or NAK on the I2C bus in response to a byte from the master.
Use this function to send an ACK or NAK when the kLPI2C_SlaveTransmitAckFlag is asserted. This only happens if you enable the sclStall.enableAck field of the lpi2c_slave_config_t configuration structure used to initialize the slave peripheral.
base | The LPI2C peripheral base address. |
ackOrNack | Pass true for an ACK or false for a NAK. |
Definition at line 1130 of file fsl_lpi2c.h.
uint8_t _lpi2c_slave_config::address0 |
Slave's 7-bit address.
Definition at line 305 of file fsl_lpi2c.h.
uint8_t _lpi2c_slave_config::address1 |
Alternate slave 7-bit address.
Definition at line 306 of file fsl_lpi2c.h.
lpi2c_slave_address_match_t _lpi2c_slave_config::addressMatchMode |
Address matching options.
Definition at line 307 of file fsl_lpi2c.h.
uint32_t _lpi2c_master_config::baudRate_Hz |
Desired baud rate in Hertz.
Definition at line 144 of file fsl_lpi2c.h.
uint8_t* _lpi2c_master_handle::buf |
Buffer pointer for current state.
Definition at line 240 of file fsl_lpi2c.h.
uint32_t _lpi2c_master_config::busIdleTimeout_ns |
Bus idle timeout in nanoseconds. Set to 0 to disable.
Definition at line 145 of file fsl_lpi2c.h.
lpi2c_slave_transfer_callback_t _lpi2c_slave_handle::callback |
Callback function called at transfer event.
Definition at line 397 of file fsl_lpi2c.h.
uint32_t _lpi2c_slave_config::clockHoldTime_ns |
Width in nanoseconds of the clock hold time.
Definition at line 330 of file fsl_lpi2c.h.
uint16_t _lpi2c_master_handle::commandBuffer[7] |
LPI2C command sequence.
Definition at line 241 of file fsl_lpi2c.h.
lpi2c_master_transfer_callback_t _lpi2c_master_handle::completionCallback |
Callback function pointer.
Definition at line 243 of file fsl_lpi2c.h.
status_t _lpi2c_slave_transfer::completionStatus |
Success or error code describing how the transfer completed. Only applies for kLPI2C_SlaveCompletionEvent.
Definition at line 366 of file fsl_lpi2c.h.
void* _lpi2c_master_transfer::data |
Pointer to data to transfer.
Definition at line 228 of file fsl_lpi2c.h.
uint8_t* _lpi2c_slave_transfer::data |
Transfer buffer
Definition at line 364 of file fsl_lpi2c.h.
size_t _lpi2c_master_transfer::dataSize |
Number of bytes to transfer.
Definition at line 229 of file fsl_lpi2c.h.
size_t _lpi2c_slave_transfer::dataSize |
Transfer size
Definition at line 365 of file fsl_lpi2c.h.
uint32_t _lpi2c_slave_config::dataValidDelay_ns |
Width in nanoseconds of the data valid delay.
Definition at line 329 of file fsl_lpi2c.h.
bool _lpi2c_master_config::debugEnable |
Enable transfers to continue when halted in debug mode.
Definition at line 141 of file fsl_lpi2c.h.
lpi2c_direction_t _lpi2c_master_transfer::direction |
Either kLPI2C_Read or kLPI2C_Write.
Definition at line 225 of file fsl_lpi2c.h.
bool _lpi2c_master_config::enable |
Enable host request.
Definition at line 151 of file fsl_lpi2c.h.
bool { ... } ::enable |
Enable host request.
Definition at line 151 of file fsl_lpi2c.h.
bool _lpi2c_slave_config::enableAck |
Enables SCL clock stretching during slave-transmit address byte(s) and slave-receiver address and data byte(s) to allow software to write the Transmit ACK Register before the ACK or NACK is transmitted. Clock stretching occurs when transmitting the 9th bit. When enableAckSCLStall is enabled, there is no need to set either enableRxDataSCLStall or enableAddressSCLStall.
Definition at line 313 of file fsl_lpi2c.h.
bool { ... } ::enableAck |
Enables SCL clock stretching during slave-transmit address byte(s) and slave-receiver address and data byte(s) to allow software to write the Transmit ACK Register before the ACK or NACK is transmitted. Clock stretching occurs when transmitting the 9th bit. When enableAckSCLStall is enabled, there is no need to set either enableRxDataSCLStall or enableAddressSCLStall.
Definition at line 313 of file fsl_lpi2c.h.
bool _lpi2c_slave_config::enableAddress |
Enables SCL clock stretching when the address valid flag is asserted.
Definition at line 323 of file fsl_lpi2c.h.
bool { ... } ::enableAddress |
Enables SCL clock stretching when the address valid flag is asserted.
Definition at line 323 of file fsl_lpi2c.h.
bool _lpi2c_master_config::enableDoze |
Whether master is enabled in doze mode.
Definition at line 140 of file fsl_lpi2c.h.
bool _lpi2c_slave_config::enableGeneralCall |
Enable general call address matching.
Definition at line 310 of file fsl_lpi2c.h.
bool _lpi2c_master_config::enableMaster |
Whether to enable master mode.
Definition at line 139 of file fsl_lpi2c.h.
bool _lpi2c_slave_config::enableReceivedAddressRead |
Enable reading the address received address as the first byte of data.
Definition at line 326 of file fsl_lpi2c.h.
bool _lpi2c_slave_config::enableRx |
Enables SCL clock stretching when receive data flag is set during a slave-receive transfer.
Definition at line 321 of file fsl_lpi2c.h.
bool { ... } ::enableRx |
Enables SCL clock stretching when receive data flag is set during a slave-receive transfer.
Definition at line 321 of file fsl_lpi2c.h.
bool _lpi2c_slave_config::enableSlave |
Enable slave mode.
Definition at line 304 of file fsl_lpi2c.h.
bool _lpi2c_slave_config::enableTx |
Enables SCL clock stretching when the transmit data flag is set during a slave-transmit transfer.
Definition at line 319 of file fsl_lpi2c.h.
bool { ... } ::enableTx |
Enables SCL clock stretching when the transmit data flag is set during a slave-transmit transfer.
Definition at line 319 of file fsl_lpi2c.h.
lpi2c_slave_transfer_event_t _lpi2c_slave_transfer::event |
Reason the callback is being invoked.
Definition at line 362 of file fsl_lpi2c.h.
uint32_t _lpi2c_slave_handle::eventMask |
Mask of enabled events.
Definition at line 395 of file fsl_lpi2c.h.
bool _lpi2c_slave_config::filterDozeEnable |
Enable digital glitch filter in doze mode.
Definition at line 308 of file fsl_lpi2c.h.
bool _lpi2c_slave_config::filterEnable |
Enable digital glitch filter.
Definition at line 309 of file fsl_lpi2c.h.
uint32_t _lpi2c_master_transfer::flags |
Bit mask of options for the transfer. See enumeration _lpi2c_master_transfer_flags for available options. Set to 0 or kLPI2C_TransferDefaultFlag for normal transfers.
Definition at line 222 of file fsl_lpi2c.h.
struct { ... } _lpi2c_master_config::hostRequest |
Host request options.
bool _lpi2c_master_config::ignoreAck |
Whether to ignore ACK/NACK.
Definition at line 142 of file fsl_lpi2c.h.
bool _lpi2c_slave_config::ignoreAck |
Continue transfers after a NACK is detected.
Definition at line 325 of file fsl_lpi2c.h.
bool _lpi2c_slave_handle::isBusy |
Whether transfer is busy.
Definition at line 393 of file fsl_lpi2c.h.
uint32_t _lpi2c_match_config::match0 |
Match value 0.
Definition at line 178 of file fsl_lpi2c.h.
uint32_t _lpi2c_match_config::match1 |
Match value 1.
Definition at line 179 of file fsl_lpi2c.h.
lpi2c_data_match_config_mode_t _lpi2c_match_config::matchMode |
Data match configuration setting.
Definition at line 176 of file fsl_lpi2c.h.
lpi2c_master_pin_config_t _lpi2c_master_config::pinConfig |
The pin configuration option.
Definition at line 143 of file fsl_lpi2c.h.
uint32_t _lpi2c_master_config::pinLowTimeout_ns |
Pin low timeout in nanoseconds. Set to 0 to disable.
Definition at line 146 of file fsl_lpi2c.h.
lpi2c_host_request_polarity_t { ... } ::polarity |
Host request pin polarity.
Definition at line 153 of file fsl_lpi2c.h.
lpi2c_host_request_polarity_t _lpi2c_master_config::polarity |
Host request pin polarity.
Definition at line 153 of file fsl_lpi2c.h.
uint8_t _lpi2c_slave_transfer::receivedAddress |
Matching address send by master.
Definition at line 363 of file fsl_lpi2c.h.
uint16_t _lpi2c_master_handle::remainingBytes |
Remaining byte count in current state.
Definition at line 239 of file fsl_lpi2c.h.
bool _lpi2c_match_config::rxDataMatchOnly |
When set to true, received data is ignored until a successful match.
Definition at line 177 of file fsl_lpi2c.h.
uint8_t _lpi2c_master_config::sclGlitchFilterWidth_ns |
Width in nanoseconds of glitch filter on SCL pin. Set to 0 to disable.
Definition at line 148 of file fsl_lpi2c.h.
uint32_t _lpi2c_slave_config::sclGlitchFilterWidth_ns |
Width in nanoseconds of the digital filter on the SCL signal.
Definition at line 328 of file fsl_lpi2c.h.
struct { ... } _lpi2c_slave_config::sclStall |
uint8_t _lpi2c_master_config::sdaGlitchFilterWidth_ns |
Width in nanoseconds of glitch filter on SDA pin. Set to 0 to disable.
Definition at line 147 of file fsl_lpi2c.h.
uint32_t _lpi2c_slave_config::sdaGlitchFilterWidth_ns |
Width in nanoseconds of the digital filter on the SDA signal.
Definition at line 327 of file fsl_lpi2c.h.
uint16_t _lpi2c_master_transfer::slaveAddress |
The 7-bit slave address.
Definition at line 224 of file fsl_lpi2c.h.
lpi2c_host_request_source_t _lpi2c_master_config::source |
Host request source.
Definition at line 152 of file fsl_lpi2c.h.
lpi2c_host_request_source_t { ... } ::source |
Host request source.
Definition at line 152 of file fsl_lpi2c.h.
uint8_t _lpi2c_master_handle::state |
Transfer state machine current state.
Definition at line 238 of file fsl_lpi2c.h.
uint32_t _lpi2c_master_transfer::subaddress |
Sub address. Transferred MSB first.
Definition at line 226 of file fsl_lpi2c.h.
size_t _lpi2c_master_transfer::subaddressSize |
Length of sub address to send in bytes. Maximum size is 4 bytes.
Definition at line 227 of file fsl_lpi2c.h.
lpi2c_master_transfer_t _lpi2c_master_handle::transfer |
Copy of the current transfer info.
Definition at line 242 of file fsl_lpi2c.h.
lpi2c_slave_transfer_t _lpi2c_slave_handle::transfer |
LPI2C slave transfer copy.
Definition at line 392 of file fsl_lpi2c.h.
size_t _lpi2c_slave_transfer::transferredCount |
Number of bytes actually transferred since start or last repeated start.
Definition at line 368 of file fsl_lpi2c.h.
uint32_t _lpi2c_slave_handle::transferredCount |
Count of bytes transferred.
Definition at line 396 of file fsl_lpi2c.h.
void* _lpi2c_master_handle::userData |
Application data passed to callback.
Definition at line 244 of file fsl_lpi2c.h.
void* _lpi2c_slave_handle::userData |
Callback parameter passed to callback.
Definition at line 398 of file fsl_lpi2c.h.
bool _lpi2c_slave_handle::wasTransmit |
Whether the last transfer was a transmit.
Definition at line 394 of file fsl_lpi2c.h.