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
-
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
-
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
-
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
-