STM32F4xx_HAL_Driver  1.8.3
SMBUS Exported Types
+ Collaboration diagram for SMBUS Exported Types:

Data Structures

struct  SMBUS_InitTypeDef
 SMBUS Configuration Structure definition. More...
 
struct  __SMBUS_HandleTypeDef
 SMBUS handle Structure definition. More...
 

Typedefs

typedef struct __SMBUS_HandleTypeDef SMBUS_HandleTypeDef
 SMBUS handle Structure definition.
 
typedef void(* pSMBUS_CallbackTypeDef) (SMBUS_HandleTypeDef *hsmbus)
 HAL SMBUS Callback pointer definition. More...
 
typedef void(* pSMBUS_AddrCallbackTypeDef) (SMBUS_HandleTypeDef *hsmbus, uint8_t TransferDirection, uint16_t AddrMatchCode)
 

Enumerations

enum  HAL_SMBUS_StateTypeDef {
  HAL_SMBUS_STATE_RESET = 0x00U , HAL_SMBUS_STATE_READY = 0x20U , HAL_SMBUS_STATE_BUSY = 0x24U , HAL_SMBUS_STATE_BUSY_TX = 0x21U ,
  HAL_SMBUS_STATE_BUSY_RX = 0x22U , HAL_SMBUS_STATE_LISTEN = 0x28U , HAL_SMBUS_STATE_BUSY_TX_LISTEN = 0x29U , HAL_SMBUS_STATE_BUSY_RX_LISTEN = 0x2AU ,
  HAL_SMBUS_STATE_ABORT = 0x60U , HAL_SMBUS_STATE_TIMEOUT = 0xA0U , HAL_SMBUS_STATE_ERROR = 0xE0U
}
 HAL State structure definition. More...
 
enum  HAL_SMBUS_ModeTypeDef { HAL_SMBUS_MODE_NONE = 0x00U , HAL_SMBUS_MODE_MASTER = 0x10U , HAL_SMBUS_MODE_SLAVE = 0x20U }
 HAL Mode structure definition. More...
 
enum  HAL_SMBUS_CallbackIDTypeDef {
  HAL_SMBUS_MASTER_TX_COMPLETE_CB_ID = 0x00U , HAL_SMBUS_MASTER_RX_COMPLETE_CB_ID = 0x01U , HAL_SMBUS_SLAVE_TX_COMPLETE_CB_ID = 0x02U , HAL_SMBUS_SLAVE_RX_COMPLETE_CB_ID = 0x03U ,
  HAL_SMBUS_LISTEN_COMPLETE_CB_ID = 0x04U , HAL_SMBUS_ERROR_CB_ID = 0x07U , HAL_SMBUS_ABORT_CB_ID = 0x08U , HAL_SMBUS_MSPINIT_CB_ID = 0x09U ,
  HAL_SMBUS_MSPDEINIT_CB_ID = 0x0AU
}
 HAL SMBUS Callback ID enumeration definition. More...
 

Detailed Description


Data Structure Documentation

◆ SMBUS_InitTypeDef

struct SMBUS_InitTypeDef

SMBUS Configuration Structure definition.

Definition at line 46 of file stm32f4xx_hal_smbus.h.

Data Fields
uint32_t AddressingMode

Specifies if 7-bit or 10-bit addressing mode is selected. This parameter can be a value of SMBUS addressing mode

uint32_t AnalogFilter

Specifies if Analog Filter is enable or not. This parameter can be a value of SMBUS Analog Filter

uint32_t ClockSpeed

Specifies the clock frequency. This parameter must be set to a value lower than 100kHz

uint32_t DualAddressMode

Specifies if dual addressing mode is selected. This parameter can be a value of SMBUS dual addressing mode

uint32_t GeneralCallMode

Specifies if general call mode is selected. This parameter can be a value of SMBUS general call addressing mode

uint32_t NoStretchMode

Specifies if nostretch mode is selected. This parameter can be a value of SMBUS nostretch mode

uint32_t OwnAddress1

Specifies the first device own address. This parameter can be a 7-bit or 10-bit address.

uint32_t OwnAddress2

Specifies the second device own address if dual addressing mode is selected. This parameter can be a 7-bit address.

uint32_t PacketErrorCheckMode

Specifies if Packet Error Check mode is selected. This parameter can be a value of SMBUS packet error check mode

uint32_t PeripheralMode

Specifies which mode of Periphal is selected. This parameter can be a value of SMBUS peripheral mode

