S32 SDK

Detailed Description

Low Power Inter-Integrated Circuit (LPI2C) Hardware Abstraction Layer.

Low Power Inter-Integrated Circuit Hardware Abstraction Layer.

LPI2C HAL provides the API for reading and writing register bit-fields belonging to the LPI2C module. It also provides an initialization function for bringing the module to the reset state.

For higher-level functionality, use the LPI2C driver.

Data Structures

struct  lpi2c_version_info_t
 LPI2C module version number Implements : lpi2c_version_info_t_Class. More...
 

Macros

#define LPI2C_HAL_MASTER_DATA_MATCH_INT   0x4000UL
 
#define LPI2C_HAL_MASTER_PIN_LOW_TIMEOUT_INT   0x2000UL
 
#define LPI2C_HAL_MASTER_FIFO_ERROR_INT   0x1000UL
 
#define LPI2C_HAL_MASTER_ARBITRATION_LOST_INT   0x800UL
 
#define LPI2C_HAL_MASTER_NACK_DETECT_INT   0x400UL
 
#define LPI2C_HAL_MASTER_STOP_DETECT_INT   0x200UL
 
#define LPI2C_HAL_MASTER_END_PACKET_INT   0x100UL
 
#define LPI2C_HAL_MASTER_RECEIVE_DATA_INT   0x2UL
 
#define LPI2C_HAL_MASTER_TRANSMIT_DATA_INT   0x1UL
 
#define LPI2C_HAL_SLAVE_SMBUS_ALERT_RESPONSE_INT   0x8000UL
 
#define LPI2C_HAL_SLAVE_GENERAL_CALL_INT   0x4000UL
 
#define LPI2C_HAL_SLAVE_ADDRESS_MATCH_1_INT   0x2000UL
 
#define LPI2C_HAL_SLAVE_ADDRESS_MATCH_0_INT   0x1000UL
 
#define LPI2C_HAL_SLAVE_FIFO_ERROR_INT   0x800UL
 
#define LPI2C_HAL_SLAVE_BIT_ERROR_INT   0x400UL
 
#define LPI2C_HAL_SLAVE_STOP_DETECT_INT   0x200UL
 
#define LPI2C_HAL_SLAVE_REPEATED_START_INT   0x100UL
 
#define LPI2C_HAL_SLAVE_TRANSMIT_ACK_INT   0x8UL
 
#define LPI2C_HAL_SLAVE_ADDRESS_VALID_INT   0x4UL
 
#define LPI2C_HAL_SLAVE_RECEIVE_DATA_INT   0x2UL
 
#define LPI2C_HAL_SLAVE_TRANSMIT_DATA_INT   0x1UL
 

Enumerations

enum  lpi2c_rx_data_match_t { LPI2C_RX_DATA_KEEP_ALL = 0U, LPI2C_RX_DATA_DROP_NON_MATCHING = 1U }
 Non_matching data discard options Implements : lpi2c_rx_data_match_t_Class. More...
 
enum  lpi2c_hreq_source_t { LPI2C_HREQ_EXTERNAL_PIN = 0U, LPI2C_HREQ_INTERNAL_TRIGGER = 1U }
 Host request input source selection Implements : lpi2c_hreq_source_t_Class. More...
 
enum  lpi2c_hreq_polarity_t { LPI2C_HREQ_POL_ACTIVE_HIGH = 0U, LPI2C_HREQ_POL_ACTIVE_LOW = 1U }
 Host request input polarity selection Implements : lpi2c_hreq_polarity_t_Class. More...
 
enum  lpi2c_pin_config_t {
  LPI2C_CFG_2PIN_OPEN_DRAIN = 0U, LPI2C_CFG_2PIN_OUTPUT_ONLY = 1U, LPI2C_CFG_2PIN_PUSH_PULL = 2U, LPI2C_CFG_4PIN_PUSH_PULL = 3U,
  LPI2C_CFG_2PIN_OPEN_DRAIN_SLAVE = 4U, LPI2C_CFG_2PIN_OUTPUT_ONLY_SLAVE = 5U, LPI2C_CFG_2PIN_PUSH_PULL_SLAVE = 6U, LPI2C_CFG_4PIN_PUSH_PULL_INVERTED = 7U
}
 Pin configuration selection Implements : lpi2c_pin_config_t_Class. More...
 
enum  lpi2c_match_config_t {
  LPI2C_MATCH_DISABLED = 0U, LPI2C_MATCH_OR_FIRST = 2U, LPI2C_MATCH_OR_ANY = 3U, LPI2C_MATCH_AND_FIRST = 4U,
  LPI2C_MATCH_AND_ANY = 5U, LPI2C_MATCH_MASK_FIRST = 6U, LPI2C_MATCH_MASK_ANY = 7U
}
 Data match selection Implements : lpi2c_match_config_t_Class. More...
 
enum  lpi2c_timeout_config_t { LPI2C_TIMEOUT_SCL = 0U, LPI2C_TIMEOUT_SCL_OR_SDA = 1U }
 SCL/SDA low time-out configuration Implements : lpi2c_timeout_config_t_Class. More...
 
enum  lpi2c_nack_config_t { LPI2C_NACK_RECEIVE = 0U, LPI2C_NACK_IGNORE = 1U }
 Master NACK reaction configuration Implements : lpi2c_nack_config_t_Class. More...
 
enum  lpi2c_master_prescaler_t {
  LPI2C_MASTER_PRESC_DIV_1 = 0U, LPI2C_MASTER_PRESC_DIV_2 = 1U, LPI2C_MASTER_PRESC_DIV_4 = 2U, LPI2C_MASTER_PRESC_DIV_8 = 3U,
  LPI2C_MASTER_PRESC_DIV_16 = 4U, LPI2C_MASTER_PRESC_DIV_32 = 5U, LPI2C_MASTER_PRESC_DIV_64 = 6U, LPI2C_MASTER_PRESC_DIV_128 = 7U
}
 LPI2C master prescaler options Implements : lpi2c_master_prescaler_t_Class. More...
 
enum  lpi2c_master_command_t {
  LPI2C_MASTER_COMMAND_TRANSMIT = 0U, LPI2C_MASTER_COMMAND_RECEIVE = 1U, LPI2C_MASTER_COMMAND_STOP = 2U, LPI2C_MASTER_COMMAND_RECEIVE_DISCARD = 3U,
  LPI2C_MASTER_COMMAND_START = 4U, LPI2C_MASTER_COMMAND_START_NACK = 5U, LPI2C_MASTER_COMMAND_START_HS = 6U, LPI2C_MASTER_COMMAND_START_NACK_HS = 7U
}
 LPI2C master commands Implements : lpi2c_master_command_t_Class. More...
 
enum  lpi2c_slave_addr_config_t {
  LPI2C_SLAVE_ADDR_MATCH_0_7BIT = 0U, LPI2C_SLAVE_ADDR_MATCH_0_10BIT = 1U, LPI2C_SLAVE_ADDR_MATCH_0_7BIT_OR_1_7BIT = 2U, LPI2C_SLAVE_ADDR_MATCH_0_10BIT_OR_1_10BIT = 3U,
  LPI2C_SLAVE_ADDR_MATCH_0_7BIT_OR_1_10BIT = 4U, LPI2C_SLAVE_ADDR_MATCH_0_10BIT_OR_1_7BIT = 5U, LPI2C_SLAVE_ADDR_MATCH_RANGE_7BIT = 6U, LPI2C_SLAVE_ADDR_MATCH_RANGE_10BIT = 7U
}
 Slave address configuration Implements : lpi2c_slave_addr_config_t_Class. More...
 
enum  lpi2c_slave_nack_config_t { LPI2C_SLAVE_NACK_END_TRANSFER = 0U, LPI2C_SLAVE_NACK_CONTINUE_TRANSFER = 1U }
 Slave NACK reaction configuration Implements : lpi2c_slave_nack_config_t_Class. More...
 
enum  lpi2c_slave_rxdata_config_t { LPI2C_SLAVE_RXDATA_DATA_ONLY = 0U, LPI2C_SLAVE_RXDATA_DATA_OR_ADDR = 1U }
 Slave receive data register function configuration Implements : lpi2c_slave_rxdata_config_t_Class. More...
 
enum  lpi2c_slave_txflag_config_t { LPI2C_SLAVE_TXFLAG_TRANSFER_ONLY = 0U, LPI2C_SLAVE_TXFLAG_ALWAYS = 1U }
 Slave Transmit Data Flag function control Implements : lpi2c_slave_txflag_config_t_Class. More...
 
enum  lpi2c_slave_addr_valid_t { LPI2C_SLAVE_ADDR_VALID = 0U, LPI2C_SLAVE_ADDR_NOT_VALID = 1U }
 Slave received address validity Implements : lpi2c_slave_addr_valid_t_Class. More...
 
enum  lpi2c_slave_nack_transmit_t { LPI2C_SLAVE_TRANSMIT_ACK = 0U, LPI2C_SLAVE_TRANSMIT_NACK = 1U }
 Slave ACK transmission options Implements : lpi2c_slave_nack_transmit_t_Class. More...
 

Configuration

static void LPI2C_HAL_GetVersion (const LPI2C_Type *baseAddr, lpi2c_version_info_t *versionInfo)
 Get the version of the LPI2C module. More...
 
static uint16_t LPI2C_HAL_MasterGetRxFIFOSize (const LPI2C_Type *baseAddr)
 Get the size of the Master Receive FIFO. More...
 
static uint16_t LPI2C_HAL_MasterGetTxFIFOSize (const LPI2C_Type *baseAddr)
 Get the size of the Master Transmit FIFO. More...
 
static void LPI2C_HAL_MasterRxFIFOResetCmd (LPI2C_Type *baseAddr)
 Reset the master receive FIFO. More...
 
static void LPI2C_HAL_MasterTxFIFOResetCmd (LPI2C_Type *baseAddr)
 Reset the master transmit FIFO. More...
 
static void LPI2C_HAL_MasterSetDebugMode (LPI2C_Type *baseAddr, bool enable)
 Set the master behaviour in Debug mode. More...
 
static void LPI2C_HAL_MasterSetDozeMode (LPI2C_Type *baseAddr, bool enable)
 Set the master behaviour in Doze mode. More...
 
static void LPI2C_HAL_MasterSetSoftwareReset (LPI2C_Type *baseAddr, bool enable)
 Set/clear the master reset command. More...
 
static void LPI2C_HAL_MasterSetEnable (LPI2C_Type *baseAddr, bool enable)
 Enable or disable the LPI2C master. More...
 
static bool LPI2C_HAL_MasterGetDebugMode (const LPI2C_Type *baseAddr)
 Return the debug mode setting for the LPI2C master. More...
 
static bool LPI2C_HAL_MasterGetDozeMode (const LPI2C_Type *baseAddr)
 Return the doze mode setting for the LPI2C master. More...
 
static bool LPI2C_HAL_MasterGetSoftwareReset (const LPI2C_Type *baseAddr)
 Return the reset setting for the LPI2C master. More...
 
static bool LPI2C_HAL_MasterGetEnable (const LPI2C_Type *baseAddr)
 Return the enable/disable setting for the LPI2C master. More...
 
static bool LPI2C_HAL_MasterGetBusBusyEvent (const LPI2C_Type *baseAddr)
 Return the idle/busy state of the I2C bus. More...
 
static bool LPI2C_HAL_MasterGetMasterBusyEvent (const LPI2C_Type *baseAddr)
 Return the idle/busy state of the LPI2C master. More...
 
static bool LPI2C_HAL_MasterGetReceiveDataReadyEvent (const LPI2C_Type *baseAddr)
 Indicate the availability of receive data. More...
 
static bool LPI2C_HAL_MasterGetTransmitDataRequestEvent (const LPI2C_Type *baseAddr)
 Indicate if the LPI2C master requests more data. More...
 
static bool LPI2C_HAL_MasterGetDataMatchEvent (const LPI2C_Type *baseAddr)
 Check the occurrence of a data match event. More...
 
static bool LPI2C_HAL_MasterGetPinLowTimeoutEvent (const LPI2C_Type *baseAddr)
 Check the occurrence of a pin low timeout event. More...
 
static bool LPI2C_HAL_MasterGetFIFOErrorEvent (const LPI2C_Type *baseAddr)
 Check the occurrence of a FIFO error event. More...
 
static bool LPI2C_HAL_MasterGetArbitrationLostEvent (const LPI2C_Type *baseAddr)
 Check the occurrence of an arbitration lost event. More...
 
static bool LPI2C_HAL_MasterGetNACKDetectEvent (const LPI2C_Type *baseAddr)
 Check the occurrence of an unexpected NACK event. More...
 
static bool LPI2C_HAL_MasterGetSTOPDetectEvent (const LPI2C_Type *baseAddr)
 Check the occurrence of a STOP detect event. More...
 
static bool LPI2C_HAL_MasterGetEndPacketEvent (const LPI2C_Type *baseAddr)
 Check the occurrence of an end packet event. More...
 
static void LPI2C_HAL_MasterClearDataMatchEvent (LPI2C_Type *baseAddr)
 Clear the data match event flag. More...
 
static void LPI2C_HAL_MasterClearPinLowTimeoutEvent (LPI2C_Type *baseAddr)
 Clear the pin low timeout event flag. More...
 
static void LPI2C_HAL_MasterClearFIFOErrorEvent (LPI2C_Type *baseAddr)
 Clear the FIFO error event flag. More...
 
static void LPI2C_HAL_MasterClearArbitrationLostEvent (LPI2C_Type *baseAddr)
 Clear the arbitration lost event flag. More...
 
static void LPI2C_HAL_MasterClearNACKDetectEvent (LPI2C_Type *baseAddr)
 Clear the unexpected NACK event flag. More...
 
static void LPI2C_HAL_MasterClearSTOPDetectEvent (LPI2C_Type *baseAddr)
 Clear the STOP detect event flag. More...
 
static void LPI2C_HAL_MasterClearEndPacketEvent (LPI2C_Type *baseAddr)
 Clear the end packet event flag. More...
 
static void LPI2C_HAL_MasterSetRxDMA (LPI2C_Type *baseAddr, bool enable)
 Enable/disable receive data DMA requests. More...
 
static void LPI2C_HAL_MasterSetTxDMA (LPI2C_Type *baseAddr, bool enable)
 Enable/disable transmit data DMA requests. More...
 
static bool LPI2C_HAL_MasterGetRxDMA (const LPI2C_Type *baseAddr)
 Check if receive data DMA requests are enabled. More...
 
static bool LPI2C_HAL_MasterGetTxDMA (const LPI2C_Type *baseAddr)
 Check if transmit data DMA requests are enabled. More...
 
static void LPI2C_HAL_MasterSetInt (LPI2C_Type *baseAddr, uint32_t interrupts, bool enable)
 Enable or disable specified LPI2C master interrupts. More...
 
static bool LPI2C_HAL_MasterGetInt (const LPI2C_Type *baseAddr, uint32_t interrupts)
 Return the state of the specified LPI2C master interrupt. More...
 
static void LPI2C_HAL_MasterSetRxDataMatch (LPI2C_Type *baseAddr, lpi2c_rx_data_match_t rxDataMatch)
 Control the discarding of data that does not match the configured criteria. More...
 
static lpi2c_rx_data_match_t LPI2C_HAL_MasterGetRxDataMatch (const LPI2C_Type *baseAddr)
 Return the current data match discarding policy. More...
 
static void LPI2C_HAL_MasterSetCircularFIFO (LPI2C_Type *baseAddr, bool enable)
 Set the circular FIFO mode for the transmit FIFO. More...
 
static bool LPI2C_HAL_MasterGetCircularFIFO (const LPI2C_Type *baseAddr)
 Return the circular FIFO mode for the transmit FIFO. More...
 
static void LPI2C_HAL_MasterSetHreqSelect (LPI2C_Type *baseAddr, lpi2c_hreq_source_t source)
 Set the source of the host request input. More...
 
