Functions

PEC management functions. More...

Collaboration diagram for PEC management functions:

Functions

void I2C_CalculatePEC (I2C_TypeDef *I2Cx, FunctionalState NewState)
 Enables or disables the PEC value calculation of the transferred bytes. More...
 
void I2C_ClockTimeoutCmd (I2C_TypeDef *I2Cx, FunctionalState NewState)
 Enables or disables I2C Clock Timeout (SCL Timeout detection). More...
 
void I2C_ExtendedClockTimeoutCmd (I2C_TypeDef *I2Cx, FunctionalState NewState)
 Enables or disables I2C Extended Clock Timeout (SCL cumulative Timeout detection). More...
 
uint8_t I2C_GetPEC (I2C_TypeDef *I2Cx)
 Returns the PEC value for the specified I2C. More...
 
void I2C_IdleClockTimeoutCmd (I2C_TypeDef *I2Cx, FunctionalState NewState)
 Enables or disables I2C Idle Clock Timeout (Bus idle SCL and SDA high detection). More...
 
void I2C_PECPositionConfig (I2C_TypeDef *I2Cx, uint16_t I2C_PECPosition)
 Selects the specified I2C PEC position. More...
 
void I2C_PECRequestCmd (I2C_TypeDef *I2Cx, FunctionalState NewState)
 Enables or disables I2C PEC transmission/reception request. More...
 
void I2C_SMBusAlertCmd (I2C_TypeDef *I2Cx, FunctionalState NewState)
 Enables or disables I2C SMBus alert. More...
 
void I2C_TimeoutAConfig (I2C_TypeDef *I2Cx, uint16_t Timeout)
 Configures the I2C Bus Timeout A (SCL Timeout when TIDLE = 0 or Bus idle SCL and SDA high when TIDLE = 1). More...
 
void I2C_TimeoutBConfig (I2C_TypeDef *I2Cx, uint16_t Timeout)
 Configures the I2C Bus Timeout B (SCL cumulative Timeout). More...
 
void I2C_TransmitPEC (I2C_TypeDef *I2Cx, FunctionalState NewState)
 Enables or disables the specified I2C PEC transfer. More...
 

Detailed Description

PEC management functions.

SMBUS management functions.

 ===============================================================================
                  ##### PEC management functions #####
 ===============================================================================  
 ===============================================================================
                      ##### SMBUS management functions #####
 ===============================================================================   
    [..] This section provides a set of functions that handles SMBus communication
         and timeouts detection.
    
    [..] The SMBus Device default address (0b1100 001) is enabled by calling I2C_Init()
         function and setting I2C_Mode member of I2C_InitTypeDef() structure to 
         I2C_Mode_SMBusDevice.
         
    [..] The SMBus Host address (0b0001 000) is enabled by calling I2C_Init()
         function and setting I2C_Mode member of I2C_InitTypeDef() structure to 
         I2C_Mode_SMBusHost.         
         
    [..] The Alert Response Address (0b0001 100) is enabled using I2C_SMBusAlertCmd()
         function.
         
    [..] To detect cumulative SCL stretch in master and slave mode, TIMEOUTB should be 
         configured (in accordance to SMBus specification) using I2C_TimeoutBConfig() 
         function then I2C_ExtendedClockTimeoutCmd() function should be called to enable
         the detection.
         
    [..] SCL low timeout is detected by configuring TIMEOUTB using I2C_TimeoutBConfig()
         function followed by the call of I2C_ClockTimeoutCmd(). When adding to this 
         procedure the call of I2C_IdleClockTimeoutCmd() function, Bus Idle condition 
         (both SCL and SDA high) is detected also.                

Function Documentation

void I2C_CalculatePEC ( I2C_TypeDef I2Cx,
FunctionalState  NewState 
)

Enables or disables the PEC value calculation of the transferred bytes.

Enables or disables I2C PEC calculation.

Parameters
I2Cxwhere x can be 1, 2 or 3 to select the I2C peripheral.
NewStatenew state of the I2Cx PEC value calculation. This parameter can be: ENABLE or DISABLE.
Return values
None
Parameters
I2Cxwhere x can be 1 or 2 to select the I2C peripheral.
NewStatenew state of the I2Cx PEC calculation. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 849 of file stm32f4xx_i2c.c.

void I2C_ClockTimeoutCmd ( I2C_TypeDef I2Cx,
FunctionalState  NewState 
)