◆ __SMBUS_HandleTypeDef

struct __SMBUS_HandleTypeDef

SMBUS handle Structure definition.

Definition at line 151 of file stm32f4xx_hal_smbus.h.

+ Collaboration diagram for __SMBUS_HandleTypeDef:

Data Fields

I2C_TypeDef * Instance
 
SMBUS_InitTypeDef Init
 
uint8_t * pBuffPtr
 
uint16_t XferSize
 
__IO uint16_t XferCount
 
__IO uint32_t XferOptions
 
__IO uint32_t PreviousState
 
HAL_LockTypeDef Lock
 
__IO HAL_SMBUS_StateTypeDef State
 
__IO HAL_SMBUS_ModeTypeDef Mode
 
__IO uint32_t ErrorCode
 
__IO uint32_t Devaddress
 
__IO uint32_t EventCount
 
uint8_t XferPEC
 
void(* MasterTxCpltCallback )(struct __SMBUS_HandleTypeDef *hsmbus)
 
void(* MasterRxCpltCallback )(struct __SMBUS_HandleTypeDef *hsmbus)
 
void(* SlaveTxCpltCallback )(struct __SMBUS_HandleTypeDef *hsmbus)
 
void(* SlaveRxCpltCallback )(struct __SMBUS_HandleTypeDef *hsmbus)
 
void(* ListenCpltCallback )(struct __SMBUS_HandleTypeDef *hsmbus)
 
void(* MemTxCpltCallback )(struct __SMBUS_HandleTypeDef *hsmbus)
 
void(* MemRxCpltCallback )(struct __SMBUS_HandleTypeDef *hsmbus)
 
void(* ErrorCallback )(struct __SMBUS_HandleTypeDef *hsmbus)
 
void(* AbortCpltCallback )(struct __SMBUS_HandleTypeDef *hsmbus)
 
void(* AddrCallback )(struct __SMBUS_HandleTypeDef *hsmbus, uint8_t TransferDirection, uint16_t AddrMatchCode)
 
void(* MspInitCallback )(struct __SMBUS_HandleTypeDef *hsmbus)
 
void(* MspDeInitCallback )(struct __SMBUS_HandleTypeDef *hsmbus)
 

Field Documentation

◆ AbortCpltCallback

void(* __SMBUS_HandleTypeDef::AbortCpltCallback) (struct __SMBUS_HandleTypeDef *hsmbus)

SMBUS Abort callback

Definition at line 192 of file stm32f4xx_hal_smbus.h.

◆ AddrCallback

void(* __SMBUS_HandleTypeDef::AddrCallback) (struct __SMBUS_HandleTypeDef *hsmbus, uint8_t TransferDirection, uint16_t AddrMatchCode)

SMBUS Slave Address Match callback

Definition at line 193 of file stm32f4xx_hal_smbus.h.

◆ Devaddress

__IO uint32_t __SMBUS_HandleTypeDef::Devaddress

SMBUS Target device address

Definition at line 177 of file stm32f4xx_hal_smbus.h.

◆ ErrorCallback

void(* __SMBUS_HandleTypeDef::ErrorCallback) (struct __SMBUS_HandleTypeDef *hsmbus)

SMBUS Error callback

Definition at line 191 of file stm32f4xx_hal_smbus.h.

◆ ErrorCode

__IO uint32_t __SMBUS_HandleTypeDef::ErrorCode

SMBUS Error code

Definition at line 175 of file stm32f4xx_hal_smbus.h.

◆ EventCount

__IO uint32_t __SMBUS_HandleTypeDef::EventCount

SMBUS Event counter

Definition at line 179 of file stm32f4xx_hal_smbus.h.

◆ Init

SMBUS_InitTypeDef __SMBUS_HandleTypeDef::Init

SMBUS communication parameters

Definition at line 155 of file stm32f4xx_hal_smbus.h.

◆ Instance

I2C_TypeDef* __SMBUS_HandleTypeDef::Instance

SMBUS registers base address

Definition at line 153 of file stm32f4xx_hal_smbus.h.

◆ ListenCpltCallback

void(* __SMBUS_HandleTypeDef::ListenCpltCallback) (struct __SMBUS_HandleTypeDef *hsmbus)

SMBUS Listen Complete callback

Definition at line 188 of file stm32f4xx_hal_smbus.h.

◆ Lock

HAL_LockTypeDef __SMBUS_HandleTypeDef::Lock

