STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
|
Header file of SMBUS HAL module. More...
#include "stm32f4xx_hal_def.h"
Go to the source code of this file.
Data Structures | |
struct | SMBUS_InitTypeDef |
SMBUS Configuration Structure definition. More... | |
struct | __SMBUS_HandleTypeDef |
SMBUS handle Structure definition. More... | |
Macros | |
#define | HAL_SMBUS_ERROR_NONE 0x00000000U |
#define | HAL_SMBUS_ERROR_BERR 0x00000001U |
#define | HAL_SMBUS_ERROR_ARLO 0x00000002U |
#define | HAL_SMBUS_ERROR_AF 0x00000004U |
#define | HAL_SMBUS_ERROR_OVR 0x00000008U |
#define | HAL_SMBUS_ERROR_TIMEOUT 0x00000010U |
#define | HAL_SMBUS_ERROR_ALERT 0x00000020U |
#define | HAL_SMBUS_ERROR_PECERR 0x00000040U |
#define | SMBUS_ANALOGFILTER_ENABLE 0x00000000U |
#define | SMBUS_ANALOGFILTER_DISABLE I2C_FLTR_ANOFF |
#define | SMBUS_ADDRESSINGMODE_7BIT 0x00004000U |
#define | SMBUS_ADDRESSINGMODE_10BIT (I2C_OAR1_ADDMODE | 0x00004000U) |
#define | SMBUS_DUALADDRESS_DISABLE 0x00000000U |
#define | SMBUS_DUALADDRESS_ENABLE I2C_OAR2_ENDUAL |
#define | SMBUS_GENERALCALL_DISABLE 0x00000000U |
#define | SMBUS_GENERALCALL_ENABLE I2C_CR1_ENGC |
#define | SMBUS_NOSTRETCH_DISABLE 0x00000000U |
#define | SMBUS_NOSTRETCH_ENABLE I2C_CR1_NOSTRETCH |
#define | SMBUS_PEC_DISABLE 0x00000000U |
#define | SMBUS_PEC_ENABLE I2C_CR1_ENPEC |
#define | SMBUS_PERIPHERAL_MODE_SMBUS_HOST (uint32_t)(I2C_CR1_SMBUS | I2C_CR1_SMBTYPE | I2C_CR1_ENARP) |
#define | SMBUS_PERIPHERAL_MODE_SMBUS_SLAVE I2C_CR1_SMBUS |
#define | SMBUS_PERIPHERAL_MODE_SMBUS_SLAVE_ARP (uint32_t)(I2C_CR1_SMBUS | I2C_CR1_ENARP) |
#define | SMBUS_DIRECTION_RECEIVE 0x00000000U |
#define | SMBUS_DIRECTION_TRANSMIT 0x00000001U |
#define | SMBUS_FIRST_FRAME 0x00000001U |
#define | SMBUS_NEXT_FRAME 0x00000002U |
#define | SMBUS_FIRST_AND_LAST_FRAME_NO_PEC 0x00000003U |
#define | SMBUS_LAST_FRAME_NO_PEC 0x00000004U |
#define | SMBUS_FIRST_AND_LAST_FRAME_WITH_PEC 0x00000005U |
#define | SMBUS_LAST_FRAME_WITH_PEC 0x00000006U |
#define | SMBUS_IT_BUF I2C_CR2_ITBUFEN |
#define | SMBUS_IT_EVT I2C_CR2_ITEVTEN |
#define | SMBUS_IT_ERR I2C_CR2_ITERREN |
#define | SMBUS_FLAG_SMBALERT 0x00018000U |
#define | SMBUS_FLAG_TIMEOUT 0x00014000U |
#define | SMBUS_FLAG_PECERR 0x00011000U |
#define | SMBUS_FLAG_OVR 0x00010800U |
#define | SMBUS_FLAG_AF 0x00010400U |
#define | SMBUS_FLAG_ARLO 0x00010200U |
#define | SMBUS_FLAG_BERR 0x00010100U |
#define | SMBUS_FLAG_TXE 0x00010080U |
#define | SMBUS_FLAG_RXNE 0x00010040U |
#define | SMBUS_FLAG_STOPF 0x00010010U |
#define | SMBUS_FLAG_ADD10 0x00010008U |
#define | SMBUS_FLAG_BTF 0x00010004U |
#define | SMBUS_FLAG_ADDR 0x00010002U |
#define | SMBUS_FLAG_SB 0x00010001U |
#define | SMBUS_FLAG_DUALF 0x00100080U |
#define | SMBUS_FLAG_SMBHOST 0x00100040U |
#define | SMBUS_FLAG_SMBDEFAULT 0x00100020U |
#define | SMBUS_FLAG_GENCALL 0x00100010U |
#define | SMBUS_FLAG_TRA 0x00100004U |
#define | SMBUS_FLAG_BUSY 0x00100002U |
#define | SMBUS_FLAG_MSL 0x00100001U |
#define | __HAL_SMBUS_RESET_HANDLE_STATE(__HANDLE__) |
Reset SMBUS handle state. | |
#define | __HAL_SMBUS_ENABLE_IT(__HANDLE__, __INTERRUPT__) |
Enable or disable the specified SMBUS interrupts. | |
#define | __HAL_SMBUS_DISABLE_IT(__HANDLE__, __INTERRUPT__) |
#define | __HAL_SMBUS_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) |
Checks if the specified SMBUS interrupt source is enabled or disabled. | |
#define | __HAL_SMBUS_GET_FLAG(__HANDLE__, __FLAG__) |
Checks whether the specified SMBUS flag is set or not. | |
#define | __HAL_SMBUS_CLEAR_FLAG(__HANDLE__, __FLAG__) |
Clears the SMBUS pending flags which are cleared by writing 0 in a specific bit. | |
#define | __HAL_SMBUS_CLEAR_ADDRFLAG(__HANDLE__) |
Clears the SMBUS ADDR pending flag. | |
#define | __HAL_SMBUS_CLEAR_STOPFLAG(__HANDLE__) |
Clears the SMBUS STOPF pending flag. | |
#define | __HAL_SMBUS_ENABLE(__HANDLE__) |
Enable the SMBUS peripheral. | |
#define | __HAL_SMBUS_DISABLE(__HANDLE__) |
Disable the SMBUS peripheral. | |
#define | __HAL_SMBUS_GENERATE_NACK(__HANDLE__) |
Generate a Non-Acknowledge SMBUS peripheral in Slave mode. | |
#define | SMBUS_FLAG_MASK 0x0000FFFFU |
#define | SMBUS_FREQRANGE(__PCLK__) |
#define | SMBUS_RISE_TIME(__FREQRANGE__) |
#define | SMBUS_SPEED_STANDARD(__PCLK__, __SPEED__) |
#define | SMBUS_7BIT_ADD_WRITE(__ADDRESS__) |
#define | SMBUS_7BIT_ADD_READ(__ADDRESS__) |
#define | SMBUS_10BIT_ADDRESS(__ADDRESS__) |
#define | SMBUS_10BIT_HEADER_WRITE(__ADDRESS__) |
#define | SMBUS_10BIT_HEADER_READ(__ADDRESS__) |
#define | SMBUS_GET_PEC_MODE(__HANDLE__) |
#define | SMBUS_GET_PEC_VALUE(__HANDLE__) |
#define | IS_SMBUS_ADDRESSING_MODE(ADDRESS) |
#define | IS_SMBUS_DUAL_ADDRESS(ADDRESS) |
#define | IS_SMBUS_GENERAL_CALL(CALL) |
#define | IS_SMBUS_NO_STRETCH(STRETCH) |
#define | IS_SMBUS_PEC(PEC) |
#define | IS_SMBUS_PERIPHERAL_MODE(MODE) |
#define | IS_SMBUS_CLOCK_SPEED(SPEED) |
#define | IS_SMBUS_OWN_ADDRESS1(ADDRESS1) |
#define | IS_SMBUS_OWN_ADDRESS2(ADDRESS2) |
#define | IS_SMBUS_TRANSFER_OPTIONS_REQUEST(REQUEST) |
Typedefs | |
typedef struct __SMBUS_HandleTypeDef | SMBUS_HandleTypeDef |
SMBUS handle Structure definition. | |
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... | |
Functions | |
HAL_StatusTypeDef | HAL_SMBUS_Init (SMBUS_HandleTypeDef *hsmbus) |
Initializes the SMBUS according to the specified parameters in the SMBUS_InitTypeDef and initialize the associated handle. | |
HAL_StatusTypeDef | HAL_SMBUS_DeInit (SMBUS_HandleTypeDef *hsmbus) |
DeInitializes the SMBUS peripheral. | |
void | HAL_SMBUS_MspInit (SMBUS_HandleTypeDef *hsmbus) |
Initialize the SMBUS MSP. | |
void | HAL_SMBUS_MspDeInit (SMBUS_HandleTypeDef *hsmbus) |
DeInitialize the SMBUS MSP. | |
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. | |
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. | |
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) |
Enable 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_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. | |
void | HAL_SMBUS_EV_IRQHandler (SMBUS_HandleTypeDef *hsmbus) |
This function handles SMBUS event interrupt request. | |
void | HAL_SMBUS_ER_IRQHandler (SMBUS_HandleTypeDef *hsmbus) |
This function handles SMBUS error interrupt request. | |
void | HAL_SMBUS_MasterTxCpltCallback (SMBUS_HandleTypeDef *hsmbus) |
Master Tx Transfer completed callback. | |
void | HAL_SMBUS_MasterRxCpltCallback (SMBUS_HandleTypeDef *hsmbus) |
Master Rx Transfer completed callback. | |
void | HAL_SMBUS_SlaveTxCpltCallback (SMBUS_HandleTypeDef *hsmbus) |
Slave Tx Transfer completed callback. | |
void | HAL_SMBUS_SlaveRxCpltCallback (SMBUS_HandleTypeDef *hsmbus) |
Slave Rx Transfer completed callback. | |
void | HAL_SMBUS_AddrCallback (SMBUS_HandleTypeDef *hsmbus, uint8_t TransferDirection, uint16_t AddrMatchCode) |
Slave Address Match callback. | |
void | HAL_SMBUS_ListenCpltCallback (SMBUS_HandleTypeDef *hsmbus) |
Listen Complete callback. | |
void | HAL_SMBUS_ErrorCallback (SMBUS_HandleTypeDef *hsmbus) |
SMBUS error callback. | |
void | HAL_SMBUS_AbortCpltCallback (SMBUS_HandleTypeDef *hsmbus) |
SMBUS abort callback. | |
HAL_SMBUS_StateTypeDef | HAL_SMBUS_GetState (SMBUS_HandleTypeDef *hsmbus) |
Return the SMBUS handle state. | |
HAL_SMBUS_ModeTypeDef | HAL_SMBUS_GetMode (SMBUS_HandleTypeDef *hsmbus) |
Return the SMBUS Master, Slave or no mode. | |
uint32_t | HAL_SMBUS_GetError (SMBUS_HandleTypeDef *hsmbus) |
Return the SMBUS error code. | |
Header file of SMBUS HAL module.
Copyright (c) 2016 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file stm32f4xx_hal_smbus.h.