STM32L486xx HAL User Manual
Functions
SMBUS Private Functions
SMBUS Exported Functions | SMBUS

Data transfers Private functions. More...

Functions

static HAL_StatusTypeDef SMBUS_WaitOnFlagUntilTimeout (SMBUS_HandleTypeDef *hsmbus, uint32_t Flag, FlagStatus Status, uint32_t Timeout)
 Handle SMBUS Communication Timeout.
static void SMBUS_Enable_IRQ (SMBUS_HandleTypeDef *hsmbus, uint16_t InterruptRequest)
 Manage the enabling of Interrupts.
static void SMBUS_Disable_IRQ (SMBUS_HandleTypeDef *hsmbus, uint16_t InterruptRequest)
 Manage the disabling of Interrupts.
static HAL_StatusTypeDef SMBUS_Master_ISR (SMBUS_HandleTypeDef *hsmbus)
 Interrupt Sub-Routine which handle the Interrupt Flags Master Mode.
static HAL_StatusTypeDef SMBUS_Slave_ISR (SMBUS_HandleTypeDef *hsmbus)
 Interrupt Sub-Routine which handle the Interrupt Flags Slave Mode.
static void SMBUS_ConvertOtherXferOptions (SMBUS_HandleTypeDef *hsmbus)
 Convert SMBUSx OTHER_xxx XferOptions to functionnal XferOptions.
static void SMBUS_ITErrorHandler (SMBUS_HandleTypeDef *hsmbus)
 SMBUS interrupts error handler.
static void SMBUS_TransferConfig (SMBUS_HandleTypeDef *hsmbus, uint16_t DevAddress, uint8_t Size, uint32_t Mode, uint32_t Request)
 Handle SMBUSx communication when starting transfer or during transfer (TC or TCR flag are set).

Detailed Description

Data transfers Private functions.


Function Documentation

static void SMBUS_ConvertOtherXferOptions ( SMBUS_HandleTypeDef hsmbus) [static]
static void SMBUS_Disable_IRQ ( SMBUS_HandleTypeDef hsmbus,
uint16_t  InterruptRequest 
) [static]

Manage the disabling of Interrupts.

Parameters:
hsmbusPointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
InterruptRequestValue of SMBUS Interrupt configuration definition.
Return values:
HALstatus

Definition at line 2340 of file stm32l4xx_hal_smbus.c.

References __HAL_SMBUS_DISABLE_IT, HAL_SMBUS_STATE_LISTEN, HAL_SMBUS_STATE_READY, SMBUS_GET_ALERT_ENABLED, SMBUS_IT_ADDR, SMBUS_IT_ADDRI, SMBUS_IT_ALERT, SMBUS_IT_ERRI, SMBUS_IT_NACKI, SMBUS_IT_RX, SMBUS_IT_RXI, SMBUS_IT_STOPI, SMBUS_IT_TCI, SMBUS_IT_TX, SMBUS_IT_TXI, and __SMBUS_HandleTypeDef::State.

Referenced by HAL_SMBUS_DisableAlert_IT(), HAL_SMBUS_DisableListen_IT(), HAL_SMBUS_Slave_Receive_IT(), HAL_SMBUS_Slave_Transmit_IT(), SMBUS_Master_ISR(), and SMBUS_Slave_ISR().

static void SMBUS_Enable_IRQ ( SMBUS_HandleTypeDef hsmbus,
uint16_t  InterruptRequest 
) [static]

Manage the enabling of Interrupts.

Parameters:
hsmbusPointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
InterruptRequestValue of SMBUS Interrupt configuration definition.
Return values:
HALstatus

Definition at line 2300 of file stm32l4xx_hal_smbus.c.

References __HAL_SMBUS_ENABLE_IT, SMBUS_IT_ADDR, SMBUS_IT_ADDRI, SMBUS_IT_ALERT, SMBUS_IT_ERRI, SMBUS_IT_NACKI, SMBUS_IT_RX, SMBUS_IT_RXI, SMBUS_IT_STOPI, SMBUS_IT_TCI, SMBUS_IT_TX, and SMBUS_IT_TXI.

Referenced by HAL_SMBUS_EnableAlert_IT(), HAL_SMBUS_EnableListen_IT(), HAL_SMBUS_Master_Abort_IT(), HAL_SMBUS_Master_Receive_IT(), HAL_SMBUS_Master_Transmit_IT(), HAL_SMBUS_Slave_Receive_IT(), and HAL_SMBUS_Slave_Transmit_IT().

static void SMBUS_ITErrorHandler ( SMBUS_HandleTypeDef hsmbus) [static]
static HAL_StatusTypeDef SMBUS_Master_ISR ( SMBUS_HandleTypeDef hsmbus) [static]
static HAL_StatusTypeDef SMBUS_Slave_ISR ( SMBUS_HandleTypeDef hsmbus) [static]