static void LPI2C_HAL_MasterSetHreqPolarity (LPI2C_Type *baseAddr, lpi2c_hreq_polarity_t polarity)
 Set the polarity of the host request input pin. More...
 
static void LPI2C_HAL_MasterSetHreqEnable (LPI2C_Type *baseAddr, bool enable)
 Enable/disable the host request feature. More...
 
static lpi2c_hreq_source_t LPI2C_HAL_MasterGetHreqSelect (const LPI2C_Type *baseAddr)
 Return the source of the host request input. More...
 
static lpi2c_hreq_polarity_t LPI2C_HAL_MasterGetHreqPolarity (const LPI2C_Type *baseAddr)
 Return the polarity of the host request input pin. More...
 
static bool LPI2C_HAL_MasterGetHreqEnable (const LPI2C_Type *baseAddr)
 Return the enable/disable state the host request feature. More...
 
static void LPI2C_HAL_MasterSetPinConfig (LPI2C_Type *baseAddr, lpi2c_pin_config_t configuration)
 Set the pin mode of the module. More...
 
static lpi2c_pin_config_t LPI2C_HAL_MasterGetPinConfig (const LPI2C_Type *baseAddr)
 Return the pin mode of the module. More...
 
static void LPI2C_HAL_MasterSetMatchConfig (LPI2C_Type *baseAddr, lpi2c_match_config_t configuration)
 Set the match mode of the module. More...
 
static lpi2c_match_config_t LPI2C_HAL_MasterGetMatchConfig (const LPI2C_Type *baseAddr)
 Return the match mode of the module. More...
 
static void LPI2C_HAL_MasterSetTimeoutConfig (LPI2C_Type *baseAddr, lpi2c_timeout_config_t configuration)
 Set the timeout configuration of the module. More...
 
static lpi2c_timeout_config_t LPI2C_HAL_MasterGetTimeoutConfig (const LPI2C_Type *baseAddr)
 Return the timeout configuration of the module. More...
 
static void LPI2C_HAL_MasterSetNACKConfig (LPI2C_Type *baseAddr, lpi2c_nack_config_t configuration)
 Configure the reaction of the module on NACK reception. More...
 
static lpi2c_nack_config_t LPI2C_HAL_MasterGetNACKConfig (const LPI2C_Type *baseAddr)
 Return the reaction of the module on NACK reception. More...
 
static void LPI2C_HAL_MasterSetAutoStopConfig (LPI2C_Type *baseAddr, bool enable)
 Configure the automatic generation of STOP condition. More...
 
static bool LPI2C_HAL_MasterGetAutoStopConfig (const LPI2C_Type *baseAddr)
 Return the current setting for automatic generation of STOP condition. More...
 
static void LPI2C_HAL_MasterSetPrescaler (LPI2C_Type *baseAddr, lpi2c_master_prescaler_t prescaler)
 Configure the LPI2C master prescaler. More...
 
static lpi2c_master_prescaler_t LPI2C_HAL_MasterGetPrescaler (const LPI2C_Type *baseAddr)
 Return the LPI2C master prescaler. More...
 
static void LPI2C_HAL_MasterSetSDAGlitchFilter (LPI2C_Type *baseAddr, uint8_t cycles)
 Configure the LPI2C SDA glitch filter. More...
 
static uint8_t LPI2C_HAL_MasterGetSDAGlitchFilter (const LPI2C_Type *baseAddr)
 Return the LPI2C SDA glitch filter configuration. More...
 
static void LPI2C_HAL_MasterSetSCLGlitchFilter (LPI2C_Type *baseAddr, uint8_t cycles)
 Configure the LPI2C SCL glitch filter. More...
 
static uint8_t LPI2C_HAL_MasterGetSCLGlitchFilter (const LPI2C_Type *baseAddr)
 Return the LPI2C SCL glitch filter configuration. More...
 
static void LPI2C_HAL_MasterSetBusIdleTimeout (LPI2C_Type *baseAddr, uint16_t cycles)
 Configure the bus idle timeout. More...
 
static uint16_t LPI2C_HAL_MasterGetBusIdleTimeout (const LPI2C_Type *baseAddr)
 Return the bus idle timeout configuration. More...
 
static void LPI2C_HAL_MasterSetPinLowTimeout (LPI2C_Type *baseAddr, uint32_t cycles)
 Configure the pin low timeout. More...
 
static uint32_t LPI2C_HAL_MasterGetPinLowTimeout (const LPI2C_Type *baseAddr)
 Return the pin low timeout configuration. More...
 
static void LPI2C_HAL_MasterSetMatch0 (LPI2C_Type *baseAddr, uint8_t value)
 Set the MATCH0 value for the data match feature. More...
 
static uint8_t LPI2C_HAL_MasterGetMatch0 (const LPI2C_Type *baseAddr)
 Return the MATCH0 value for the data match feature. More...
 
static void LPI2C_HAL_MasterSetMatch1 (LPI2C_Type *baseAddr, uint8_t value)
 Set the MATCH1 value for the data match feature. More...
 
static uint8_t LPI2C_HAL_MasterGetMatch1 (const LPI2C_Type *baseAddr)
 Return the MATCH1 value for the data match feature. More...
 
static void LPI2C_HAL_MasterSetDataValidDelay (LPI2C_Type *baseAddr, uint8_t value)
 Set the data hold time for SDA. More...
 
static uint8_t LPI2C_HAL_MasterGetDataValidDelay (const LPI2C_Type *baseAddr)
 Return the configured data hold time for SDA. More...
 
static void LPI2C_HAL_MasterSetSetupHoldDelay (LPI2C_Type *baseAddr, uint8_t value)
 Set the setup and hold delay for a START / STOP condition. More...
 
static uint8_t LPI2C_HAL_MasterGetSetupHoldDelay (const LPI2C_Type *baseAddr)
 Return the configured setup and hold time. More...
 
static void LPI2C_HAL_MasterSetClockHighPeriod (LPI2C_Type *baseAddr, uint8_t value)
 Set the minimum clock high period. More...
 
static uint8_t LPI2C_HAL_MasterGetClockHighPeriod (const LPI2C_Type *baseAddr)
 Return the configured minimum clock high period. More...
 
static void LPI2C_HAL_MasterSetClockLowPeriod (LPI2C_Type *baseAddr, uint8_t value)
 Set the minimum clock low period. More...
 
static uint8_t LPI2C_HAL_MasterGetClockLowPeriod (const LPI2C_Type *baseAddr)
 Return the configured minimum clock low period. More...
 
static void LPI2C_HAL_MasterSetDataValidDelayHS (LPI2C_Type *baseAddr, uint8_t value)
 Set the data hold time for SDA in high-speed mode. More...
 
static uint8_t LPI2C_HAL_MasterGetDataValidDelayHS (const LPI2C_Type *baseAddr)
 Return the configured data hold time for SDA in high-speed mode. More...
 
static void LPI2C_HAL_MasterSetSetupHoldDelayHS (LPI2C_Type *baseAddr, uint8_t value)
 Set the setup and hold time for a START / STOP condition in high-speed mode. More...
 
static uint8_t LPI2C_HAL_MasterGetSetupHoldDelayHS (const LPI2C_Type *baseAddr)
 Return the configured setup and hold time in high-speed mode. More...
 
static void LPI2C_HAL_MasterSetClockHighPeriodHS (LPI2C_Type *baseAddr, uint8_t value)
 Set the minimum clock high period in high-speed mode. More...
 
static uint8_t LPI2C_HAL_MasterGetClockHighPeriodHS (const LPI2C_Type *baseAddr)
 Return the configured minimum clock high period in high-speed mode. More...
 
static void LPI2C_HAL_MasterSetClockLowPeriodHS (LPI2C_Type *baseAddr, uint8_t value)
 Set the minimum clock low period in high-speed mode. More...
 
static uint8_t LPI2C_HAL_MasterGetClockLowPeriodHS (const LPI2C_Type *baseAddr)
 Return the configured minimum clock low period in high-speed mode. More...
 
static void LPI2C_HAL_MasterSetRxFIFOWatermark (LPI2C_Type *baseAddr, uint8_t value)
 Set the receive FIFO watermark. More...
 
static uint8_t LPI2C_HAL_MasterGetRxFIFOWatermark (const LPI2C_Type *baseAddr)
 Return the configured receive FIFO watermark. More...
 
static void LPI2C_HAL_MasterSetTxFIFOWatermark (LPI2C_Type *baseAddr, uint8_t value)
 Set the transmit FIFO watermark. More...
 
static uint8_t LPI2C_HAL_MasterGetTxFIFOWatermark (const LPI2C_Type *baseAddr)
 Return the configured transmit FIFO watermark. More...
 
static uint8_t LPI2C_HAL_MasterGetRxFIFOCount (const LPI2C_Type *baseAddr)
 Return the number of words in the receive FIFO. More...
 
static uint8_t LPI2C_HAL_MasterGetTxFIFOCount (const LPI2C_Type *baseAddr)
 Return the number of words in the transmit FIFO. More...
 
static void LPI2C_HAL_MasterTransmitCmd (LPI2C_Type *baseAddr, lpi2c_master_command_t cmd, uint8_t data)
 Provide commands and data for the LPI2C master. More...
 
static uint8_t LPI2C_HAL_MasterGetRxData (const LPI2C_Type *baseAddr)
 Return the received data. More...
 
static bool LPI2C_HAL_MasterGetRxEmpty (const LPI2C_Type *baseAddr)
 Check if the master receive FIFO is empty. More...
 
static void LPI2C_HAL_SlaveSetFilterDoze (LPI2C_Type *baseAddr, bool enable)
 Configure the slave filter in doze mode. More...
 
static bool LPI2C_HAL_SlaveGetFilterDoze (const LPI2C_Type *baseAddr)
 Return the slave filter configuration in doze mode. More...
 
static void LPI2C_HAL_SlaveSetFilterEnable (LPI2C_Type *baseAddr, bool enable)
 Enable/disable the slave filter. More...
 
static bool LPI2C_HAL_SlaveGetFilterEnable (const LPI2C_Type *baseAddr)
 Check if the slave filter is enabled or disabled. More...
 
static void LPI2C_HAL_SlaveSetSoftwareReset (LPI2C_Type *baseAddr, bool enable)
 Set/clear the slave reset command. More...
 
static bool LPI2C_HAL_SlaveGetSoftwareReset (const LPI2C_Type *baseAddr)
 Return the reset setting for the LPI2C slave. More...
 
static void LPI2C_HAL_SlaveSetEnable (LPI2C_Type *baseAddr, bool enable)
 Enable or disable the LPI2C slave. More...
 
static bool LPI2C_HAL_SlaveGetEnable (const LPI2C_Type *baseAddr)
 Return the enable/disable setting for the LPI2C slave. More...
 
static bool LPI2C_HAL_SlaveGetBusBusyEvent (const LPI2C_Type *baseAddr)
 Check the busy state of the bus. More...
 
static bool LPI2C_HAL_SlaveGetSlaveBusyEvent (const LPI2C_Type *baseAddr)
 Check the busy state of the slave. More...
 
static bool LPI2C_HAL_SlaveGetSMBusAlertResponseEvent (const LPI2C_Type *baseAddr)
 Check the occurrence of an SMBus alert response. More...
 
static bool LPI2C_HAL_SlaveGetGeneralCallEvent (const LPI2C_Type *baseAddr)
 Check the detection of the general call address. More...
 
static bool LPI2C_HAL_SlaveGetAddressMatch1Event (const LPI2C_Type *baseAddr)
 Check the detection of an ADDR1 address match. More...
 
static bool LPI2C_HAL_SlaveGetAddressMatch0Event (const LPI2C_Type *baseAddr)
 Check the detection of an ADDR0 address match. More...
 
static bool LPI2C_HAL_SlaveGetFIFOErrorEvent (const LPI2C_Type *baseAddr)
 Check the detection of a FIFO overflow or underflow. More...
 
static bool LPI2C_HAL_SlaveGetBitErrorEvent (const LPI2C_Type *baseAddr)
 Check the detection of a bit error. More...
 
static bool LPI2C_HAL_SlaveGetSTOPDetectEvent (const LPI2C_Type *baseAddr)
 Check the detection of a STOP condition. More...
 
static bool LPI2C_HAL_SlaveGetRepeatedStartEvent (const LPI2C_Type *baseAddr)
 Check the detection of a repeated START condition. More...
 
static bool LPI2C_HAL_SlaveGetTransmitACKEvent (const LPI2C_Type *baseAddr)
 Check if transmitting ACK response is required. More...
 
static bool LPI2C_HAL_SlaveGetAddressValidEvent (const LPI2C_Type *baseAddr)
 Check the validity of the Address Status Register. More...
 
static bool LPI2C_HAL_SlaveGetReceiveDataEvent (const LPI2C_Type *baseAddr)
 Check the availability of receive data. More...
 
static bool LPI2C_HAL_SlaveGetTransmitDataEvent (const LPI2C_Type *baseAddr)
 Check if transmit data is requested. More...
 
static void LPI2C_HAL_SlaveClearFIFOErrorEvent (LPI2C_Type *baseAddr)
 Clear the FIFO overflow or underflow flag. More...
 
static void LPI2C_HAL_SlaveClearBitErrorEvent (LPI2C_Type *baseAddr)
 Clear bit error flag. More...
 
static void LPI2C_HAL_SlaveClearSTOPDetectEvent (LPI2C_Type *baseAddr)
 Clear the STOP detect flag. More...
 
static void LPI2C_HAL_SlaveClearRepeatedStartEvent (LPI2C_Type *baseAddr)
 Clear the repeated START detect flag. More...
 
static void LPI2C_HAL_SlaveSetInt (LPI2C_Type *baseAddr, uint32_t interrupts, bool enable)
 Enable or disable specified LPI2C slave interrupts. More...
 
static bool LPI2C_HAL_SlaveGetInt (const LPI2C_Type *baseAddr, uint32_t interrupts)
 Return the state of the specified LPI2C slave interrupt. More...
 
static void LPI2C_HAL_SlaveSetAddrDMA (LPI2C_Type *baseAddr, bool enable)
 Enable/disable slave address valid DMA requests. More...
 
static void LPI2C_HAL_SlaveSetRxDMA (LPI2C_Type *baseAddr, bool enable)
 Enable/disable slave receive data DMA requests. More...
 
static void LPI2C_HAL_SlaveSetTxDMA (LPI2C_Type *baseAddr, bool enable)
 Enable/disable slave transmit data DMA requests. More...
 
static bool LPI2C_HAL_SlaveGetAddrDMA (const LPI2C_Type *baseAddr)
 Check if slave address valid DMA requests are enabled. More...
 
static bool LPI2C_HAL_SlaveGetRxDMA (const LPI2C_Type *baseAddr)
 Check if slave receive data DMA requests are enabled. More...
 
static bool LPI2C_HAL_SlaveGetTxDMA (const LPI2C_Type *baseAddr)
 Check if slave transmit data DMA requests are enabled. More...
 
static void LPI2C_HAL_SlaveSetAddrConfig (LPI2C_Type *baseAddr, lpi2c_slave_addr_config_t configuration)
 Control address match configuration. More...
 
static lpi2c_slave_addr_config_t LPI2C_HAL_SlaveGetAddrConfig (const LPI2C_Type *baseAddr)
 Return the address match configuration. More...
 
static void LPI2C_HAL_SlaveSetHighSpeedModeDetect (LPI2C_Type *baseAddr, bool enable)
 Control detection of the High-speed Mode master code. More...
 
static bool LPI2C_HAL_SlaveGetHighSpeedModeDetect (const LPI2C_Type *baseAddr)
 Return the state of the High-speed Mode master code detection. More...
 
static void LPI2C_HAL_SlaveSetIgnoreNACK (LPI2C_Type *baseAddr, lpi2c_slave_nack_config_t nack_config)
 Control slave behaviour when NACK is detected. More...
 
