STM32F4xx_HAL_Driver  1.8.3
Input and Output operation functions

Data transfers functions. More...

+ Collaboration diagram for Input and Output operation functions:

Modules

 Blocking mode Polling
 
 Non-Blocking mode Interrupt
 
 IRQ Handler and Callbacks
 

Functions

HAL_StatusTypeDef HAL_SMBUS_Master_Transmit_IT (SMBUS_HandleTypeDef *hsmbus, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t XferOptions)
 Transmits in master mode an amount of data in blocking mode. More...
 
HAL_StatusTypeDef HAL_SMBUS_Master_Receive_IT (SMBUS_HandleTypeDef *hsmbus, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t XferOptions)
 Receive in master/host SMBUS mode an amount of data in non blocking mode with Interrupt. More...
 
HAL_StatusTypeDef HAL_SMBUS_Master_Abort_IT (SMBUS_HandleTypeDef *hsmbus, uint16_t DevAddress)
 Abort a master/host SMBUS process communication with Interrupt. More...
 
HAL_StatusTypeDef HAL_SMBUS_Slave_Transmit_IT (SMBUS_HandleTypeDef *hsmbus, uint8_t *pData, uint16_t Size, uint32_t XferOptions)
 Transmit in slave/device SMBUS mode an amount of data in non blocking mode with Interrupt. More...
 
HAL_StatusTypeDef HAL_SMBUS_Slave_Receive_IT (SMBUS_HandleTypeDef *hsmbus, uint8_t *pData, uint16_t Size, uint32_t XferOptions)
 Enable the Address listen mode with Interrupt. More...
 
HAL_StatusTypeDef HAL_SMBUS_EnableListen_IT (SMBUS_HandleTypeDef *hsmbus)
 Enable the Address listen mode with Interrupt. More...
 
HAL_StatusTypeDef HAL_SMBUS_DisableListen_IT (SMBUS_HandleTypeDef *hsmbus)
 Disable the Address listen mode with Interrupt. More...
 
HAL_StatusTypeDef HAL_SMBUS_EnableAlert_IT (SMBUS_HandleTypeDef *hsmbus)
 Enable the SMBUS alert mode with Interrupt. More...
 
HAL_StatusTypeDef HAL_SMBUS_DisableAlert_IT (SMBUS_HandleTypeDef *hsmbus)
 Disable the SMBUS alert mode with Interrupt. More...
 
HAL_StatusTypeDef HAL_SMBUS_IsDeviceReady (SMBUS_HandleTypeDef *hsmbus, uint16_t DevAddress, uint32_t Trials, uint32_t Timeout)
 Check if target device is ready for communication. More...
 
void HAL_SMBUS_EV_IRQHandler (SMBUS_HandleTypeDef *hsmbus)
 This function handles SMBUS event interrupt request. More...
 
void HAL_SMBUS_ER_IRQHandler (SMBUS_HandleTypeDef *hsmbus)
 This function handles SMBUS error interrupt request. More...
 
__weak void HAL_SMBUS_MasterTxCpltCallback (SMBUS_HandleTypeDef *hsmbus)
 Master Tx Transfer completed callback. More...
 
__weak void HAL_SMBUS_MasterRxCpltCallback (SMBUS_HandleTypeDef *hsmbus)
 Master Rx Transfer completed callback. More...
 
__weak void HAL_SMBUS_SlaveTxCpltCallback (SMBUS_HandleTypeDef *hsmbus)
 Slave Tx Transfer completed callback. More...
 
__weak void HAL_SMBUS_SlaveRxCpltCallback (SMBUS_HandleTypeDef *hsmbus)
 Slave Rx Transfer completed callback. More...
 
__weak void HAL_SMBUS_AddrCallback (SMBUS_HandleTypeDef *hsmbus, uint8_t TransferDirection, uint16_t AddrMatchCode)
 Slave Address Match callback. More...
 
__weak void HAL_SMBUS_ListenCpltCallback (SMBUS_HandleTypeDef *hsmbus)
 Listen Complete callback. More...
 
__weak void HAL_SMBUS_ErrorCallback (SMBUS_HandleTypeDef *hsmbus)
 SMBUS error callback. More...
 
__weak void HAL_SMBUS_AbortCpltCallback (SMBUS_HandleTypeDef *hsmbus)
 SMBUS abort callback. More...
 

Detailed Description