Interrupt Sub-Routine which handle the Interrupt Flags Slave Mode.

Parameters:
hsmbusPointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
Return values:
HALstatus

Definition at line 2055 of file stm32l4xx_hal_smbus.c.

References __HAL_SMBUS_CLEAR_FLAG, __HAL_SMBUS_DISABLE_IT, __HAL_SMBUS_GET_FLAG, __SMBUS_HandleTypeDef::AddrCallback, __SMBUS_HandleTypeDef::ErrorCallback, __SMBUS_HandleTypeDef::ErrorCode, HAL_SMBUS_AddrCallback(), HAL_SMBUS_ERROR_ACKF, HAL_SMBUS_ErrorCallback(), HAL_SMBUS_ListenCpltCallback(), HAL_SMBUS_SlaveRxCpltCallback(), HAL_SMBUS_SlaveTxCpltCallback(), HAL_SMBUS_STATE_LISTEN, HAL_SMBUS_STATE_READY, HAL_SMBUS_STATE_SLAVE_BUSY_RX, HAL_SMBUS_STATE_SLAVE_BUSY_TX, __SMBUS_HandleTypeDef::Instance, __SMBUS_HandleTypeDef::ListenCpltCallback, MAX_NBYTE_SIZE, __SMBUS_HandleTypeDef::pBuffPtr, __SMBUS_HandleTypeDef::PreviousState, __SMBUS_HandleTypeDef::SlaveRxCpltCallback, __SMBUS_HandleTypeDef::SlaveTxCpltCallback, SMBUS_Disable_IRQ(), SMBUS_FLAG_ADDR, SMBUS_FLAG_AF, SMBUS_FLAG_RXNE, SMBUS_FLAG_STOPF, SMBUS_FLAG_TCR, SMBUS_FLAG_TXIS, SMBUS_GET_ADDR_MATCH, SMBUS_GET_DIR, SMBUS_GET_PEC_MODE, SMBUS_IT_ADDR, SMBUS_IT_ADDRI, SMBUS_IT_RX, SMBUS_IT_TX, SMBUS_NO_STARTSTOP, SMBUS_RELOAD_MODE, SMBUS_RESET_CR2, SMBUS_SENDPEC_MODE, SMBUS_TransferConfig(), __SMBUS_HandleTypeDef::State, __SMBUS_HandleTypeDef::XferCount, __SMBUS_HandleTypeDef::XferOptions, and __SMBUS_HandleTypeDef::XferSize.

Referenced by HAL_SMBUS_EV_IRQHandler().

static void SMBUS_TransferConfig ( SMBUS_HandleTypeDef hsmbus,
uint16_t  DevAddress,
uint8_t  Size,
uint32_t  Mode,
uint32_t  Request 
) [static]

Handle SMBUSx communication when starting transfer or during transfer (TC or TCR flag are set).

Parameters:
hsmbusSMBUS handle.
DevAddressspecifies the slave address to be programmed.
Sizespecifies the number of bytes to be programmed. This parameter must be a value between 0 and 255.
ModeNew state of the SMBUS START condition generation. This parameter can be one or a combination of the following values:
RequestNew state of the SMBUS START condition generation. This parameter can be one of the following values:
Return values:
None

Definition at line 2550 of file stm32l4xx_hal_smbus.c.

References assert_param, __SMBUS_HandleTypeDef::Instance, IS_SMBUS_TRANSFER_MODE, and IS_SMBUS_TRANSFER_REQUEST.

Referenced by HAL_SMBUS_Master_Abort_IT(), HAL_SMBUS_Master_Receive_IT(), HAL_SMBUS_Master_Transmit_IT(), HAL_SMBUS_Slave_Receive_IT(), HAL_SMBUS_Slave_Transmit_IT(), SMBUS_Master_ISR(), and SMBUS_Slave_ISR().

static HAL_StatusTypeDef SMBUS_WaitOnFlagUntilTimeout ( SMBUS_HandleTypeDef hsmbus,
uint32_t  Flag,
FlagStatus  Status,
uint32_t  Timeout 
) [static]

Handle SMBUS Communication Timeout.

Parameters:
hsmbusPointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
FlagSpecifies the SMBUS flag to check.
StatusThe new Flag status (SET or RESET).
TimeoutTimeout duration
Return values:
HALstatus

Definition at line 2504 of file stm32l4xx_hal_smbus.c.

References __HAL_SMBUS_GET_FLAG, HAL_GetTick(), HAL_SMBUS_STATE_READY, __SMBUS_HandleTypeDef::PreviousState, and __SMBUS_HandleTypeDef::State.

Referenced by HAL_SMBUS_IsDeviceReady().