static lpi2c_slave_nack_config_t LPI2C_HAL_SlaveGetIgnoreNACK (const LPI2C_Type *baseAddr)
 Return the configured slave behaviour when NACK is detected. More...
 
static void LPI2C_HAL_SlaveSetRxDataConfig (LPI2C_Type *baseAddr, lpi2c_slave_rxdata_config_t configuration)
 Control the functionality of the receive data register. More...
 
static lpi2c_slave_rxdata_config_t LPI2C_HAL_SlaveGetRxDataConfig (const LPI2C_Type *baseAddr)
 Return the configured functionality of the receive data register. More...
 
static void LPI2C_HAL_SlaveSetTxFlagConfig (LPI2C_Type *baseAddr, lpi2c_slave_txflag_config_t configuration)
 Control the conditions for setting the transmit data flag. More...
 
static lpi2c_slave_txflag_config_t LPI2C_HAL_SlaveGetTxFlagConfig (const LPI2C_Type *baseAddr)
 Return the configured settings for the transmit data flag. More...
 
static void LPI2C_HAL_SlaveSetSMBusAlert (LPI2C_Type *baseAddr, bool enable)
 Enable or disable match on SMBus Alert. More...
 
static bool LPI2C_HAL_SlaveGetSMBusAlert (const LPI2C_Type *baseAddr)
 Return the configured state for the SMBus Alert match. More...
 
static void LPI2C_HAL_SlaveSetGeneralCall (LPI2C_Type *baseAddr, bool enable)
 Enable or disable general call address. More...
 
static bool LPI2C_HAL_SlaveGetGeneralCall (const LPI2C_Type *baseAddr)
 Return the configured state for the general call address. More...
 
static void LPI2C_HAL_SlaveSetACKStall (LPI2C_Type *baseAddr, bool enable)
 Enable or disable clock stretching for the sending of the ACK bit. More...
 
static bool LPI2C_HAL_SlaveGetACKStall (const LPI2C_Type *baseAddr)
 Return the configured state for clock stretching for the sending of the ACK bit. More...
 
static void LPI2C_HAL_SlaveSetTXDStall (LPI2C_Type *baseAddr, bool enable)
 Enable or disable clock stretching for data transmission. More...
 
static bool LPI2C_HAL_SlaveGetTXDStall (const LPI2C_Type *baseAddr)
 Return the configured state for clock stretching for data transmission. More...
 
static void LPI2C_HAL_SlaveSetRXStall (LPI2C_Type *baseAddr, bool enable)
 Enable or disable clock stretching for data reception. More...
 
static bool LPI2C_HAL_SlaveGetRXStall (const LPI2C_Type *baseAddr)
 Return the configured state for clock stretching for data reception. More...
 
static void LPI2C_HAL_SlaveSetAddrStall (LPI2C_Type *baseAddr, bool enable)
 Enable or disable clock stretching for valid address reception. More...
 
static bool LPI2C_HAL_SlaveGetAddrStall (const LPI2C_Type *baseAddr)
 Return the configured state for clock stretching for valid address reception. More...
 
static void LPI2C_HAL_SlaveSetSDAGlitchFilter (LPI2C_Type *baseAddr, uint8_t cycles)
 Configure the LPI2C slave SDA glitch filter. More...
 
static uint8_t LPI2C_HAL_SlaveGetSDAGlitchFilter (const LPI2C_Type *baseAddr)
 Return the LPI2C slave SDA glitch filter configuration. More...
 
static void LPI2C_HAL_SlaveSetSCLGlitchFilter (LPI2C_Type *baseAddr, uint8_t cycles)
 Configure the LPI2C slave SCL glitch filter. More...
 
static uint8_t LPI2C_HAL_SlaveGetSCLGlitchFilter (const LPI2C_Type *baseAddr)
 Return the LPI2C slave SCL glitch filter configuration. More...
 
static void LPI2C_HAL_SlaveSetDataValidDelay (LPI2C_Type *baseAddr, uint8_t cycles)
 Configure the SDA data valid delay time for the I2C slave. More...
 
static uint8_t LPI2C_HAL_SlaveGetDataValidDelay (const LPI2C_Type *baseAddr)
 Return the SDA data valid delay time configuration. More...
 
static void LPI2C_HAL_SlaveSetClockHoldTime (LPI2C_Type *baseAddr, uint8_t cycles)
 Configure the minimum clock hold time for the I2C slave. More...
 
static uint8_t LPI2C_HAL_SlaveGetClockHoldTime (const LPI2C_Type *baseAddr)
 Return the minimum clock hold time configuration. More...
 
static void LPI2C_HAL_SlaveSetAddr1 (LPI2C_Type *baseAddr, uint16_t addr)
 Configure the ADDR1 address for slave address match. More...
 
static uint16_t LPI2C_HAL_SlaveGetAddr1 (const LPI2C_Type *baseAddr)
 Return the ADDR1 address for slave address match. More...
 
static void LPI2C_HAL_SlaveSetAddr0 (LPI2C_Type *baseAddr, uint16_t addr)
 Configure the ADDR0 address for slave address match. More...
 
static uint16_t LPI2C_HAL_SlaveGetAddr0 (const LPI2C_Type *baseAddr)
 Return the ADDR0 address for slave address match. More...
 
static lpi2c_slave_addr_valid_t LPI2C_HAL_SlaveGetAddrValid (const LPI2C_Type *baseAddr)
 Check the validity of received address. More...
 
static uint16_t LPI2C_HAL_SlaveGetReceivedAddr (const LPI2C_Type *baseAddr)
 Return the received slave address. More...
 
static void LPI2C_HAL_SlaveSetTransmitNACK (LPI2C_Type *baseAddr, lpi2c_slave_nack_transmit_t nack)
 Configure the ACK/NACK transmission after a received byte. More...
 
static lpi2c_slave_nack_transmit_t LPI2C_HAL_SlaveGetTransmitNACK (const LPI2C_Type *baseAddr)
 Return the configured ACK/NACK transmission setting. More...
 
static void LPI2C_HAL_SlaveTransmitData (LPI2C_Type *baseAddr, uint8_t data)
 Provide data for the LPI2C slave transmitter. More...
 
static bool LPI2C_HAL_SlaveGetStartOfFrame (const LPI2C_Type *baseAddr)
 Check if the current received data is the first in the current frame. More...
 
static bool LPI2C_HAL_SlaveGetRXEmpty (const LPI2C_Type *baseAddr)
 Check if the receive data register is empty. More...
 
static uint8_t LPI2C_HAL_SlaveGetData (const LPI2C_Type *baseAddr)
 Return the data received by the LPI2C slave receiver. More...
 
void LPI2C_HAL_Init (LPI2C_Type *baseAddr)
 Initializes the LPI2C module to a known state. More...
 

Macro Definition Documentation

#define LPI2C_HAL_MASTER_ARBITRATION_LOST_INT   0x800UL

Arbitration Lost Interrupt

Definition at line 83 of file lpi2c_hal.h.

#define LPI2C_HAL_MASTER_DATA_MATCH_INT   0x4000UL

LPI2C master interruptsData Match Interrupt

Definition at line 80 of file lpi2c_hal.h.

#define LPI2C_HAL_MASTER_END_PACKET_INT   0x100UL

End Packet Interrupt

Definition at line 86 of file lpi2c_hal.h.

#define LPI2C_HAL_MASTER_FIFO_ERROR_INT   0x1000UL

FIFO Error Interrupt

Definition at line 82 of file lpi2c_hal.h.

#define LPI2C_HAL_MASTER_NACK_DETECT_INT   0x400UL

NACK Detect Interrupt

Definition at line 84 of file lpi2c_hal.h.

#define LPI2C_HAL_MASTER_PIN_LOW_TIMEOUT_INT   0x2000UL

Pin Low Timeout Interrupt

Definition at line 81 of file lpi2c_hal.h.

#define LPI2C_HAL_MASTER_RECEIVE_DATA_INT   0x2UL

Receive Data Interrupt

Definition at line 87 of file lpi2c_hal.h.

#define LPI2C_HAL_MASTER_STOP_DETECT_INT   0x200UL

STOP Detect Interrupt

Definition at line 85 of file lpi2c_hal.h.

#define LPI2C_HAL_MASTER_TRANSMIT_DATA_INT   0x1UL

Transmit Data Interrupt

Definition at line 88 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_ADDRESS_MATCH_0_INT   0x1000UL

Address Match 0 Interrupt

Definition at line 96 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_ADDRESS_MATCH_1_INT   0x2000UL

Address Match 1 Interrupt

Definition at line 95 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_ADDRESS_VALID_INT   0x4UL

Address Valid Interrupt

Definition at line 102 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_BIT_ERROR_INT   0x400UL

Bit Error Interrupt

Definition at line 98 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_FIFO_ERROR_INT   0x800UL

FIFO Error Interrupt

Definition at line 97 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_GENERAL_CALL_INT   0x4000UL

General Call Interrupt

Definition at line 94 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_RECEIVE_DATA_INT   0x2UL

Receive Data Interrupt

Definition at line 103 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_REPEATED_START_INT   0x100UL

Repeated Start Interrupt

Definition at line 100 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_SMBUS_ALERT_RESPONSE_INT   0x8000UL

LPI2C slave interruptsSMBus Alert Response Interrupt

Definition at line 93 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_STOP_DETECT_INT   0x200UL

STOP Detect Interrupt

Definition at line 99 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_TRANSMIT_ACK_INT   0x8UL

Transmit ACK Interrupt

Definition at line 101 of file lpi2c_hal.h.

#define LPI2C_HAL_SLAVE_TRANSMIT_DATA_INT   0x1UL

Transmit Data Interrupt

Definition at line 104 of file lpi2c_hal.h.

Enumeration Type Documentation

Host request input polarity selection Implements : lpi2c_hreq_polarity_t_Class.

Enumerator
LPI2C_HREQ_POL_ACTIVE_HIGH 

Host request active low

LPI2C_HREQ_POL_ACTIVE_LOW 

Host request active high

Definition at line 137 of file lpi2c_hal.h.

Host request input source selection Implements : lpi2c_hreq_source_t_Class.

Enumerator
LPI2C_HREQ_EXTERNAL_PIN 

Host request input is external pin

LPI2C_HREQ_INTERNAL_TRIGGER 

Host request input is internal trigger

Definition at line 128 of file lpi2c_hal.h.

LPI2C master commands Implements : lpi2c_master_command_t_Class.

Enumerator
LPI2C_MASTER_COMMAND_TRANSMIT 

Transmit DATA[7:0]

LPI2C_MASTER_COMMAND_RECEIVE 

Receive (DATA[7:0] + 1) bytes

LPI2C_MASTER_COMMAND_STOP 

Generate STOP condition

LPI2C_MASTER_COMMAND_RECEIVE_DISCARD 

Receive and discard (DATA[7:0] + 1) bytes

LPI2C_MASTER_COMMAND_START 

Generate START and transmit address in DATA[7:0]

LPI2C_MASTER_COMMAND_START_NACK 

Generate START and transmit address in DATA[7:0], expect a NACK to be returned

LPI2C_MASTER_COMMAND_START_HS 

Generate START and transmit address in DATA[7:0] in high speed mode

LPI2C_MASTER_COMMAND_START_NACK_HS 

Generate START and transmit address in DATA[7:0] in high speed mode, expect a NACK to be returned

Definition at line 208 of file lpi2c_hal.h.

LPI2C master prescaler options Implements : lpi2c_master_prescaler_t_Class.

Enumerator
LPI2C_MASTER_PRESC_DIV_1 

Divide by 1

LPI2C_MASTER_PRESC_DIV_2 

Divide by 2

LPI2C_MASTER_PRESC_DIV_4 

Divide by 4

LPI2C_MASTER_PRESC_DIV_8 

Divide by 8

LPI2C_MASTER_PRESC_DIV_16 

Divide by 16

LPI2C_MASTER_PRESC_DIV_32 

Divide by 32

LPI2C_MASTER_PRESC_DIV_64 

Divide by 64

LPI2C_MASTER_PRESC_DIV_128 

Divide by 128

Definition at line 193 of file lpi2c_hal.h.

Data match selection Implements : lpi2c_match_config_t_Class.

Enumerator
LPI2C_MATCH_DISABLED 

Match disabled

LPI2C_MATCH_OR_FIRST 

Match enabled (1st data word equals MATCH0 OR MATCH1)

LPI2C_MATCH_OR_ANY 

Match enabled (any data word equals MATCH0 OR MATCH1)

LPI2C_MATCH_AND_FIRST 

Match enabled (1st data word equals MATCH0 AND 2nd data word equals MATCH1)

LPI2C_MATCH_AND_ANY 

Match enabled (any data word equals MATCH0 AND next data word equals MATCH1)

LPI2C_MATCH_MASK_FIRST 

Match enabled (1st data word AND MATCH1 equals MATCH0 AND MATCH1)

LPI2C_MATCH_MASK_ANY 

Match enabled (any data word AND MATCH1 equals MATCH0 AND MATCH1)

Definition at line 161 of file lpi2c_hal.h.

Master NACK reaction configuration Implements : lpi2c_nack_config_t_Class.

Enumerator
LPI2C_NACK_RECEIVE 

Receive ACK and NACK normally

LPI2C_NACK_IGNORE 

Treat a received NACK as if it was an ACK

Definition at line 184 of file lpi2c_hal.h.

Pin configuration selection Implements : lpi2c_pin_config_t_Class.

Enumerator
LPI2C_CFG_2PIN_OPEN_DRAIN 

2-pin open drain mode

LPI2C_CFG_2PIN_OUTPUT_ONLY 

2-pin output only mode (ultra-fast mode)

LPI2C_CFG_2PIN_PUSH_PULL 

2-pin push-pull mode

LPI2C_CFG_4PIN_PUSH_PULL 

4-pin push-pull mode

LPI2C_CFG_2PIN_OPEN_DRAIN_SLAVE 

2-pin open drain mode with separate LPI2C slave

LPI2C_CFG_2PIN_OUTPUT_ONLY_SLAVE 

2-pin output only mode (ultra-fast mode) with separate LPI2C slave

LPI2C_CFG_2PIN_PUSH_PULL_SLAVE 

2-pin push-pull mode with separate LPI2C slave

LPI2C_CFG_4PIN_PUSH_PULL_INVERTED 

4-pin push-pull mode (inverted outputs)

Definition at line 146 of file lpi2c_hal.h.

Non_matching data discard options Implements : lpi2c_rx_data_match_t_Class.

Enumerator
LPI2C_RX_DATA_KEEP_ALL 

Received data is stored in the receive FIFO as normal

LPI2C_RX_DATA_DROP_NON_MATCHING 

Received data is discarded unless the RMF is set

Definition at line 119 of file lpi2c_hal.h.

Slave address configuration Implements : lpi2c_slave_addr_config_t_Class.

Enumerator
LPI2C_SLAVE_ADDR_MATCH_0_7BIT 

Address match 0 (7-bit)

LPI2C_SLAVE_ADDR_MATCH_0_10BIT 

Address match 0 (10-bit)

LPI2C_SLAVE_ADDR_MATCH_0_7BIT_OR_1_7BIT 

Address match 0 (7-bit) or Address match 1 (7-bit)

LPI2C_SLAVE_ADDR_MATCH_0_10BIT_OR_1_10BIT 

Address match 0 (10-bit) or Address match 1 (10-bit)

LPI2C_SLAVE_ADDR_MATCH_0_7BIT_OR_1_10BIT 

Address match 0 (7-bit) or Address match 1 (10-bit)

LPI2C_SLAVE_ADDR_MATCH_0_10BIT_OR_1_7BIT 

Address match 0 (10-bit) or Address match 1 (7-bit)

LPI2C_SLAVE_ADDR_MATCH_RANGE_7BIT 

From Address match 0 (7-bit) to Address match 1 (7-bit)

