S32 SDK
lpi2c_hal.h File Reference
#include <stdbool.h>
#include "device_registers.h"

Go to the source code of this file.

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...
 

Functions

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...