TUKS MCU Introductory course / TUKS-COURSE-2-LED
Embed: (wiki syntax)

« Back to documentation index

Input and Output operation functions

Input and Output operation functions
[SMBUS Exported Functions]

Data transfers functions. More...

Functions

HAL_StatusTypeDef HAL_SMBUS_Master_Transmit_IT (SMBUS_HandleTypeDef *hsmbus, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t XferOptions)
 Transmit in master/host SMBUS mode an amount of data in non-blocking mode with Interrupt.
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.
HAL_StatusTypeDef HAL_SMBUS_Master_Abort_IT (SMBUS_HandleTypeDef *hsmbus, uint16_t DevAddress)
 Abort a master/host SMBUS process communication with Interrupt.
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.
HAL_StatusTypeDef HAL_SMBUS_Slave_Receive_IT (SMBUS_HandleTypeDef *hsmbus, uint8_t *pData, uint16_t Size, uint32_t XferOptions)
 Receive in slave/device SMBUS mode an amount of data in non-blocking mode with Interrupt.
HAL_StatusTypeDef HAL_SMBUS_EnableListen_IT (SMBUS_HandleTypeDef *hsmbus)
 Enable the Address listen mode with Interrupt.
HAL_StatusTypeDef HAL_SMBUS_DisableListen_IT (SMBUS_HandleTypeDef *hsmbus)
 Disable the Address listen mode with Interrupt.
HAL_StatusTypeDef HAL_SMBUS_EnableAlert_IT (SMBUS_HandleTypeDef *hsmbus)
 Enable the SMBUS alert mode with Interrupt.
HAL_StatusTypeDef HAL_SMBUS_DisableAlert_IT (SMBUS_HandleTypeDef *hsmbus)
 Disable the SMBUS alert mode with Interrupt.
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.

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:
       (++) No-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.

    (#) No-Blocking mode functions with Interrupt are :
        (++) HAL_SMBUS_Master_Transmit_IT()
        (++) HAL_SMBUS_Master_Receive_IT()
        (++) HAL_SMBUS_Slave_Transmit_IT()
        (++) HAL_SMBUS_Slave_Receive_IT()
        (++) HAL_SMBUS_EnableListen_IT() or alias HAL_SMBUS_EnableListen_IT()
        (++) HAL_SMBUS_DisableListen_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()


Function Documentation

HAL_StatusTypeDef HAL_SMBUS_DisableAlert_IT ( SMBUS_HandleTypeDef *  hsmbus )

Disable the SMBUS alert mode with Interrupt.

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

Definition at line 899 of file stm32l4xx_hal_smbus.c.

HAL_StatusTypeDef HAL_SMBUS_DisableListen_IT ( SMBUS_HandleTypeDef *  hsmbus )

Disable the Address listen mode with Interrupt.

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

Definition at line 856 of file stm32l4xx_hal_smbus.c.

HAL_StatusTypeDef HAL_SMBUS_EnableAlert_IT ( SMBUS_HandleTypeDef *  hsmbus )

Enable the SMBUS alert mode with Interrupt.

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

Definition at line 880 of file stm32l4xx_hal_smbus.c.

HAL_StatusTypeDef HAL_SMBUS_EnableListen_IT ( SMBUS_HandleTypeDef *  hsmbus )

Enable the Address listen mode with Interrupt.

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

Definition at line 840 of file stm32l4xx_hal_smbus.c.

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.

Note:
This function is used with Memory devices
Parameters:
hsmbus: Pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
DevAddress,:Target device address
Trials,:Number of trials
Timeout,:Timeout duration
Return values:
HALstatus

Definition at line 920 of file stm32l4xx_hal_smbus.c.

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:
hsmbus: Pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
DevAddress,:Target device address
Return values:
HALstatus

Definition at line 614 of file stm32l4xx_hal_smbus.c.

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:
hsmbus: Pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
DevAddress,:Target device address
pData,:Pointer to data buffer
Size,:Amount of data to be sent
XferOptions,:Options of Transfer, value of SMBUS_XferOptions_definition
Return values:
HALstatus

Definition at line 535 of file stm32l4xx_hal_smbus.c.

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

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

Parameters:
hsmbus: Pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
DevAddress,:Target device address
pData,:Pointer to data buffer
Size,:Amount of data to be sent
XferOptions,:Options of Transfer, value of SMBUS_XferOptions_definition
Return values:
HALstatus

Definition at line 447 of file stm32l4xx_hal_smbus.c.

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

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

Parameters:
hsmbus: Pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
pData,:Pointer to data buffer
Size,:Amount of data to be sent
XferOptions,:Options of Transfer, value of SMBUS_XferOptions_definition
Return values:
HALstatus

Definition at line 766 of file stm32l4xx_hal_smbus.c.

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:
hsmbus: Pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS.
pData,:Pointer to data buffer
Size,:Amount of data to be sent
XferOptions,:Options of Transfer, value of SMBUS_XferOptions_definition
Return values:
HALstatus

Definition at line 675 of file stm32l4xx_hal_smbus.c.