LPI2C_SLAVE_ADDR_MATCH_RANGE_10BIT 

From Address match 0 (10-bit) to Address match 1 (10-bit)

Definition at line 223 of file lpi2c_hal.h.

Slave received address validity Implements : lpi2c_slave_addr_valid_t_Class.

Enumerator
LPI2C_SLAVE_ADDR_VALID 

RADDR is valid

LPI2C_SLAVE_ADDR_NOT_VALID 

RADDR is not valid

Definition at line 265 of file lpi2c_hal.h.

Slave NACK reaction configuration Implements : lpi2c_slave_nack_config_t_Class.

Enumerator
LPI2C_SLAVE_NACK_END_TRANSFER 

Slave will end transfer when NACK detected

LPI2C_SLAVE_NACK_CONTINUE_TRANSFER 

Slave will not end transfer when NACK detected

Definition at line 238 of file lpi2c_hal.h.

Slave ACK transmission options Implements : lpi2c_slave_nack_transmit_t_Class.

Enumerator
LPI2C_SLAVE_TRANSMIT_ACK 

Transmit ACK for received word

LPI2C_SLAVE_TRANSMIT_NACK 

Transmit NACK for received word

Definition at line 274 of file lpi2c_hal.h.

Slave receive data register function configuration Implements : lpi2c_slave_rxdata_config_t_Class.

Enumerator
LPI2C_SLAVE_RXDATA_DATA_ONLY 

Reading the receive data register will return only data

LPI2C_SLAVE_RXDATA_DATA_OR_ADDR 

Reading the receive data register can return data or address

Definition at line 247 of file lpi2c_hal.h.

Slave Transmit Data Flag function control Implements : lpi2c_slave_txflag_config_t_Class.

Enumerator
LPI2C_SLAVE_TXFLAG_TRANSFER_ONLY 

only assert during a slave-transmit transfer

LPI2C_SLAVE_TXFLAG_ALWAYS 

assert whenever the transmit data register is empty

Definition at line 256 of file lpi2c_hal.h.

SCL/SDA low time-out configuration Implements : lpi2c_timeout_config_t_Class.

Enumerator
LPI2C_TIMEOUT_SCL 

Pin Low Timeout Flag will set if SCL is low for longer than the configured timeout

LPI2C_TIMEOUT_SCL_OR_SDA 

Pin Low Timeout Flag will set if either SCL or SDA is low for longer than the configured timeout

Definition at line 175 of file lpi2c_hal.h.

Function Documentation

static void LPI2C_HAL_GetVersion ( const LPI2C_Type baseAddr,
lpi2c_version_info_t versionInfo 
)
inlinestatic

Get the version of the LPI2C module.

This function reads the version number of the LPI2C hardware module

Parameters
baseAddrbase address of the LPI2C module
versionInfoDevice Version Number Implements : LPI2C_HAL_GetVersion_Activity

Definition at line 303 of file lpi2c_hal.h.

void LPI2C_HAL_Init ( LPI2C_Type baseAddr)

Initializes the LPI2C module to a known state.

This function initializes all the registers of the LPI2C module to their reset value.

Parameters
baseAddrbase address of the LPI2C module

Definition at line 59 of file lpi2c_hal.c.

static void LPI2C_HAL_MasterClearArbitrationLostEvent ( LPI2C_Type baseAddr)
inlinestatic

Clear the arbitration lost event flag.

This function clears the arbitration lost event. This event must be cleared before the LPI2C master can initiate a START condition.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_MasterClearArbitrationLostEvent_Activity

Definition at line 789 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterClearDataMatchEvent ( LPI2C_Type baseAddr)
inlinestatic

Clear the data match event flag.

This function clears the data match event.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_MasterClearDataMatchEvent_Activity

Definition at line 743 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterClearEndPacketEvent ( LPI2C_Type baseAddr)
inlinestatic

Clear the end packet event flag.

This function clears the end packet event.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_MasterClearEndPacketEvent_Activity

Definition at line 832 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterClearFIFOErrorEvent ( LPI2C_Type baseAddr)
inlinestatic

Clear the FIFO error event flag.

This function clears the FIFO error event. This event must be cleared before the LPI2C master can initiate a START condition.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_MasterClearFIFOErrorEvent_Activity

Definition at line 774 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterClearNACKDetectEvent ( LPI2C_Type baseAddr)
inlinestatic

Clear the unexpected NACK event flag.

This function clears the unexpected NACK event. This event must be cleared before the LPI2C master can initiate a START condition.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_MasterClearNACKDetectEvent_Activity

Definition at line 804 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterClearPinLowTimeoutEvent ( LPI2C_Type baseAddr)
inlinestatic

Clear the pin low timeout event flag.

This function clears the pin low timeout event. This event cannot be cleared for as long as the pin low timeout condition continues, and must be cleared before the LPI2C master can initiate a START condition.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_MasterClearPinLowTimeoutEvent_Activity

Definition at line 759 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterClearSTOPDetectEvent ( LPI2C_Type baseAddr)
inlinestatic

Clear the STOP detect event flag.

This function clears the STOP detect event.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_MasterClearSTOPDetectEvent_Activity

Definition at line 818 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetArbitrationLostEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the occurrence of an arbitration lost event.

This function returns true if the LPI2C master detects an arbitration lost condition, as defined by the I2C standard. When this flag sets, the LPI2C master will release the bus (go idle) and will not initiate a new START condition until this flag has been cleared.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of an arbitration lost event Implements : LPI2C_HAL_MasterGetArbitrationLostEvent_Activity

Definition at line 670 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetAutoStopConfig ( const LPI2C_Type baseAddr)
inlinestatic

Return the current setting for automatic generation of STOP condition.

This function returns the currently configured setting for automatic generation of STOP condition.

Parameters
baseAddrbase address of the LPI2C module
Returns
current setting for automatic generation of STOP condition Implements : LPI2C_HAL_MasterGetAutoStopConfig_Activity

Definition at line 1345 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetBusBusyEvent ( const LPI2C_Type baseAddr)
inlinestatic

Return the idle/busy state of the I2C bus.

This function returns true if the I2C bus is busy and false if the bus is idle.

Parameters
baseAddrbase address of the LPI2C module
Returns
the idle/busy state of the I2C bus Implements : LPI2C_HAL_MasterGetBusBusyEvent_Activity

Definition at line 535 of file lpi2c_hal.h.

static uint16_t LPI2C_HAL_MasterGetBusIdleTimeout ( const LPI2C_Type baseAddr)
inlinestatic

Return the bus idle timeout configuration.

This function returns the currently configured bus idle timeout.

Parameters
baseAddrbase address of the LPI2C module
Returns
number of cycles for the bus idle timeout Implements : LPI2C_HAL_MasterGetBusIdleTimeout_Activity

Definition at line 1497 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetCircularFIFO ( const LPI2C_Type baseAddr)
inlinestatic

Return the circular FIFO mode for the transmit FIFO.

This function returns the current setting for the circular FIFO feature of the module.

Parameters
baseAddrbase address of the LPI2C module
Returns
circular FIFO mode for the transmit FIFO Implements : LPI2C_HAL_MasterGetCircularFIFO_Activity

Definition at line 1054 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetClockHighPeriod ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured minimum clock high period.

This function returns the currently configured value for clock high period.

Parameters
baseAddrbase address of the LPI2C module
Returns
minimum clock high period Implements : LPI2C_HAL_MasterGetClockHighPeriod_Activity

Definition at line 1718 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetClockHighPeriodHS ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured minimum clock high period in high-speed mode.

This function returns the currently configured value for clock high period in high-speed mode.

Parameters
baseAddrbase address of the LPI2C module
Returns
minimum clock high period Implements : LPI2C_HAL_MasterGetClockHighPeriodHS_Activity

Definition at line 1876 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetClockLowPeriod ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured minimum clock low period.

This function returns the currently configured value for clock low period.

Parameters
baseAddrbase address of the LPI2C module
Returns
minimum clock low period Implements : LPI2C_HAL_MasterGetClockLowPeriod_Activity

Definition at line 1755 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetClockLowPeriodHS ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured minimum clock low period in high-speed mode.

This function returns the currently configured value for clock low period in high-speed mode.

Parameters
baseAddrbase address of the LPI2C module
Returns
minimum clock low period Implements : LPI2C_HAL_MasterGetClockLowPeriodHS_Activity

Definition at line 1915 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetDataMatchEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the occurrence of a data match event.

This function returns true if there was a match on the received data according to the current data match option. Received data that is discarded due to commands does not cause this flag to set. See function LPI2C_HAL_MasterSetMatchConfig() for more information on data match configuration.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of a data match event Implements : LPI2C_HAL_MasterGetDataMatchEvent_Activity

Definition at line 611 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetDataValidDelay ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured data hold time for SDA.

This function returns the currently configured value for SDA data hold time.

Parameters
baseAddrbase address of the LPI2C module
Returns
value of the data hold time for SDA Implements : LPI2C_HAL_MasterGetDataValidDelay_Activity

Definition at line 1639 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetDataValidDelayHS ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured data hold time for SDA in high-speed mode.

This function returns the currently configured value for SDA data hold time in high-speed mode.

Parameters
baseAddrbase address of the LPI2C module
Returns
value of the data hold time for SDA Implements : LPI2C_HAL_MasterGetDataValidDelayHS_Activity

Definition at line 1794 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetDebugMode ( const LPI2C_Type baseAddr)
inlinestatic

Return the debug mode setting for the LPI2C master.

This function returns the current debug mode setting for the LPI2C master.

Parameters
baseAddrbase address of the LPI2C module
Returns
the debug mode setting for the LPI2C master Implements : LPI2C_HAL_MasterGetDebugMode_Activity

Definition at line 467 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetDozeMode ( const LPI2C_Type baseAddr)
inlinestatic

Return the doze mode setting for the LPI2C master.

This function returns the current doze mode setting for the LPI2C master

Parameters
baseAddrbase address of the LPI2C module
Returns
the doze mode setting for the LPI2C master Implements : LPI2C_HAL_MasterGetDozeMode_Activity

Definition at line 484 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetEnable ( const LPI2C_Type baseAddr)
inlinestatic

Return the enable/disable setting for the LPI2C master.

This function checks whether or not the LPI2C master is enabled.

Parameters
baseAddrbase address of the LPI2C module
Returns
the enable/disable setting for the LPI2C master Implements : LPI2C_HAL_MasterGetEnable_Activity

Definition at line 518 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetEndPacketEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the occurrence of an end packet event.

This function returns true if the LPI2C master has generated a repeated START or a STOP condition. It does not return true when the master first generates a START condition.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of an end packet event Implements : LPI2C_HAL_MasterGetEndPacketEvent_Activity

Definition at line 727 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetFIFOErrorEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the occurrence of a FIFO error event.

This function returns true if the LPI2C master detects an attempt to send or receive data without first generating a (repeated) START condition. This can occur if the transmit FIFO underflows when the AUTOSTOP bit is set. When this flag is set, the LPI2C master will send a STOP condition (if busy) and will not initiate a new START condition until this flag has been cleared.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of a FIFO error event Implements : LPI2C_HAL_MasterGetFIFOErrorEvent_Activity

Definition at line 650 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetHreqEnable ( const LPI2C_Type baseAddr)
inlinestatic

Return the enable/disable state the host request feature.

This function returns true if the host request signal is enabled, and false if it is disabled.

Parameters
baseAddrbase address of the LPI2C module
Returns
enable/disable state the host request feature Implements : LPI2C_HAL_MasterGetHreqEnable_Activity

Definition at line 1161 of file lpi2c_hal.h.

static lpi2c_hreq_polarity_t LPI2C_HAL_MasterGetHreqPolarity ( const LPI2C_Type baseAddr)
inlinestatic

Return the polarity of the host request input pin.

This function returns the currently configured polarity for the host request input.

Parameters
baseAddrbase address of the LPI2C module
Returns
polarity of the host request input Implements : LPI2C_HAL_MasterGetHreqPolarity_Activity

Definition at line 1144 of file lpi2c_hal.h.

static lpi2c_hreq_source_t LPI2C_HAL_MasterGetHreqSelect ( const LPI2C_Type baseAddr)
inlinestatic

Return the source of the host request input.

This function returns the currently configured source for the host request input.

Parameters
baseAddrbase address of the LPI2C module
Returns
source of the host request input Implements : LPI2C_HAL_MasterGetHreqSelect_Activity

Definition at line 1127 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetInt ( const LPI2C_Type baseAddr,
uint32_t  interrupts 
)
inlinestatic

Return the state of the specified LPI2C master interrupt.

This function returns the enabled/disabled state of the master interrupt source specified by the interrupt parameter.

Parameters
baseAddrbase address of the LPI2C module
interruptsinterrupt for which the check is made; must be one of the following constants:
  • LPI2C_HAL_MASTER_DATA_MATCH_INT - Data Match Interrupt
  • LPI2C_HAL_MASTER_PIN_LOW_TIMEOUT_INT - Pin Low Timeout Interrupt
  • LPI2C_HAL_MASTER_FIFO_ERROR_INT - FIFO Error Interrupt
  • LPI2C_HAL_MASTER_ARBITRATION_LOST_INT - Arbitration Lost Interrupt
  • LPI2C_HAL_MASTER_NACK_DETECT_INT - NACK Detect Interrupt
  • LPI2C_HAL_MASTER_STOP_DETECT_INT - STOP Detect Interrupt
  • LPI2C_HAL_MASTER_END_PACKET_INT - End Packet Interrupt
  • LPI2C_HAL_MASTER_RECEIVE_DATA_INT - Receive Data Interrupt
  • LPI2C_HAL_MASTER_TRANSMIT_DATA_INT - Transmit Data Interrupt
Returns
enable/disable state of specified interrupt Implements : LPI2C_HAL_MasterGetInt_Activity

Definition at line 968 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetMasterBusyEvent ( const LPI2C_Type baseAddr)
inlinestatic

Return the idle/busy state of the LPI2C master.

This function returns true if the LPI2C master is busy and false if the LPI2C master is idle.

Parameters
baseAddrbase address of the LPI2C module
Returns
the idle/busy state of the LPI2C master Implements : LPI2C_HAL_MasterGetMasterBusyEvent_Activity

Definition at line 553 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetMatch0 ( const LPI2C_Type baseAddr)
inlinestatic

Return the MATCH0 value for the data match feature.

This function returns the currently configured value for MATCH0.

Parameters
baseAddrbase address of the LPI2C module
Returns
MATCH0 value Implements : LPI2C_HAL_MasterGetMatch0_Activity

Definition at line 1566 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetMatch1 ( const LPI2C_Type baseAddr)
inlinestatic

Return the MATCH1 value for the data match feature.

This function returns the currently configured value for MATCH1.

Parameters
baseAddrbase address of the LPI2C module
Returns
MATCH1 value Implements : LPI2C_HAL_MasterGetMatch1_Activity

Definition at line 1603 of file lpi2c_hal.h.

static lpi2c_match_config_t LPI2C_HAL_MasterGetMatchConfig ( const LPI2C_Type baseAddr)
inlinestatic

Return the match mode of the module.

This function returns the currently configured match mode for the module.

Parameters
baseAddrbase address of the LPI2C module
Returns
match mode of the module Implements : LPI2C_HAL_MasterGetMatchConfig_Activity

Definition at line 1234 of file lpi2c_hal.h.

static lpi2c_nack_config_t LPI2C_HAL_MasterGetNACKConfig ( const LPI2C_Type baseAddr)
inlinestatic

Return the reaction of the module on NACK reception.

This function returns the currently configured setting for handling NACK reception.

Parameters
baseAddrbase address of the LPI2C module
Returns
configured reaction of the module on NACK reception Implements : LPI2C_HAL_MasterGetNACKConfig_Activity

Definition at line 1307 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetNACKDetectEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the occurrence of an unexpected NACK event.