Enables or disables I2C Clock Timeout (SCL Timeout detection).

Parameters
I2Cxwhere x can be 1 or 2 to select the I2C peripheral.
NewStatenew state of the I2Cx clock Timeout. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 976 of file stm32f30x_i2c.c.

void I2C_ExtendedClockTimeoutCmd ( I2C_TypeDef I2Cx,
FunctionalState  NewState 
)

Enables or disables I2C Extended Clock Timeout (SCL cumulative Timeout detection).

Parameters
I2Cxwhere x can be 1 or 2 to select the I2C peripheral.
NewStatenew state of the I2Cx Extended clock Timeout. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 1001 of file stm32f30x_i2c.c.

uint8_t I2C_GetPEC ( I2C_TypeDef I2Cx)

Returns the PEC value for the specified I2C.

Returns the I2C PEC.

Parameters
I2Cxwhere x can be 1, 2 or 3 to select the I2C peripheral.
Return values
ThePEC value.
Parameters
I2Cxwhere x can be 1 or 2 to select the I2C peripheral.
Return values
Thevalue of the PEC .

Definition at line 871 of file stm32f4xx_i2c.c.

void I2C_IdleClockTimeoutCmd ( I2C_TypeDef I2Cx,
FunctionalState  NewState 
)

Enables or disables I2C Idle Clock Timeout (Bus idle SCL and SDA high detection).

Parameters
I2Cxwhere x can be 1 or 2 to select the I2C peripheral.
NewStatenew state of the I2Cx Idle clock Timeout. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 1027 of file stm32f30x_i2c.c.

void I2C_PECPositionConfig ( I2C_TypeDef I2Cx,
uint16_t  I2C_PECPosition 
)

Selects the specified I2C PEC position.

Parameters
I2Cxwhere x can be 1, 2 or 3 to select the I2C peripheral.
I2C_PECPositionspecifies the PEC position. This parameter can be one of the following values:
  • I2C_PECPosition_Next: indicates that the next byte is PEC
  • I2C_PECPosition_Current: indicates that current byte is PEC
Note
This function configures the same bit (POS) as I2C_NACKPositionConfig() but is intended to be used in SMBUS mode while I2C_NACKPositionConfig() is intended to used in I2C mode.
Return values
None

Definition at line 825 of file stm32f4xx_i2c.c.

void I2C_PECRequestCmd ( I2C_TypeDef I2Cx,
FunctionalState  NewState 
)

Enables or disables I2C PEC transmission/reception request.

Parameters
I2Cxwhere x can be 1 or 2 to select the I2C peripheral.
NewStatenew state of the I2Cx PEC request. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 1132 of file stm32f30x_i2c.c.

void I2C_SMBusAlertCmd ( I2C_TypeDef I2Cx,
FunctionalState  NewState 
)

Enables or disables I2C SMBus alert.

Parameters
I2Cxwhere x can be 1 or 2 to select the I2C peripheral.
NewStatenew state of the I2Cx SMBus alert. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 951 of file stm32f30x_i2c.c.

void I2C_TimeoutAConfig ( I2C_TypeDef I2Cx,
uint16_t  Timeout 
)

Configures the I2C Bus Timeout A (SCL Timeout when TIDLE = 0 or Bus idle SCL and SDA high when TIDLE = 1).

Parameters
I2Cxwhere x can be 1 or 2 to select the I2C peripheral.
Timeoutspecifies the TimeoutA to be programmed.
Return values
None

Definition at line 1052 of file stm32f30x_i2c.c.

void I2C_TimeoutBConfig ( I2C_TypeDef I2Cx,
uint16_t  Timeout 
)

Configures the I2C Bus Timeout B (SCL cumulative Timeout).

Parameters
I2Cxwhere x can be 1 or 2 to select the I2C peripheral.
Timeoutspecifies the TimeoutB to be programmed.
Return values
None

Definition at line 1079 of file stm32f30x_i2c.c.

void I2C_TransmitPEC ( I2C_TypeDef I2Cx,
FunctionalState  NewState 
)

Enables or disables the specified I2C PEC transfer.

Parameters
I2Cxwhere x can be 1, 2 or 3 to select the I2C peripheral.
NewStatenew state of the I2C PEC transmission. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 794 of file stm32f4xx_i2c.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:29