SMBUS locking object

Definition at line 169 of file stm32f4xx_hal_smbus.h.

◆ MasterRxCpltCallback

void(* __SMBUS_HandleTypeDef::MasterRxCpltCallback) (struct __SMBUS_HandleTypeDef *hsmbus)

SMBUS Master Rx Transfer completed callback

Definition at line 185 of file stm32f4xx_hal_smbus.h.

◆ MasterTxCpltCallback

void(* __SMBUS_HandleTypeDef::MasterTxCpltCallback) (struct __SMBUS_HandleTypeDef *hsmbus)

SMBUS Master Tx Transfer completed callback

Definition at line 184 of file stm32f4xx_hal_smbus.h.

◆ MemRxCpltCallback

void(* __SMBUS_HandleTypeDef::MemRxCpltCallback) (struct __SMBUS_HandleTypeDef *hsmbus)

SMBUS Memory Rx Transfer completed callback

Definition at line 190 of file stm32f4xx_hal_smbus.h.

◆ MemTxCpltCallback

void(* __SMBUS_HandleTypeDef::MemTxCpltCallback) (struct __SMBUS_HandleTypeDef *hsmbus)

SMBUS Memory Tx Transfer completed callback

Definition at line 189 of file stm32f4xx_hal_smbus.h.

◆ Mode

__IO HAL_SMBUS_ModeTypeDef __SMBUS_HandleTypeDef::Mode

SMBUS communication mode

Definition at line 173 of file stm32f4xx_hal_smbus.h.

◆ MspDeInitCallback

void(* __SMBUS_HandleTypeDef::MspDeInitCallback) (struct __SMBUS_HandleTypeDef *hsmbus)

SMBUS Msp DeInit callback

Definition at line 195 of file stm32f4xx_hal_smbus.h.

◆ MspInitCallback

void(* __SMBUS_HandleTypeDef::MspInitCallback) (struct __SMBUS_HandleTypeDef *hsmbus)

SMBUS Msp Init callback

Definition at line 194 of file stm32f4xx_hal_smbus.h.

◆ pBuffPtr

uint8_t* __SMBUS_HandleTypeDef::pBuffPtr

Pointer to SMBUS transfer buffer

Definition at line 157 of file stm32f4xx_hal_smbus.h.

◆ PreviousState

__IO uint32_t __SMBUS_HandleTypeDef::PreviousState

SMBUS communication Previous state and mode context for internal usage

Definition at line 166 of file stm32f4xx_hal_smbus.h.

◆ SlaveRxCpltCallback

void(* __SMBUS_HandleTypeDef::SlaveRxCpltCallback) (struct __SMBUS_HandleTypeDef *hsmbus)

SMBUS Slave Rx Transfer completed callback

Definition at line 187 of file stm32f4xx_hal_smbus.h.

◆ SlaveTxCpltCallback

void(* __SMBUS_HandleTypeDef::SlaveTxCpltCallback) (struct __SMBUS_HandleTypeDef *hsmbus)

SMBUS Slave Tx Transfer completed callback

Definition at line 186 of file stm32f4xx_hal_smbus.h.

◆ State

__IO HAL_SMBUS_StateTypeDef __SMBUS_HandleTypeDef::State

SMBUS communication state

Definition at line 171 of file stm32f4xx_hal_smbus.h.

◆ XferCount

__IO uint16_t __SMBUS_HandleTypeDef::XferCount

SMBUS transfer counter

Definition at line 161 of file stm32f4xx_hal_smbus.h.

◆ XferOptions

__IO uint32_t __SMBUS_HandleTypeDef::XferOptions

SMBUS transfer options this parameter can be a value of SMBUS XferOptions definition

Definition at line 163 of file stm32f4xx_hal_smbus.h.

◆ XferPEC

uint8_t __SMBUS_HandleTypeDef::XferPEC

SMBUS PEC data in reception mode

Definition at line 181 of file stm32f4xx_hal_smbus.h.

◆ XferSize

uint16_t __SMBUS_HandleTypeDef::XferSize

SMBUS transfer size

Definition at line 159 of file stm32f4xx_hal_smbus.h.

Typedef Documentation

◆ pSMBUS_AddrCallbackTypeDef

typedef void(* pSMBUS_AddrCallbackTypeDef) (SMBUS_HandleTypeDef *hsmbus, uint8_t TransferDirection, uint16_t AddrMatchCode)

pointer to an I2C Address Match callback function