This function returns true if the LPI2C master detects a NACK when transmitting an address or data. If a NACK is expected for a given address (as configured by the command word) then the flag will set if a NACK is not generated. When set, the master will transmit a STOP condition and will not initiate a new START condition until this flag has been cleared.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of an unexpected NACK event Implements : LPI2C_HAL_MasterGetNACKDetectEvent_Activity

Definition at line 691 of file lpi2c_hal.h.

static lpi2c_pin_config_t LPI2C_HAL_MasterGetPinConfig ( const LPI2C_Type baseAddr)
inlinestatic

Return the pin mode of the module.

This function returns the currently configured pin mode for the module.

Parameters
baseAddrbase address of the LPI2C module
Returns
pin mode of the module Implements : LPI2C_HAL_MasterGetPinConfig_Activity

Definition at line 1197 of file lpi2c_hal.h.

static uint32_t LPI2C_HAL_MasterGetPinLowTimeout ( const LPI2C_Type baseAddr)
inlinestatic

Return the pin low timeout configuration.

This function returns the currently configured pin low timeout.

Parameters
baseAddrbase address of the LPI2C module
Returns
number of cycles for the pin low timeout Implements : LPI2C_HAL_MasterGetPinLowTimeout_Activity

Definition at line 1531 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetPinLowTimeoutEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the occurrence of a pin low timeout event.

This function returns true if SCL and/or SDA input is low for more than PINLOW cycles This event can occur even when the LPI2C master is idle.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of a pin low timeout event Implements : LPI2C_HAL_MasterGetPinLowTimeoutEvent_Activity

Definition at line 629 of file lpi2c_hal.h.

static lpi2c_master_prescaler_t LPI2C_HAL_MasterGetPrescaler ( const LPI2C_Type baseAddr)
inlinestatic

Return the LPI2C master prescaler.

This function returns the currently configured clock prescaler.

Parameters
baseAddrbase address of the LPI2C module
Returns
LPI2C master prescaler Implements : LPI2C_HAL_MasterGetPrescaler_Activity

Definition at line 1381 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetReceiveDataReadyEvent ( const LPI2C_Type baseAddr)
inlinestatic

Indicate the availability of receive data.

This function returns true when the number of words in the receive FIFO is greater than the receive FIFO watermark. See function LPI2C_HAL_MasterSetRxFIFOWatermark() for configuring the receive FIFO watermark.

Parameters
baseAddrbase address of the LPI2C module
Returns
receive data ready/not ready Implements : LPI2C_HAL_MasterGetReceiveDataReadyEvent_Activity

Definition at line 572 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetRxData ( const LPI2C_Type baseAddr)
inlinestatic

Return the received data.

This function returns data received by the I2C master that has not been discarded due to data match settings or active command, and increments the FIFO read pointer.

Parameters
baseAddrbase address of the LPI2C module
Returns
data received by the LPI2C master Implements : LPI2C_HAL_MasterGetRxData_Activity

Definition at line 2058 of file lpi2c_hal.h.

static lpi2c_rx_data_match_t LPI2C_HAL_MasterGetRxDataMatch ( const LPI2C_Type baseAddr)
inlinestatic

Return the current data match discarding policy.

This function returns the currently configured policy for data that does not match the configured criteria

Parameters
baseAddrbase address of the LPI2C module
Returns
the current policy for non-matching data Implements : LPI2C_HAL_MasterGetRxDataMatch_Activity

Definition at line 1013 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetRxDMA ( const LPI2C_Type baseAddr)
inlinestatic

Check if receive data DMA requests are enabled.

This function returns true if Rx DMA requests are enabled.

Parameters
baseAddrbase address of the LPI2C module
Returns
enabled/disabled status of receive data DMA requests Implements : LPI2C_HAL_MasterGetRxDMA_Activity

Definition at line 885 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetRxEmpty ( const LPI2C_Type baseAddr)
inlinestatic

Check if the master receive FIFO is empty.

This function checks if the master receive FIFO is empty.

Parameters
baseAddrbase address of the LPI2C module
Returns
status of the master receive FIFO Implements : LPI2C_HAL_MasterGetRxEmpty_Activity

Definition at line 2075 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetRxFIFOCount ( const LPI2C_Type baseAddr)
inlinestatic

Return the number of words in the receive FIFO.

This function returns the number of words currently available in the receive FIFO.

Parameters
baseAddrbase address of the LPI2C module
Returns
the number of words in the receive FIFO Implements : LPI2C_HAL_MasterGetRxFIFOCount_Activity

Definition at line 2006 of file lpi2c_hal.h.

static uint16_t LPI2C_HAL_MasterGetRxFIFOSize ( const LPI2C_Type baseAddr)
inlinestatic

Get the size of the Master Receive FIFO.

This function returns the size of the Master Receive FIFO, always a power of 2.

Parameters
baseAddrbase address of the LPI2C module
Returns
Master Receive FIFO Size Implements : LPI2C_HAL_MasterGetRxFIFOSize_Activity

Definition at line 321 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetRxFIFOWatermark ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured receive FIFO watermark.

This function returns the currently configured value for receive FIFO watermark

Parameters
baseAddrbase address of the LPI2C module
Returns
number of words in the receive FIFO that will cause the receive data flag to be set Implements : LPI2C_HAL_MasterGetRxFIFOWatermark_Activity

Definition at line 1952 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetSCLGlitchFilter ( const LPI2C_Type baseAddr)
inlinestatic

Return the LPI2C SCL glitch filter configuration.

This function returns the currently configured SCL glitch filter.

Parameters
baseAddrbase address of the LPI2C module
Returns
number of cycles for the LPI2C SCL glitch filter Implements : LPI2C_HAL_MasterGetSCLGlitchFilter_Activity

Definition at line 1459 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetSDAGlitchFilter ( const LPI2C_Type baseAddr)
inlinestatic

Return the LPI2C SDA glitch filter configuration.

This function returns the currently configured master SDA glitch filter.

Parameters
baseAddrbase address of the LPI2C module
Returns
number of cycles for the LPI2C SDA glitch filter Implements : LPI2C_HAL_MasterGetSDAGlitchFilter_Activity

Definition at line 1420 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetSetupHoldDelay ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured setup and hold time.

This function returns the currently configured value for setup and hold delay for a START / STOP condition.

Parameters
baseAddrbase address of the LPI2C module
Returns
setup and hold time for a START / STOP condition Implements : LPI2C_HAL_MasterGetSetupHoldDelay_Activity

Definition at line 1679 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetSetupHoldDelayHS ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured setup and hold time in high-speed mode.

This function returns the currently configured value for setup and hold delay for a START / STOP condition in high-speed mode.

Parameters
baseAddrbase address of the LPI2C module
Returns
setup and hold time for a START / STOP condition Implements : LPI2C_HAL_MasterGetSetupHoldDelayHS_Activity

Definition at line 1835 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetSoftwareReset ( const LPI2C_Type baseAddr)
inlinestatic

Return the reset setting for the LPI2C master.

This function returns the state of the LPI2C master software reset bit.

Parameters
baseAddrbase address of the LPI2C module
Returns
the reset setting for the LPI2C master Implements : LPI2C_HAL_MasterGetSoftwareReset_Activity

Definition at line 501 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetSTOPDetectEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the occurrence of a STOP detect event.

This function returns true if the LPI2C master has generated a STOP condition.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of a STOP detect event Implements : LPI2C_HAL_MasterGetSTOPDetectEvent_Activity

Definition at line 708 of file lpi2c_hal.h.

static lpi2c_timeout_config_t LPI2C_HAL_MasterGetTimeoutConfig ( const LPI2C_Type baseAddr)
inlinestatic

Return the timeout configuration of the module.

This function returns the current pin low timeout configuration for the module.

Parameters
baseAddrbase address of the LPI2C module
Returns
timeout configuration of the module Implements : LPI2C_HAL_MasterGetTimeoutConfig_Activity

Definition at line 1270 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetTransmitDataRequestEvent ( const LPI2C_Type baseAddr)
inlinestatic

Indicate if the LPI2C master requests more data.

This function returns true when the number of words in the transmit FIFO is equal or less than the transmit FIFO watermark. See function LPI2C_HAL_MasterSetTxFIFOWatermark() for configuring the transmit FIFO watermark.

Parameters
baseAddrbase address of the LPI2C module
Returns
transmit data requested/not requested Implements : LPI2C_HAL_MasterGetTransmitDataRequestEvent_Activity

Definition at line 591 of file lpi2c_hal.h.

static bool LPI2C_HAL_MasterGetTxDMA ( const LPI2C_Type baseAddr)
inlinestatic

Check if transmit data DMA requests are enabled.

This function returns true if Tx DMA requests are enabled.

Parameters
baseAddrbase address of the LPI2C module
Returns
enabled/disabled status of transmit data DMA requests Implements : LPI2C_HAL_MasterGetTxDMA_Activity

Definition at line 902 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetTxFIFOCount ( const LPI2C_Type baseAddr)
inlinestatic

Return the number of words in the transmit FIFO.

This function returns the number of words currently available in the transmit FIFO.

Parameters
baseAddrbase address of the LPI2C module
Returns
the number of words in the transmit FIFO Implements : LPI2C_HAL_MasterGetTxFIFOCount_Activity

Definition at line 2023 of file lpi2c_hal.h.

static uint16_t LPI2C_HAL_MasterGetTxFIFOSize ( const LPI2C_Type baseAddr)
inlinestatic

Get the size of the Master Transmit FIFO.

This function returns the size of the Master Transmit FIFO, always a power of 2.

Parameters
baseAddrbase address of the LPI2C module
Returns
Master Transmit FIFO Size Implements : LPI2C_HAL_MasterGetTxFIFOSize_Activity

Definition at line 339 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_MasterGetTxFIFOWatermark ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured transmit FIFO watermark.

This function returns the currently configured value for transmit FIFO watermark

Parameters
baseAddrbase address of the LPI2C module
Returns
number of words in the transmit FIFO that will cause the transmit data flag to be set Implements : LPI2C_HAL_MasterGetTxFIFOWatermark_Activity

Definition at line 1989 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterRxFIFOResetCmd ( LPI2C_Type baseAddr)
inlinestatic

Reset the master receive FIFO.

This function empties the receive FIFO of the LPI2C master.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_MasterRxFIFOResetCmd_Activity

Definition at line 356 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetAutoStopConfig ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Configure the automatic generation of STOP condition.

This function can enable or disable the automatic generation of STOP condition. When enabled, a STOP condition is generated whenever the LPI2C master is busy and the transmit FIFO is empty. The STOP condition can also be generated using a transmit FIFO command.

Parameters
baseAddrbase address of the LPI2C module
enableenable/disable automatic generation of STOP condition Implements : LPI2C_HAL_MasterSetAutoStopConfig_Activity

Definition at line 1326 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetBusIdleTimeout ( LPI2C_Type baseAddr,
uint16_t  cycles 
)
inlinestatic

Configure the bus idle timeout.

This function configures the bus idle timeout period in clock cycles. If both SCL and SDA are high for longer than the configured timeout in cycles, then the I2C bus is assumed to be idle and the master can generate a START condition. When set to zero, this feature is disabled.

Parameters
baseAddrbase address of the LPI2C module
cyclesnumber of cycles for the bus idle timeout Implements : LPI2C_HAL_MasterSetBusIdleTimeout_Activity

Definition at line 1479 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetCircularFIFO ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Set the circular FIFO mode for the transmit FIFO.

This function enables or disables the circular FIFO feature of the module. When enabled, the transmit FIFO read pointer is saved to a temporary register. The transmit FIFO will be emptied as normal, but once the LPI2C master is idle and the transmit FIFO is empty, then the read pointer value will be restored from the temporary register. This will cause the contents of the transmit FIFO to be cycled through repeatedly. If AUTOSTOP is set, a STOP condition will be sent whenever the transmit FIFO is empty and the read pointer is restored.

Parameters
baseAddrbase address of the LPI2C module
enableenable/disable circular FIFO mode for the transmit FIFO Implements : LPI2C_HAL_MasterSetCircularFIFO_Activity

Definition at line 1036 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetClockHighPeriod ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the minimum clock high period.

This function configures the minimum number of cycles (minus one) that the SCL clock is driven high by the master. The SCL high time is extended by the time it takes to detect a rising edge on the external SCL pin. Ignoring any additional board delay due to external loading, this is equal to (2 + FILTSCL) / 2^PRESCALE cycles.

Parameters
baseAddrbase address of the LPI2C module
valueminimum clock high period Implements : LPI2C_HAL_MasterSetClockHighPeriod_Activity

Definition at line 1700 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetClockHighPeriodHS ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the minimum clock high period in high-speed mode.

This function configures the minimum number of cycles (minus one) that the SCL clock is driven high by the master. The SCL high time is extended by the time it takes to detect a rising edge on the external SCL pin. Ignoring any additional board delay due to external loading, this is equal to (2 + FILTSCL) / 2^PRESCALE cycles. This setting only has effect during High-Speed mode transfers.

Parameters
baseAddrbase address of the LPI2C module
valueminimum clock high period Implements : LPI2C_HAL_MasterSetClockHighPeriodHS_Activity

Definition at line 1857 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetClockLowPeriod ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the minimum clock low period.

This function configures the minimum number of cycles (minus one) that the SCL clock is driven low by the master. This value is also used for the minimum bus free time between a STOP and a START condition.

Parameters
baseAddrbase address of the LPI2C module
valueminimum clock low period Implements : LPI2C_HAL_MasterSetClockLowPeriod_Activity

Definition at line 1737 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetClockLowPeriodHS ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the minimum clock low period in high-speed mode.

This function configures the minimum number of cycles (minus one) that the SCL clock is driven low by the master. This value is also used for the minimum bus free time between a STOP and a START condition. This setting only has effect during High-Speed mode transfers.

Parameters
baseAddrbase address of the LPI2C module
valueminimum clock low period Implements : LPI2C_HAL_MasterSetClockLowPeriodHS_Activity

Definition at line 1896 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetDataValidDelay ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the data hold time for SDA.

This function sets the minimum number of cycles (minus one) that is used as the data hold time for SDA. Must be configured less than the minimum SCL low period.

Parameters
baseAddrbase address of the LPI2C module
valuevalue of the data hold time for SDA Implements : LPI2C_HAL_MasterSetDataValidDelay_Activity

Definition at line 1621 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetDataValidDelayHS ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the data hold time for SDA in high-speed mode.

This function sets the minimum number of cycles (minus one) that is used as the data hold time for SDA in High-Speed mode. Must be configured less than the minimum SCL low period. This setting only has effect during High-Speed mode transfers.

Parameters
baseAddrbase address of the LPI2C module
valuevalue of the data hold time for SDA Implements : LPI2C_HAL_MasterSetDataValidDelayHS_Activity

Definition at line 1775 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetDebugMode ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Set the master behaviour in Debug mode.

This function enables or disables master functionality when the CPU is in debug mode.

Parameters
baseAddrbase address of the LPI2C module
enablespecifies whether to enable or disable the LPI2C master in debug mode Implements : LPI2C_HAL_MasterSetDebugMode_Activity

Definition at line 391 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetDozeMode ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Set the master behaviour in Doze mode.

This function enables or disables master functionality in doze mode.

Parameters
baseAddrbase address of the LPI2C module
enablespecifies whether to enable or disable the LPI2C master in doze mode Implements : LPI2C_HAL_MasterSetDozeMode_Activity

Definition at line 409 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetEnable ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable or disable the LPI2C master.

This function enables or disables the LPI2C module in master mode. If the module is enabled, the transmit FIFO is not empty and the I2C bus is idle, then the LPI2C master will immediately initiate a transfer on the I2C bus.

Parameters
baseAddrbase address of the LPI2C module
enablespecifies whether to enable or disable the LPI2C master Implements : LPI2C_HAL_MasterSetEnable_Activity