Data transfers functions.

 ===============================================================================
                      ##### IO operation functions #####
 ===============================================================================
    [..]
    This subsection provides a set of functions allowing to manage the SMBUS data
    transfers.

    (#) Blocking mode function to check if device is ready for usage is :
        (++) HAL_SMBUS_IsDeviceReady()

    (#) There is only one mode of transfer:
       (++) Non Blocking mode : The communication is performed using Interrupts.
            These functions return the status of the transfer startup.
            The end of the data processing will be indicated through the
            dedicated SMBUS IRQ when using Interrupt mode.

    (#) Non Blocking mode functions with Interrupt are :
        (++) HAL_SMBUS_Master_Transmit_IT()
        (++) HAL_SMBUS_Master_Receive_IT()
        (++) HAL_SMBUS_Master_Abort_IT()
        (++) HAL_SMBUS_Slave_Transmit_IT()
        (++) HAL_SMBUS_Slave_Receive_IT()
        (++) HAL_SMBUS_EnableAlert_IT()
        (++) HAL_SMBUS_DisableAlert_IT()

    (#) A set of Transfer Complete Callbacks are provided in No_Blocking mode:
        (++) HAL_SMBUS_MasterTxCpltCallback()
        (++) HAL_SMBUS_MasterRxCpltCallback()
        (++) HAL_SMBUS_SlaveTxCpltCallback()
        (++) HAL_SMBUS_SlaveRxCpltCallback()
        (++) HAL_SMBUS_AddrCallback()
        (++) HAL_SMBUS_ListenCpltCallback()
        (++) HAL_SMBUS_ErrorCallback()
        (++) HAL_SMBUS_AbortCpltCallback()

Function Documentation

◆ HAL_SMBUS_AbortCpltCallback()

__weak void HAL_SMBUS_AbortCpltCallback ( SMBUS_HandleTypeDef hsmbus)

SMBUS abort callback.

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

Definition at line 1860 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_AddrCallback()

__weak void HAL_SMBUS_AddrCallback ( SMBUS_HandleTypeDef hsmbus,
uint8_t  TransferDirection,
uint16_t  AddrMatchCode 
)

Slave Address Match callback.

Parameters
hsmbusPointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
TransferDirectionMaster request Transfer Direction (Write/Read), value of SMBUS XferOptions definition
AddrMatchCodeAddress Match Code
Return values
None

Definition at line 1810 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_DisableAlert_IT()

HAL_StatusTypeDef HAL_SMBUS_DisableAlert_IT ( SMBUS_HandleTypeDef hsmbus)

Disable the SMBUS alert mode with Interrupt.

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

Definition at line 1382 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_DisableListen_IT()

HAL_StatusTypeDef HAL_SMBUS_DisableListen_IT ( SMBUS_HandleTypeDef hsmbus)

Disable the Address listen mode with Interrupt.

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

Definition at line 1330 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_EnableAlert_IT()

HAL_StatusTypeDef HAL_SMBUS_EnableAlert_IT ( SMBUS_HandleTypeDef hsmbus)

Enable the SMBUS alert mode with Interrupt.

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

Definition at line 1363 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_EnableListen_IT()

HAL_StatusTypeDef HAL_SMBUS_EnableListen_IT ( SMBUS_HandleTypeDef hsmbus)

Enable the Address listen mode with Interrupt.

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

Definition at line 1297 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_ER_IRQHandler()

void HAL_SMBUS_ER_IRQHandler ( SMBUS_HandleTypeDef hsmbus)

This function handles SMBUS error interrupt request.

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

Definition at line 1633 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_ErrorCallback()

__weak void HAL_SMBUS_ErrorCallback ( SMBUS_HandleTypeDef hsmbus)

SMBUS error callback.

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

Definition at line 1844 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_EV_IRQHandler()

void HAL_SMBUS_EV_IRQHandler ( SMBUS_HandleTypeDef hsmbus)

This function handles SMBUS event interrupt request.

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

Definition at line 1528 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_IsDeviceReady()

HAL_StatusTypeDef HAL_SMBUS_IsDeviceReady ( SMBUS_HandleTypeDef hsmbus,
uint16_t  DevAddress,
uint32_t  Trials,
uint32_t  Timeout 
)

Check if target device is ready for communication.

Parameters
hsmbusPointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
DevAddressTarget device address The device 7 bits address value in datasheet must be shifted to the left before calling the interface
TrialsNumber of trials
TimeoutTimeout duration
Return values
HALstatus

Definition at line 1404 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_ListenCpltCallback()

__weak void HAL_SMBUS_ListenCpltCallback ( SMBUS_HandleTypeDef hsmbus)

Listen Complete callback.

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

Definition at line 1828 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_Master_Abort_IT()

HAL_StatusTypeDef HAL_SMBUS_Master_Abort_IT ( SMBUS_HandleTypeDef hsmbus,
uint16_t  DevAddress 
)

Abort a master/host SMBUS process communication with Interrupt.

Note
This abort can be called only if state is ready
Parameters
hsmbusPointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
DevAddressTarget device address The device 7 bits address value in datasheet must be shifted to the left before calling the interface
Return values
HALstatus

Definition at line 1117 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_Master_Receive_IT()

HAL_StatusTypeDef HAL_SMBUS_Master_Receive_IT ( SMBUS_HandleTypeDef hsmbus,
uint16_t  DevAddress,
uint8_t *  pData,
uint16_t  Size,
uint32_t  XferOptions 
)

Receive in master/host SMBUS mode an amount of data in non blocking mode with Interrupt.

Parameters
hsmbusPointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
DevAddressTarget device address The device 7 bits address value in datasheet must be shifted to the left before calling the interface
pDataPointer to data buffer
SizeAmount of data to be sent
XferOptionsOptions of Transfer, value of SMBUS XferOptions definition
Return values
HALstatus

Definition at line 1003 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_Master_Transmit_IT()

HAL_StatusTypeDef HAL_SMBUS_Master_Transmit_IT ( SMBUS_HandleTypeDef hsmbus,
uint16_t  DevAddress,
uint8_t *  pData,
uint16_t  Size,
uint32_t  XferOptions 
)

Transmits in master mode an amount of data in blocking mode.

Parameters
hsmbusPointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
DevAddressTarget device address The device 7 bits address value in datasheet must be shifted to the left before calling the interface
pDataPointer to data buffer
SizeAmount of data to be sent
XferOptionsOptions of Transfer
Return values
HALstatus

Definition at line 918 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_MasterRxCpltCallback()

__weak void HAL_SMBUS_MasterRxCpltCallback ( SMBUS_HandleTypeDef hsmbus)

Master Rx Transfer completed callback.

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

Definition at line 1761 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_MasterTxCpltCallback()

__weak void HAL_SMBUS_MasterTxCpltCallback ( SMBUS_HandleTypeDef hsmbus)

Master Tx Transfer completed callback.

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

Definition at line 1745 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_Slave_Receive_IT()

HAL_StatusTypeDef HAL_SMBUS_Slave_Receive_IT ( SMBUS_HandleTypeDef hsmbus,
uint8_t *  pData,
uint16_t  Size,
uint32_t  XferOptions 
)

Enable the Address listen mode with Interrupt.

Parameters
hsmbusPointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
pDataPointer to data buffer
SizeAmount of data to be sent
XferOptionsOptions of Transfer, value of SMBUS XferOptions definition
Return values
HALstatus

Definition at line 1233 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_Slave_Transmit_IT()

HAL_StatusTypeDef HAL_SMBUS_Slave_Transmit_IT ( SMBUS_HandleTypeDef hsmbus,
uint8_t *  pData,
uint16_t  Size,
uint32_t  XferOptions 
)

Transmit in slave/device SMBUS mode an amount of data in non blocking mode with Interrupt.

Parameters
hsmbusPointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
pDataPointer to data buffer
SizeAmount of data to be sent
XferOptionsOptions of Transfer, value of SMBUS XferOptions definition
Return values
HALstatus

Definition at line 1167 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_SlaveRxCpltCallback()

__weak void HAL_SMBUS_SlaveRxCpltCallback ( SMBUS_HandleTypeDef hsmbus)

Slave Rx Transfer completed callback.

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

Definition at line 1792 of file stm32f4xx_hal_smbus.c.

◆ HAL_SMBUS_SlaveTxCpltCallback()

__weak void HAL_SMBUS_SlaveTxCpltCallback ( SMBUS_HandleTypeDef hsmbus)

Slave Tx Transfer completed callback.

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

Definition at line 1776 of file stm32f4xx_hal_smbus.c.