Definition at line 222 of file stm32f4xx_hal_smbus.h.

◆ pSMBUS_CallbackTypeDef

typedef void(* pSMBUS_CallbackTypeDef) (SMBUS_HandleTypeDef *hsmbus)

HAL SMBUS Callback pointer definition.

pointer to an I2C callback function

Definition at line 221 of file stm32f4xx_hal_smbus.h.

Enumeration Type Documentation

◆ HAL_SMBUS_CallbackIDTypeDef

HAL SMBUS Callback ID enumeration definition.

Enumerator
HAL_SMBUS_MASTER_TX_COMPLETE_CB_ID 

SMBUS Master Tx Transfer completed callback ID

HAL_SMBUS_MASTER_RX_COMPLETE_CB_ID 

SMBUS Master Rx Transfer completed callback ID

HAL_SMBUS_SLAVE_TX_COMPLETE_CB_ID 

SMBUS Slave Tx Transfer completed callback ID

HAL_SMBUS_SLAVE_RX_COMPLETE_CB_ID 

SMBUS Slave Rx Transfer completed callback ID

HAL_SMBUS_LISTEN_COMPLETE_CB_ID 

SMBUS Listen Complete callback ID

HAL_SMBUS_ERROR_CB_ID 

SMBUS Error callback ID

HAL_SMBUS_ABORT_CB_ID 

SMBUS Abort callback ID

HAL_SMBUS_MSPINIT_CB_ID 

SMBUS Msp Init callback ID

HAL_SMBUS_MSPDEINIT_CB_ID 

SMBUS Msp DeInit callback ID

Definition at line 204 of file stm32f4xx_hal_smbus.h.

◆ HAL_SMBUS_ModeTypeDef

HAL Mode structure definition.

Note
HAL SMBUS Mode value coding follow below described bitmap : b7 (not used) x : Should be set to 0 b6 (not used) x : Should be set to 0 b5 0 : None 1 : Slave (HAL SMBUS communication is in Slave/Device Mode) b4 0 : None 1 : Master (HAL SMBUS communication is in Master/Host Mode) b3-b2-b1-b0 (not used) xxxx : Should be set to 0000
Enumerator
HAL_SMBUS_MODE_NONE 

No SMBUS communication on going

HAL_SMBUS_MODE_MASTER 

SMBUS communication is in Master Mode

HAL_SMBUS_MODE_SLAVE 

SMBUS communication is in Slave Mode

Definition at line 140 of file stm32f4xx_hal_smbus.h.

◆ HAL_SMBUS_StateTypeDef

HAL State structure definition.

Note
HAL SMBUS State value coding follow below described bitmap : b7-b6 Error information 00 : No Error 01 : Abort (Abort user request on going) 10 : Timeout 11 : Error b5 IP initialisation status 0 : Reset (IP not initialized) 1 : Init done (IP initialized and ready to use. HAL SMBUS Init function called) b4 (not used) x : Should be set to 0 b3 0 : Ready or Busy (No Listen mode ongoing) 1 : Listen (IP in Address Listen Mode) b2 Intrinsic process state 0 : Ready 1 : Busy (IP busy with some configuration or internal operations) b1 Rx state 0 : Ready (no Rx operation ongoing) 1 : Busy (Rx operation ongoing) b0 Tx state 0 : Ready (no Tx operation ongoing) 1 : Busy (Tx operation ongoing)
Enumerator
HAL_SMBUS_STATE_RESET 

Peripheral is not yet Initialized

HAL_SMBUS_STATE_READY 

Peripheral Initialized and ready for use

HAL_SMBUS_STATE_BUSY 

An internal process is ongoing

HAL_SMBUS_STATE_BUSY_TX 

Data Transmission process is ongoing

HAL_SMBUS_STATE_BUSY_RX 

Data Reception process is ongoing

HAL_SMBUS_STATE_LISTEN 

Address Listen Mode is ongoing

HAL_SMBUS_STATE_BUSY_TX_LISTEN 

Address Listen Mode and Data Transmission process is ongoing

HAL_SMBUS_STATE_BUSY_RX_LISTEN 

Address Listen Mode and Data Reception process is ongoing

HAL_SMBUS_STATE_ABORT 

Abort user request ongoing

HAL_SMBUS_STATE_TIMEOUT 

Timeout state

HAL_SMBUS_STATE_ERROR 

Error

Definition at line 106 of file stm32f4xx_hal_smbus.h.