Definition at line 449 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetHreqEnable ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable/disable the host request feature.

This function enables or disables the host request signal. When enabled, the LPI2C master will only initiate a START condition if the host request input is asserted and the bus is idle. A repeated START is not affected by the host request.

Parameters
baseAddrbase address of the LPI2C module
enableenable/disable the host request feature Implements : LPI2C_HAL_MasterSetHreqEnable_Activity

Definition at line 1109 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetHreqPolarity ( LPI2C_Type baseAddr,
lpi2c_hreq_polarity_t  polarity 
)
inlinestatic

Set the polarity of the host request input pin.

This function configures the polarity of the host request input pin.

Parameters
baseAddrbase address of the LPI2C module
polarityselected polarity of the host request input Implements : LPI2C_HAL_MasterSetHreqPolarity_Activity

Definition at line 1089 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetHreqSelect ( LPI2C_Type baseAddr,
lpi2c_hreq_source_t  source 
)
inlinestatic

Set the source of the host request input.

This function selects the source of the host request input.

Parameters
baseAddrbase address of the LPI2C module
sourceselected source of the host request input Implements : LPI2C_HAL_MasterSetHreqSelect_Activity

Definition at line 1071 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetInt ( LPI2C_Type baseAddr,
uint32_t  interrupts,
bool  enable 
)
inlinestatic

Enable or disable specified LPI2C master interrupts.

This function can enable or disable one or more master interrupt sources specified by the interrupts parameter.

Parameters
baseAddrbase address of the LPI2C module
interruptsinterrupts to be enabled or disabled; must be a bitwise or between one or more of the following constants:
  • LPI2C_HAL_MASTER_DATA_MATCH_INT - Data Match Interrupt
  • LPI2C_HAL_MASTER_PIN_LOW_TIMEOUT_INT - Pin Low Timeout Interrupt
  • LPI2C_HAL_MASTER_FIFO_ERROR_INT - FIFO Error Interrupt
  • LPI2C_HAL_MASTER_ARBITRATION_LOST_INT - Arbitration Lost Interrupt
  • LPI2C_HAL_MASTER_NACK_DETECT_INT - NACK Detect Interrupt
  • LPI2C_HAL_MASTER_STOP_DETECT_INT - STOP Detect Interrupt
  • LPI2C_HAL_MASTER_END_PACKET_INT - End Packet Interrupt
  • LPI2C_HAL_MASTER_RECEIVE_DATA_INT - Receive Data Interrupt
  • LPI2C_HAL_MASTER_TRANSMIT_DATA_INT - Transmit Data Interrupt
enablespecifies whether to enable or disable specified interrupts Implements : LPI2C_HAL_MasterSetInt_Activity

Definition at line 931 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetMatch0 ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the MATCH0 value for the data match feature.

This function sets the MATCH0 value for comparing against the received data when receive data match is enabled. See function LPI2C_HAL_MasterSetMatchConfig() for details on how this value is used.

Parameters
baseAddrbase address of the LPI2C module
valueMATCH0 value Implements : LPI2C_HAL_MasterSetMatch0_Activity

Definition at line 1548 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetMatch1 ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the MATCH1 value for the data match feature.

This function sets the MATCH1 value for comparing against the received data when receive data match is enabled. See function LPI2C_HAL_MasterSetMatchConfig() for details on how this value is used.

Parameters
baseAddrbase address of the LPI2C module
valueMATCH1 value Implements : LPI2C_HAL_MasterSetMatch1_Activity

Definition at line 1585 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetMatchConfig ( LPI2C_Type baseAddr,
lpi2c_match_config_t  configuration 
)
inlinestatic

Set the match mode of the module.

This function configures the rules for matching incoming data against the two match values, MATCH0 and MATCH1. A successful match will trigger a data match event. See type lpi2c_match_config_t for a description of all available match options.

Parameters
baseAddrbase address of the LPI2C module
configurationmatch mode of the module Implements : LPI2C_HAL_MasterSetMatchConfig_Activity

Definition at line 1216 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetNACKConfig ( LPI2C_Type baseAddr,
lpi2c_nack_config_t  configuration 
)
inlinestatic

Configure the reaction of the module on NACK reception.

This function configures how the LPI2C master reacts when receiving a NACK. NACK responses can be treated normally or ignored. In Ultra-Fast mode it is necessary to configure the module to ignore NACK responses.

Parameters
baseAddrbase address of the LPI2C module
configurationset reaction of the module on NACK reception Implements : LPI2C_HAL_MasterSetNACKConfig_Activity

Definition at line 1289 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetPinConfig ( LPI2C_Type baseAddr,
lpi2c_pin_config_t  configuration 
)
inlinestatic

Set the pin mode of the module.

This function sets the pin mode of the module. See type lpi2c_pin_config_t for a description of available modes.

Parameters
baseAddrbase address of the LPI2C module
configurationpin mode of the module Implements : LPI2C_HAL_MasterSetPinConfig_Activity

Definition at line 1179 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetPinLowTimeout ( LPI2C_Type baseAddr,
uint32_t  cycles 
)
inlinestatic

Configure the pin low timeout.

This function configures the pin low timeout period in clock cycles. If SCL and/or SDA is low for longer than the pin low timeout cycles then PLTF is set. Timeout value will be truncated to a multiple of 256. When set to zero, this feature is disabled.

Parameters
baseAddrbase address of the LPI2C module
cyclesnumber of cycles for the pin low timeout; will be truncated to a multiple of 256 Implements : LPI2C_HAL_MasterSetPinLowTimeout_Activity

Definition at line 1516 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetPrescaler ( LPI2C_Type baseAddr,
lpi2c_master_prescaler_t  prescaler 
)
inlinestatic

Configure the LPI2C master prescaler.

This function configures the clock prescaler used for all LPI2C master logic, except the digital glitch filters.

Parameters
baseAddrbase address of the LPI2C module
prescalerLPI2C master prescaler Implements : LPI2C_HAL_MasterSetPrescaler_Activity

Definition at line 1363 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetRxDataMatch ( LPI2C_Type baseAddr,
lpi2c_rx_data_match_t  rxDataMatch 
)
inlinestatic

Control the discarding of data that does not match the configured criteria.

This function configures the policy for handling data that does not match the configuration criteria. Received data can be stored in the receive FIFO either unconditionally or based on the data match event. See function LPI2C_HAL_MasterGetDataMatchEvent() for more information on the data match event.

Parameters
baseAddrbase address of the LPI2C module
rxDataMatchspecifies whether or not to drop non-matching data Implements : LPI2C_HAL_MasterSetRxDataMatch_Activity

Definition at line 994 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetRxDMA ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable/disable receive data DMA requests.

This function enables or disables generation of Rx DMA requests when data can be read from the receive FIFO, as configured by the receive FIFO watermark.

Parameters
baseAddrbase address of the LPI2C module
enablespecifies whether to enable or disable DMA requests Implements : LPI2C_HAL_MasterSetRxDMA_Activity

Definition at line 848 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetRxFIFOWatermark ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the receive FIFO watermark.

This function configures the receive FIFO watermark. Whenever the number of words in the receive FIFO is greater than the receive FIFO watermark, a receive data ready event is generated. Writing a value equal or greater than the FIFO size will be truncated.

Parameters
baseAddrbase address of the LPI2C module
valuenumber of words in the receive FIFO that will cause the receive data flag to be set Implements : LPI2C_HAL_MasterSetRxFIFOWatermark_Activity

Definition at line 1934 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetSCLGlitchFilter ( LPI2C_Type baseAddr,
uint8_t  cycles 
)
inlinestatic

Configure the LPI2C SCL glitch filter.

This function configures the I2C master digital glitch filters for SCL input, a configuration of 0 will disable the glitch filter. Glitches equal to or less than FILTSCL cycles long will be filtered out and ignored. The latency through the glitch filter is equal to FILTSCL cycles and must be configured less than the minimum SCL low or high period.

Parameters
baseAddrbase address of the LPI2C module
cyclesnumber of cycles for the LPI2C SCL glitch filter Implements : LPI2C_HAL_MasterSetSCLGlitchFilter_Activity

Definition at line 1441 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetSDAGlitchFilter ( LPI2C_Type baseAddr,
uint8_t  cycles 
)
inlinestatic

Configure the LPI2C SDA glitch filter.

This function configures the I2C master digital glitch filters for SDA input. A configuration of 0 will disable the glitch filter. Glitches equal to or less than FILTSDA cycles long will be filtered out and ignored. The latency through the glitch filter is equal to FILTSDA cycles and must be configured less than the minimum SCL low or high period.

Parameters
baseAddrbase address of the LPI2C module
cyclesnumber of cycles for the LPI2C SDA glitch filter Implements : LPI2C_HAL_MasterSetSDAGlitchFilter_Activity

Definition at line 1402 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetSetupHoldDelay ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the setup and hold delay for a START / STOP condition.

This function configures the Minimum number of cycles (minus one) that is used by the master as the setup and hold time for a (repeated) START condition and setup time for a STOP condition. The setup time is extended by the time it takes to detect a rising edge on the external SCL pin. Ignoring any additional board delay due to external loading, this is equal to (2 + FILTSCL) / 2^PRESCALE cycles.

Parameters
baseAddrbase address of the LPI2C module
valuesetup and hold time for a START / STOP condition Implements : LPI2C_HAL_MasterSetSetupHoldDelay_Activity

Definition at line 1660 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetSetupHoldDelayHS ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the setup and hold time for a START / STOP condition in high-speed mode.

This function configures the Minimum number of cycles (minus one) that is used by the master as the setup and hold time for a (repeated) START condition and setup time for a STOP condition. The setup time is extended by the time it takes to detect a rising edge on the external SCL pin. Ignoring any additional board delay due to external loading, this is equal to (2 + FILTSCL) / 2^PRESCALE cycles. This setting only has effect during High-Speed mode transfers.

Parameters
baseAddrbase address of the LPI2C module
valuesetup and hold time for a START / STOP condition Implements : LPI2C_HAL_MasterSetSetupHoldDelayHS_Activity

Definition at line 1816 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetSoftwareReset ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Set/clear the master reset command.

Calling this function with enable parameter set to true resets all internal master logic and registers, except the Master Control Register. The reset state persists until this function is called with enable parameter set to false.

Parameters
baseAddrbase address of the LPI2C module
enablespecifies the reset state of the LPI2C master logic Implements : LPI2C_HAL_MasterSetSoftwareReset_Activity

Definition at line 429 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetTimeoutConfig ( LPI2C_Type baseAddr,
lpi2c_timeout_config_t  configuration 
)
inlinestatic

Set the timeout configuration of the module.

This function configures the condition for triggering a pin low timeout event. Selects between monitoring only SCL for timeout, or both SCL and SDA.

Parameters
baseAddrbase address of the LPI2C module
configurationtimeout configuration of the module Implements : LPI2C_HAL_MasterSetTimeoutConfig_Activity

Definition at line 1252 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetTxDMA ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable/disable transmit data DMA requests.

This function enables or disables generation of Tx DMA requests when data can be written to the transmit FIFO, as configured by the transmit FIFO watermark.

Parameters
baseAddrbase address of the LPI2C module
enablespecifies whether to enable or disable DMA requests Implements : LPI2C_HAL_MasterSetTxDMA_Activity

Definition at line 867 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterSetTxFIFOWatermark ( LPI2C_Type baseAddr,
uint8_t  value 
)
inlinestatic

Set the transmit FIFO watermark.

This function configures the transmit FIFO watermark. Whenever the number of words in the transmit FIFO is greater than the transmit FIFO watermark, a transmit data request event is generated. Writing a value equal or greater than the FIFO size will be truncated.

Parameters
baseAddrbase address of the LPI2C module
valuenumber of words in the transmit FIFO that will cause the transmit data flag to be set Implements : LPI2C_HAL_MasterSetTxFIFOWatermark_Activity

Definition at line 1971 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterTransmitCmd ( LPI2C_Type baseAddr,
lpi2c_master_command_t  cmd,
uint8_t  data 
)
inlinestatic

Provide commands and data for the LPI2C master.

This function stores commands and data in the transmit FIFO and increments the FIFO write pointer.

Parameters
baseAddrbase address of the LPI2C module
cmdcommand for the LPI2C master
datadata for the LPI2C master Implements : LPI2C_HAL_MasterTransmitCmd_Activity

Definition at line 2042 of file lpi2c_hal.h.

static void LPI2C_HAL_MasterTxFIFOResetCmd ( LPI2C_Type baseAddr)
inlinestatic

Reset the master transmit FIFO.

This function empties the transmit FIFO of the LPI2C master.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_MasterTxFIFOResetCmd_Activity

Definition at line 373 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveClearBitErrorEvent ( LPI2C_Type baseAddr)
inlinestatic

Clear bit error flag.

This function clears the bit error event.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_SlaveClearBitErrorEvent_Activity

Definition at line 2513 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveClearFIFOErrorEvent ( LPI2C_Type baseAddr)
inlinestatic

Clear the FIFO overflow or underflow flag.

This function clears the FIFO overflow or underflow event.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_SlaveClearFIFOErrorEvent_Activity

Definition at line 2499 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveClearRepeatedStartEvent ( LPI2C_Type baseAddr)
inlinestatic

Clear the repeated START detect flag.

This function clears the repeated START detect event.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_SlaveClearRepeatedStartEvent_Activity

Definition at line 2541 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveClearSTOPDetectEvent ( LPI2C_Type baseAddr)
inlinestatic

Clear the STOP detect flag.

This function clears the STOP detect event.

Parameters
baseAddrbase address of the LPI2C module Implements : LPI2C_HAL_SlaveClearSTOPDetectEvent_Activity

Definition at line 2527 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetACKStall ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured state for clock stretching for the sending of the ACK bit.

This function returns the currently configured setting for clock stretching before the ACK bit.

Parameters
baseAddrbase address of the LPI2C module
Returns
indicates if clock stretching is enabled or disabled Implements : LPI2C_HAL_SlaveGetACKStall_Activity

Definition at line 3028 of file lpi2c_hal.h.

static uint16_t LPI2C_HAL_SlaveGetAddr0 ( const LPI2C_Type baseAddr)
inlinestatic

Return the ADDR0 address for slave address match.

This function returns the currently configured value for ADDR0.

Parameters
baseAddrbase address of the LPI2C module
Returns
ADDR0 address for slave address match Implements : LPI2C_HAL_SlaveGetAddr0_Activity

Definition at line 3379 of file lpi2c_hal.h.

static uint16_t LPI2C_HAL_SlaveGetAddr1 ( const LPI2C_Type baseAddr)
inlinestatic

Return the ADDR1 address for slave address match.

This function returns the currently configured value for ADDR1.

Parameters
baseAddrbase address of the LPI2C module
Returns
ADDR1 address for slave address match Implements : LPI2C_HAL_SlaveGetAddr1_Activity

Definition at line 3339 of file lpi2c_hal.h.

static lpi2c_slave_addr_config_t LPI2C_HAL_SlaveGetAddrConfig ( const LPI2C_Type baseAddr)
inlinestatic

Return the address match configuration.

This function returns the currently configured option for address match.

Parameters
baseAddrbase address of the LPI2C module
Returns
address match configuration Implements : LPI2C_HAL_SlaveGetAddrConfig_Activity

Definition at line 2763 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetAddrDMA ( const LPI2C_Type baseAddr)
inlinestatic

Check if slave address valid DMA requests are enabled.

This function returns true if address valid DMA requests are enabled.

Parameters
baseAddrbase address of the LPI2C module
Returns
enabled/disabled status of address valid DMA requests Implements : LPI2C_HAL_SlaveGetAddrDMA_Activity

Definition at line 2693 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetAddressMatch0Event ( const LPI2C_Type baseAddr)
inlinestatic

Check the detection of an ADDR0 address match.

