CARME-M4 BSP  V1.5

PEC management functions. More...

+ Collaboration diagram for PEC management functions:

Functions

void I2C_TransmitPEC (I2C_TypeDef *I2Cx, FunctionalState NewState)
 Enables or disables the specified I2C PEC transfer. More...
 
void I2C_PECPositionConfig (I2C_TypeDef *I2Cx, uint16_t I2C_PECPosition)
 Selects the specified I2C PEC position. More...
 
void I2C_CalculatePEC (I2C_TypeDef *I2Cx, FunctionalState NewState)
 Enables or disables the PEC value calculation of the transferred bytes. More...
 
uint8_t I2C_GetPEC (I2C_TypeDef *I2Cx)
 Returns the PEC value for the specified I2C. More...
 

Detailed Description

PEC management functions.

 ===============================================================================
                  ##### PEC management functions #####
 ===============================================================================  

Function Documentation

void I2C_CalculatePEC ( I2C_TypeDef *  I2Cx,
FunctionalState  NewState 
)

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

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

Definition at line 855 of file stm32f4xx_i2c.c.

uint8_t I2C_GetPEC ( I2C_TypeDef *  I2Cx)

Returns the PEC value for the specified I2C.

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

Definition at line 877 of file stm32f4xx_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 831 of file stm32f4xx_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 800 of file stm32f4xx_i2c.c.