PEC management functions.
More...
|
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...
|
|
PEC management functions.
===============================================================================
##### PEC management functions #####
===============================================================================
void I2C_CalculatePEC |
( |
I2C_TypeDef * |
I2Cx, |
|
|
FunctionalState |
NewState |
|
) |
| |
Enables or disables the PEC value calculation of the transferred bytes.
- Parameters
-
I2Cx | where x can be 1, 2 or 3 to select the I2C peripheral. |
NewState | new state of the I2Cx PEC value calculation. This parameter can be: ENABLE or DISABLE. |
- Return values
-
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
-
I2Cx | where x can be 1, 2 or 3 to select the I2C peripheral. |
- Return values
-
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
-
I2Cx | where x can be 1, 2 or 3 to select the I2C peripheral. |
I2C_PECPosition | specifies 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
-
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
-
I2Cx | where x can be 1, 2 or 3 to select the I2C peripheral. |
NewState | new state of the I2C PEC transmission. This parameter can be: ENABLE or DISABLE. |
- Return values
-
Definition at line 800 of file stm32f4xx_i2c.c.