This function checks for a match of the ADDR0 address, as configured by function LPI2C_HAL_SlaveSetAddrConfig() This event is cleared by reading the received address - see function LPI2C_HAL_SlaveGetReceivedAddr().

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of an ADDR0 address match Implements : LPI2C_HAL_SlaveGetAddressMatch0Event_Activity

Definition at line 2327 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetAddressMatch1Event ( const LPI2C_Type baseAddr)
inlinestatic

Check the detection of an ADDR1 address match.

This function checks for a match of the ADDR1 address, or ADDR0 to ADDR1 range as configured by function LPI2C_HAL_SlaveSetAddrConfig() This event is cleared by reading the received address - see function LPI2C_HAL_SlaveGetReceivedAddr().

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of an ADDR1 address match Implements : LPI2C_HAL_SlaveGetAddressMatch1Event_Activity

Definition at line 2308 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetAddressValidEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the validity of the Address Status Register.

This function checks for the detection of a valid address. The event is cleared by reading the address - see function LPI2C_HAL_SlaveGetReceivedAddr(). It can also be cleared by reading the data register, when data register has been configured to allow address reads - see functions LPI2C_HAL_SlaveSetRxDataConfig() and LPI2C_HAL_SlaveGetData()

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of the validity of the Address Status Register Implements : LPI2C_HAL_SlaveGetAddressValidEvent_Activity

Definition at line 2441 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetAddrStall ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured state for clock stretching for valid address reception.

This function returns the currently configured setting for address valid clock stretching.

Parameters
baseAddrbase address of the LPI2C module
Returns
indicates if clock stretching is enabled or disabled Implements : LPI2C_HAL_SlaveGetAddrStall_Activity

Definition at line 3142 of file lpi2c_hal.h.

static lpi2c_slave_addr_valid_t LPI2C_HAL_SlaveGetAddrValid ( const LPI2C_Type baseAddr)
inlinestatic

Check the validity of received address.

This function checks whether the received address register contains a valid address.

Parameters
baseAddrbase address of the LPI2C module
Returns
validity of received address Implements : LPI2C_HAL_SlaveGetAddrValid_Activity

Definition at line 3397 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetBitErrorEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the detection of a bit error.

This function checks for the occurrence of a bit error event. This event occurs if the LPI2C slave transmits a logic one and detects a logic zero on the I2C bus. The slave will ignore the rest of the transfer until the next (repeated) START condition.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of a bit error Implements : LPI2C_HAL_SlaveGetBitErrorEvent_Activity

Definition at line 2364 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetBusBusyEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the busy state of the bus.

This function returns true if the I2C bus is busy and false if the bus is idle.

Parameters
baseAddrbase address of the LPI2C module
Returns
busy state of the bus Implements : LPI2C_HAL_SlaveGetBusBusyEvent_Activity

Definition at line 2235 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_SlaveGetClockHoldTime ( const LPI2C_Type baseAddr)
inlinestatic

Return the minimum clock hold time configuration.

This function returns the currently configured slave clock hold time.

Parameters
baseAddrbase address of the LPI2C module
Returns
number of cycles for the minimum clock hold time for the I2C slave Implements : LPI2C_HAL_SlaveGetClockHoldTime_Activity

Definition at line 3299 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_SlaveGetData ( const LPI2C_Type baseAddr)
inlinestatic

Return the data received by the LPI2C slave receiver.

This function returns the data received by the I2C slave. Calling this function clears the receive data event.

Parameters
baseAddrbase address of the LPI2C module
Returns
data received by the LPI2C slave receiver Implements : LPI2C_HAL_SlaveGetData_Activity

Definition at line 3525 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_SlaveGetDataValidDelay ( const LPI2C_Type baseAddr)
inlinestatic

Return the SDA data valid delay time configuration.

This function returns the currently configured slave data valid delay.

Parameters
baseAddrbase address of the LPI2C module
Returns
number of cycles for the SDA data valid delay time for the I2C slave Implements : LPI2C_HAL_SlaveGetDataValidDelay_Activity

Definition at line 3261 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetEnable ( const LPI2C_Type baseAddr)
inlinestatic

Return the enable/disable setting for the LPI2C slave.

This function checks whether or not the LPI2C slave is enabled.

Parameters
baseAddrbase address of the LPI2C module
Returns
the enable/disable setting for the LPI2C slave Implements : LPI2C_HAL_SlaveGetEnable_Activity

Definition at line 2218 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetFIFOErrorEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the detection of a FIFO overflow or underflow.

This function checks for the occurrence of a slave FIFO overflow or underflow. This event can only occur if clock stretching is disabled.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of a FIFO overflow or underflow Implements : LPI2C_HAL_SlaveGetFIFOErrorEvent_Activity

Definition at line 2345 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetFilterDoze ( const LPI2C_Type baseAddr)
inlinestatic

Return the slave filter configuration in doze mode.

This function returns the currently configured settings for the digital filter in Doze mode.

Parameters
baseAddrbase address of the LPI2C module
Returns
slave filter configuration in doze mode Implements : LPI2C_HAL_SlaveGetFilterDoze_Activity

Definition at line 2111 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetFilterEnable ( const LPI2C_Type baseAddr)
inlinestatic

Check if the slave filter is enabled or disabled.

This function returns the currently configured settings for the digital filter.

Parameters
baseAddrbase address of the LPI2C module
Returns
slave filter configuration Implements : LPI2C_HAL_SlaveGetFilterEnable_Activity

Definition at line 2147 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetGeneralCall ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured state for the general call address.

This function returns the currently configured setting for general call address matching.

Parameters
baseAddrbase address of the LPI2C module
Returns
specifies if general call address is enabled or disabled Implements : LPI2C_HAL_SlaveGetGeneralCall_Activity

Definition at line 2989 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetGeneralCallEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the detection of the general call address.

This function checks for the detection of a General Call Address. This event is cleared by reading the received address - see function LPI2C_HAL_SlaveGetReceivedAddr().

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of a general call address detection Implements : LPI2C_HAL_SlaveGetGeneralCallEvent_Activity

Definition at line 2289 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetHighSpeedModeDetect ( const LPI2C_Type baseAddr)
inlinestatic

Return the state of the High-speed Mode master code detection.

This function returns the currently configured option for master code detection.

Parameters
baseAddrbase address of the LPI2C module
Returns
enabled/disabled state of the High-speed Mode master code detection Implements : LPI2C_HAL_SlaveGetHighSpeedModeDetect_Activity

Definition at line 2801 of file lpi2c_hal.h.

static lpi2c_slave_nack_config_t LPI2C_HAL_SlaveGetIgnoreNACK ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured slave behaviour when NACK is detected.

This function returns the currently configured option for handling NACKs.

Parameters
baseAddrbase address of the LPI2C module
Returns
configured slave behaviour when NACK is detected Implements : LPI2C_HAL_SlaveGetIgnoreNACK_Activity

Definition at line 2838 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetInt ( const LPI2C_Type baseAddr,
uint32_t  interrupts 
)
inlinestatic

Return the state of the specified LPI2C slave interrupt.

This function returns the enabled/disabled state of the slave interrupt source specified by the interrupt parameter.

Parameters
baseAddrbase address of the LPI2C module
interruptsinterrupt for which the check is made; must be one of the following constants:
  • LPI2C_HAL_SLAVE_SMBUS_ALERT_RESPONSE - SMBus Alert Response Interrupt
  • LPI2C_HAL_SLAVE_GENERAL_CALL - General Call Interrupt
  • LPI2C_HAL_SLAVE_ADDRESS_MATCH_1 - Address Match 1 Interrupt
  • LPI2C_HAL_SLAVE_ADDRESS_MATCH_0 - Address Match 0 Interrupt
  • LPI2C_HAL_SLAVE_FIFO_ERROR - FIFO Error Interrupt
  • LPI2C_HAL_SLAVE_BIT_ERROR - Bit Error Interrupt
  • LPI2C_HAL_SLAVE_STOP_DETECT - STOP Detect Interrupt
  • LPI2C_HAL_SLAVE_REPEATED_START - Repeated Start Interrupt
  • LPI2C_HAL_SLAVE_TRANSMIT_ACK - Transmit ACK Interrupt
  • LPI2C_HAL_SLAVE_ADDRESS_VALID - Address Valid Interrupt
  • LPI2C_HAL_SLAVE_RECEIVE_DATA - Receive Data Interrupt
  • LPI2C_HAL_SLAVE_TRANSMIT_DATA - Transmit Data Interrupt
Returns
enable/disable state of specified interrupt Implements : LPI2C_HAL_SlaveGetInt_Activity

Definition at line 2611 of file lpi2c_hal.h.

static uint16_t LPI2C_HAL_SlaveGetReceivedAddr ( const LPI2C_Type baseAddr)
inlinestatic

Return the received slave address.

This function returns the received slave address. Reading the address clears the address valid event. The address can be 7-bit or 10-bit (10-bit addresses are prefixed by 11110) and includes the R/W bit in the least significant position. Use function LPI2C_HAL_SlaveGetAddrValid() before calling this function to ensure a valid value will be read.

Parameters
baseAddrbase address of the LPI2C module
Returns
received address Implements : LPI2C_HAL_SlaveGetReceivedAddr_Activity

Definition at line 3418 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetReceiveDataEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the availability of receive data.

This function checks for the availability of data received by the I2C slave. The event is cleared by reading the received data - see function LPI2C_HAL_SlaveGetData(). The event is not cleared by calling LPI2C_HAL_SlaveGetData() if the data register is configured to allow address reads and an address valid event is active.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of receive data availability Implements : LPI2C_HAL_SlaveGetReceiveDataEvent_Activity

Definition at line 2462 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetRepeatedStartEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the detection of a repeated START condition.

This function checks for the detection of a repeated START condition, after the LPI2C slave matched the last address byte. This event does not occur when the slave first detects a START condition.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of a repeated START condition Implements : LPI2C_HAL_SlaveGetRepeatedStartEvent_Activity

Definition at line 2401 of file lpi2c_hal.h.

static lpi2c_slave_rxdata_config_t LPI2C_HAL_SlaveGetRxDataConfig ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured functionality of the receive data register.

This function returns the current configuration for the receive data register.

Parameters
baseAddrbase address of the LPI2C module
Returns
specifies if address can be read from the receive data register Implements : LPI2C_HAL_SlaveGetRxDataConfig_Activity

Definition at line 2877 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetRxDMA ( const LPI2C_Type baseAddr)
inlinestatic

Check if slave receive data DMA requests are enabled.

This function returns true if receive data DMA requests are enabled.

Parameters
baseAddrbase address of the LPI2C module
Returns
enabled/disabled status of receive data DMA requests Implements : LPI2C_HAL_SlaveGetRxDMA_Activity

Definition at line 2710 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetRXEmpty ( const LPI2C_Type baseAddr)
inlinestatic

Check if the receive data register is empty.

This function checks if the received data register is empty.

Parameters
baseAddrbase address of the LPI2C module
Returns
specifies if the receive data register is empty Implements : LPI2C_HAL_SlaveGetRXEmpty_Activity

Definition at line 3507 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetRXStall ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured state for clock stretching for data reception.

This function returns the currently configured setting for data reception clock stretching.

Parameters
baseAddrbase address of the LPI2C module
Returns
indicates if clock stretching is enabled or disabled Implements : LPI2C_HAL_SlaveGetRXStall_Activity

Definition at line 3104 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_SlaveGetSCLGlitchFilter ( const LPI2C_Type baseAddr)
inlinestatic

Return the LPI2C slave SCL glitch filter configuration.

This function returns the currently configured slave SDA glitch filter.

Parameters
baseAddrbase address of the LPI2C module
Returns
number of cycles for the LPI2C slave SCL glitch filter Implements : LPI2C_HAL_SlaveGetSCLGlitchFilter_Activity

Definition at line 3222 of file lpi2c_hal.h.

static uint8_t LPI2C_HAL_SlaveGetSDAGlitchFilter ( const LPI2C_Type baseAddr)
inlinestatic

Return the LPI2C slave SDA glitch filter configuration.

This function returns the currently configured slave SDA glitch filter.

Parameters
baseAddrbase address of the LPI2C module
Returns
number of cycles for the LPI2C slave SDA glitch filter Implements : LPI2C_HAL_SlaveGetSDAGlitchFilter_Activity

Definition at line 3182 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetSlaveBusyEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the busy state of the slave.

This function returns true if the LPI2C slave is busy and false if the LPI2C slave is idle.

Parameters
baseAddrbase address of the LPI2C module
Returns
busy state of the slave Implements : LPI2C_HAL_SlaveGetSlaveBusyEvent_Activity

Definition at line 2253 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetSMBusAlert ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured state for the SMBus Alert match.

This function returns the currently configured setting for SMBus Alert match.

Parameters
baseAddrbase address of the LPI2C module
Returns
specifies if match on SMBus Alert is enabled or disabled Implements : LPI2C_HAL_SlaveGetSMBusAlert_Activity

Definition at line 2954 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetSMBusAlertResponseEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the occurrence of an SMBus alert response.

This function checks for the detection of a SMBus Alert Response. This event is cleared by reading the received address - see function LPI2C_HAL_SlaveGetReceivedAddr().

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of an SMBus alert response Implements : LPI2C_HAL_SlaveGetSMBusAlertResponseEvent_Activity

Definition at line 2271 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetSoftwareReset ( const LPI2C_Type baseAddr)
inlinestatic

Return the reset setting for the LPI2C slave.

This function returns the state of the LPI2C slave software reset bit.

Parameters
baseAddrbase address of the LPI2C module
Returns
the reset state of the LPI2C slave logic Implements : LPI2C_HAL_SlaveGetSoftwareReset_Activity

Definition at line 2183 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetStartOfFrame ( const LPI2C_Type baseAddr)
inlinestatic

Check if the current received data is the first in the current frame.

This function checks if the currently received data byte is the first byte since a (repeated) START or STOP condition.

Parameters
baseAddrbase address of the LPI2C module
Returns
specifies if the current received data is the first in the current frame Implements : LPI2C_HAL_SlaveGetStartOfFrame_Activity

Definition at line 3490 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetSTOPDetectEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check the detection of a STOP condition.

This function checks for the detection of a STOP condition, after the LPI2C slave matched the last address byte.

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of a STOP condition Implements : LPI2C_HAL_SlaveGetSTOPDetectEvent_Activity

Definition at line 2382 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetTransmitACKEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check if transmitting ACK response is required.

This function checks if the LPI2C slave requests the software to provide an ACK or NACK response. This event is cleared by calling function LPI2C_HAL_SlaveSetTransmitNACK().

Parameters
baseAddrbase address of the LPI2C module
Returns
indicates whether or not ACK response is required Implements : LPI2C_HAL_SlaveGetTransmitACKEvent_Activity

Definition at line 2420 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetTransmitDataEvent ( const LPI2C_Type baseAddr)
inlinestatic

Check if transmit data is requested.

This function checks if the LPI2C slave requests data to transmit. The event is cleared by providing transmit data - see function LPI2C_HAL_SlaveTransmitData(). The event can also be automatically cleared if the LPI2C module detects a NACK or a repeated START or STOP condition - see function LPI2C_HAL_SlaveSetTxFlagConfig()

Parameters
baseAddrbase address of the LPI2C module
Returns
indication of a transmit data request Implements : LPI2C_HAL_SlaveGetTransmitDataEvent_Activity

Definition at line 2483 of file lpi2c_hal.h.

static lpi2c_slave_nack_transmit_t LPI2C_HAL_SlaveGetTransmitNACK ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured ACK/NACK transmission setting.

This function returns the currently configured setting for ACK/NACK response.

Parameters
baseAddrbase address of the LPI2C module
Returns
specifies whether ACK or NACK is configured to be transmitted Implements : LPI2C_HAL_SlaveGetTransmitNACK_Activity

Definition at line 3456 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetTxDMA ( const LPI2C_Type baseAddr)
inlinestatic

Check if slave transmit data DMA requests are enabled.

This function returns true if transmit data DMA requests are enabled.

Parameters
baseAddrbase address of the LPI2C module
Returns
enabled/disabled status of transmit data DMA requests Implements : LPI2C_HAL_SlaveGetTxDMA_Activity

Definition at line 2727 of file lpi2c_hal.h.

static bool LPI2C_HAL_SlaveGetTXDStall ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured state for clock stretching for data transmission.

This function returns the currently configured setting for data transmission clock stretching.

Parameters
baseAddrbase address of the LPI2C module
Returns
indicates if clock stretching is enabled or disabled Implements : LPI2C_HAL_SlaveGetTXDStall_Activity

Definition at line 3066 of file lpi2c_hal.h.

static lpi2c_slave_txflag_config_t LPI2C_HAL_SlaveGetTxFlagConfig ( const LPI2C_Type baseAddr)
inlinestatic

Return the configured settings for the transmit data flag.

This function returns the currently configured setting for the transmit data flag.

Parameters
baseAddrbase address of the LPI2C module
Returns
specifies if transmit data flag is automatically cleared when NACK is detected Implements : LPI2C_HAL_SlaveGetTxFlagConfig_Activity

Definition at line 2919 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetACKStall ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable or disable clock stretching for the sending of the ACK bit.

This function enables or disables 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 and is therefore not compatible with high speed mode.

Parameters
baseAddrbase address of the LPI2C module
enableenable or disable clock stretching Implements : LPI2C_HAL_SlaveSetACKStall_Activity

Definition at line 3009 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetAddr0 ( LPI2C_Type baseAddr,
uint16_t  addr 
)
inlinestatic

Configure the ADDR0 address for slave address match.

This function configures the ADDR0 value which is used to validate the received slave address. In 10-bit mode, the first address byte is compared to { 11110, ADDR0[10:9] } and the second address byte is compared to ADDR0[8:1]. In 7-bit mode, the address is compared to ADDR0[7:1] The formula used for address validation is configured with function LPI2C_HAL_SlaveSetAddrConfig().

Parameters
baseAddrbase address of the LPI2C module
addrADDR0 address for slave address match Implements : LPI2C_HAL_SlaveSetAddr0_Activity

Definition at line 3361 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetAddr1 ( LPI2C_Type baseAddr,
uint16_t  addr 
)
inlinestatic

Configure the ADDR1 address for slave address match.

This function configures the ADDR1 value which is used to validate the received slave address. In 10-bit mode, the first address byte is compared to { 11110, ADDR1[10:9] } and the second address byte is compared to ADDR1[8:1]. In 7-bit mode, the address is compared to ADDR1[7:1] The formula used for address validation is configured with function LPI2C_HAL_SlaveSetAddrConfig().

Parameters
baseAddrbase address of the LPI2C module
addrADDR1 address for slave address match Implements : LPI2C_HAL_SlaveSetAddr1_Activity

Definition at line 3321 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetAddrConfig ( LPI2C_Type baseAddr,
lpi2c_slave_addr_config_t  configuration 
)
inlinestatic

Control address match configuration.

This function configures the condition that will cause an address match to occur. See type lpi2c_slave_addr_config_t for a description of available options.

Parameters
baseAddrbase address of the LPI2C module
configurationconfigures the condition that will cause an address to match Implements : LPI2C_HAL_SlaveSetAddrConfig_Activity

Definition at line 2745 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetAddrDMA ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable/disable slave address valid DMA requests.

This function enables or disables generation of Rx DMA requests when a valid address is received. Note that this DMA request is shared with slave receive data requests, so if both are used the receive data register should be configured to allow address reads - see function LPI2C_HAL_SlaveSetRxDataConfig()

Parameters
baseAddrbase address of the LPI2C module
enablespecifies whether to enable or disable address valid DMA requests Implements : LPI2C_HAL_SlaveSetAddrDMA_Activity

Definition at line 2637 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetAddrStall ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable or disable clock stretching for valid address reception.

This function enables or disables SCL clock stretching when the address valid flag is asserted. Clock stretching only occurs following the 9th bit and is therefore compatible with high speed mode.

Parameters
baseAddrbase address of the LPI2C module
enableenable or disable clock stretching Implements : LPI2C_HAL_SlaveSetAddrStall_Activity

Definition at line 3123 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetClockHoldTime ( LPI2C_Type baseAddr,
uint8_t  cycles 
)
inlinestatic

Configure the minimum clock hold time for the I2C slave.

This function configures the minimum clock hold time for the I2C slave, when clock stretching is enabled. The minimum hold time is equal to CLKHOLD+3 cycles. The I2C slave clock hold time is not affected by the PRESCALE configuration, and is disabled in high speed mode.

Parameters
baseAddrbase address of the LPI2C module
cyclesnumber of cycles for the minimum clock hold time for the I2C slave Implements : LPI2C_HAL_SlaveSetClockHoldTime_Activity

Definition at line 3281 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetDataValidDelay ( LPI2C_Type baseAddr,
uint8_t  cycles 
)
inlinestatic

Configure the SDA data valid delay time for the I2C slave.

This function configures the SDA data valid delay time for the I2C slave equal to FILTSCL+DATAVD+3 cycles. This data valid delay must be configured to less than the minimum SCL low period. The I2C slave data valid delay time is not affected by the PRESCALE configuration, and is disabled in high speed mode.

Parameters
baseAddrbase address of the LPI2C module
cyclesnumber of cycles for the SDA data valid delay time for the I2C slave Implements : LPI2C_HAL_SlaveSetDataValidDelay_Activity

Definition at line 3243 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetEnable ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable or disable the LPI2C slave.

This function enables or disables the LPI2C module in slave mode.

Parameters
baseAddrbase address of the LPI2C module
enablespecifies whether to enable or disable the LPI2C slave Implements : LPI2C_HAL_SlaveSetEnable_Activity

Definition at line 2200 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetFilterDoze ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Configure the slave filter in doze mode.

This function enables or disables the digital filter in doze mode.

Parameters
baseAddrbase address of the LPI2C module
enableenable/disable the slave filter in doze mode Implements : LPI2C_HAL_SlaveSetFilterDoze_Activity

Definition at line 2092 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetFilterEnable ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable/disable the slave filter.

This function enables or disables the digital filter and output delay counter for slave mode.

Parameters
baseAddrbase address of the LPI2C module
enableenable/disable the slave filter Implements : LPI2C_HAL_SlaveSetFilterEnable_Activity

Definition at line 2129 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetGeneralCall ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable or disable general call address.

This function enables or disables match general call address.

Parameters
baseAddrbase address of the LPI2C module
enableenable or disable general call address Implements : LPI2C_HAL_SlaveSetGeneralCall_Activity

Definition at line 2971 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetHighSpeedModeDetect ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Control detection of the High-speed Mode master code.

This function enables or disables the detection of the High-speed Mode master code of slave address 0000_1XX, but does not cause an address match on this code. When set and any Hs-mode master code is detected, the slave filter and ACK stalls are disabled until the next STOP condition is detected.

Parameters
baseAddrbase address of the LPI2C module
enableenable/disable the detection of the High-speed Mode master code Implements : LPI2C_HAL_SlaveSetHighSpeedModeDetect_Activity

Definition at line 2783 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetIgnoreNACK ( LPI2C_Type baseAddr,
lpi2c_slave_nack_config_t  nack_config 
)
inlinestatic

Control slave behaviour when NACK is detected.

This function controls the option to ignore received NACKs. When enabled, the LPI2C slave will continue transfers after a NACK is detected. This option is needed for Ultra-Fast mode.

Parameters
baseAddrbase address of the LPI2C module
nack_configslave behaviour when NACK is detected Implements : LPI2C_HAL_SlaveSetIgnoreNACK_Activity

Definition at line 2820 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetInt ( LPI2C_Type baseAddr,
uint32_t  interrupts,
bool  enable 
)
inlinestatic

Enable or disable specified LPI2C slave interrupts.

This function can enable or disable one or more slave interrupt sources specified by the interrupts parameter.

Parameters
baseAddrbase address of the LPI2C module
interruptsinterrupts to be enabled or disabled; must be a bitwise or between one or more of the following constants:
  • LPI2C_HAL_SLAVE_SMBUS_ALERT_RESPONSE - SMBus Alert Response Interrupt
  • LPI2C_HAL_SLAVE_GENERAL_CALL - General Call Interrupt
  • LPI2C_HAL_SLAVE_ADDRESS_MATCH_1 - Address Match 1 Interrupt
  • LPI2C_HAL_SLAVE_ADDRESS_MATCH_0 - Address Match 0 Interrupt
  • LPI2C_HAL_SLAVE_FIFO_ERROR - FIFO Error Interrupt
  • LPI2C_HAL_SLAVE_BIT_ERROR - Bit Error Interrupt
  • LPI2C_HAL_SLAVE_STOP_DETECT - STOP Detect Interrupt
  • LPI2C_HAL_SLAVE_REPEATED_START - Repeated Start Interrupt
  • LPI2C_HAL_SLAVE_TRANSMIT_ACK - Transmit ACK Interrupt
  • LPI2C_HAL_SLAVE_ADDRESS_VALID - Address Valid Interrupt
  • LPI2C_HAL_SLAVE_RECEIVE_DATA - Receive Data Interrupt
  • LPI2C_HAL_SLAVE_TRANSMIT_DATA - Transmit Data Interrupt
enablespecifies whether to enable or disable specified interrupts Implements : LPI2C_HAL_SlaveSetInt_Activity

Definition at line 2571 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetRxDataConfig ( LPI2C_Type baseAddr,
lpi2c_slave_rxdata_config_t  configuration 
)
inlinestatic

Control the functionality of the receive data register.

This function can configure the receive data register to allow the address to be read from it. When this option is enabled reading the data register when an address valid event is active will return the address and clear the address valid event. When the address valid event is not active data reads will behave normally (return received data and clear the receive data event).

Parameters
baseAddrbase address of the LPI2C module
configurationcontrols if address can be read from the receive data register Implements : LPI2C_HAL_SlaveSetRxDataConfig_Activity

Definition at line 2859 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetRxDMA ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable/disable slave receive data DMA requests.

This function enables or disables generation of Rx DMA requests when received data is available.

Parameters
baseAddrbase address of the LPI2C module
enablespecifies whether to enable or disable receive data DMA requests Implements : LPI2C_HAL_SlaveSetRxDMA_Activity

Definition at line 2656 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetRXStall ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable or disable clock stretching for data reception.

This function enables or disables SCL clock stretching when receive data flag is set during a slave-receive transfer. Clock stretching occurs following the 9th bit and is therefore compatible with high speed mode.

Parameters
baseAddrbase address of the LPI2C module
enableenable or disable clock stretching Implements : LPI2C_HAL_SlaveSetRXStall_Activity

Definition at line 3085 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetSCLGlitchFilter ( LPI2C_Type baseAddr,
uint8_t  cycles 
)
inlinestatic

Configure the LPI2C slave SCL glitch filter.

This function configures the I2C slave digital glitch filters for SCL input, a configuration of 0 will disable the glitch filter. Glitches equal to or less than FILTSCL cycles long will be filtered out and ignored. The latency through the glitch filter is equal to FILTSCL+3 cycles and must be configured less than the minimum SCL low or high period. The glitch filter cycle count is not affected by the PRESCALE configuration, and is disabled in high speed mode.

Parameters
baseAddrbase address of the LPI2C module
cyclesnumber of cycles for the LPI2C slave SCL glitch filter Implements : LPI2C_HAL_SlaveSetSCLGlitchFilter_Activity

Definition at line 3204 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetSDAGlitchFilter ( LPI2C_Type baseAddr,
uint8_t  cycles 
)
inlinestatic

Configure the LPI2C slave SDA glitch filter.

This function configures the I2C slave digital glitch filters for SDA input. A configuration of 0 will disable the glitch filter. Glitches equal to or less than FILTSDA cycles long will be filtered out and ignored. The latency through the glitch filter is equal to FILTSDA+3 cycles and must be configured less than the minimum SCL low or high period. The glitch filter cycle count is not affected by the PRESCALE configuration, and is disabled in high speed mode.

Parameters
baseAddrbase address of the LPI2C module
cyclesnumber of cycles for the LPI2C slave SDA glitch filter Implements : LPI2C_HAL_SlaveSetSDAGlitchFilter_Activity

Definition at line 3164 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetSMBusAlert ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable or disable match on SMBus Alert.

This function enables or disables match on SMBus Alert.

Parameters
baseAddrbase address of the LPI2C module
enableenable or disable match on SMBus Alert Implements : LPI2C_HAL_SlaveSetSMBusAlert_Activity

Definition at line 2936 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetSoftwareReset ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Set/clear the slave reset command.

Calling this function with enable parameter set to true will perform a software reset of the LPI2C slave.

Parameters
baseAddrbase address of the LPI2C module
enablespecifies the reset state of the LPI2C slave logic Implements : LPI2C_HAL_SlaveSetSoftwareReset_Activity

Definition at line 2165 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetTransmitNACK ( LPI2C_Type baseAddr,
lpi2c_slave_nack_transmit_t  nack 
)
inlinestatic

Configure the ACK/NACK transmission after a received byte.

This function can be used to instruct the LPI2C slave whether to send an ACK or a NACK after receiving a byte. When ACK stall is enabled this function must be called after each matching address and after each received data byte. It can also be called when LPI2C Slave is disabled or idle to configure the default ACK/NACK.

Parameters
baseAddrbase address of the LPI2C module
nackspecifies whether to transmit ACK or NACK Implements : LPI2C_HAL_SlaveSetTransmitNACK_Activity

Definition at line 3438 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetTxDMA ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable/disable slave transmit data DMA requests.

This function enables or disables generation of Tx DMA requests when the module requires more data to transmit.

Parameters
baseAddrbase address of the LPI2C module
enablespecifies whether to enable or disable transmit data DMA requests Implements : LPI2C_HAL_SlaveSetTxDMA_Activity

Definition at line 2675 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetTXDStall ( LPI2C_Type baseAddr,
bool  enable 
)
inlinestatic

Enable or disable clock stretching for data transmission.

This function enables or disables SCL clock stretching when the transmit data flag is set during a slave-transmit transfer. Clock stretching occurs following the 9th bit and is therefore compatible with high speed mode.

Parameters
baseAddrbase address of the LPI2C module
enableenable or disable clock stretching Implements : LPI2C_HAL_SlaveSetTXDStall_Activity

Definition at line 3047 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveSetTxFlagConfig ( LPI2C_Type baseAddr,
lpi2c_slave_txflag_config_t  configuration 
)
inlinestatic

Control the conditions for setting the transmit data flag.

This function controls the conditions that will trigger transmit data events. If this option is enabled the transmit data register is automatically emptied when a slave-transmit transfer is detected. This cause the transmit data event to be triggered whenever a slave-transmit transfer is detected and negate at the end of the slave-transmit transfer. If this option is disabled the transmit data event will assert whenever the transit data register is empty and negate when the transmit data register is full. This allows the transmit data register to be filled before a slave transmit transfer is detected, but can cause the transmit data register to be written before a NACK is detected on the last byte of a slave transmit transfer.

Parameters
baseAddrbase address of the LPI2C module
configurationcontrols if transmit data flag is automatically cleared when NACK is detected Implements : LPI2C_HAL_SlaveSetTxFlagConfig_Activity

Definition at line 2901 of file lpi2c_hal.h.

static void LPI2C_HAL_SlaveTransmitData ( LPI2C_Type baseAddr,
uint8_t  data 
)
inlinestatic

Provide data for the LPI2C slave transmitter.

This function provides one byte of data for the LPI2C slave to transmit. Calling this function clears the transmit data event.

Parameters
baseAddrbase address of the LPI2C module
datadata for the LPI2C slave transmitter Implements : LPI2C_HAL_SlaveTransmitData_Activity

Definition at line 3474 of file lpi2c_hal.h.