STM32F4 Standard Peripheral bibliotheek
1.0
ST Microelectronics bibliotheek documentatie voor de STM32F4 Standard Peripheral Library
|
Initialization and Configuration functions. More...
Functions | |
void | I2C_DeInit (I2C_TypeDef *I2Cx) |
Deinitialize the I2Cx peripheral registers to their default reset values. More... | |
void | I2C_Init (I2C_TypeDef *I2Cx, I2C_InitTypeDef *I2C_InitStruct) |
Initializes the I2Cx peripheral according to the specified parameters in the I2C_InitStruct. More... | |
void | I2C_StructInit (I2C_InitTypeDef *I2C_InitStruct) |
Fills each I2C_InitStruct member with its default value. More... | |
void | I2C_Cmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the specified I2C peripheral. More... | |
void | I2C_GenerateSTART (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Generates I2Cx communication START condition. More... | |
void | I2C_GenerateSTOP (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Generates I2Cx communication STOP condition. More... | |
void | I2C_Send7bitAddress (I2C_TypeDef *I2Cx, uint8_t Address, uint8_t I2C_Direction) |
Transmits the address byte to select the slave device. More... | |
void | I2C_AcknowledgeConfig (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the specified I2C acknowledge feature. More... | |
void | I2C_OwnAddress2Config (I2C_TypeDef *I2Cx, uint8_t Address) |
Configures the specified I2C own address2. More... | |
void | I2C_DualAddressCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the specified I2C dual addressing mode. More... | |
void | I2C_GeneralCallCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the specified I2C general call feature. More... | |
void | I2C_SoftwareResetCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the specified I2C software reset. More... | |
void | I2C_StretchClockCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the specified I2C Clock stretching. More... | |
void | I2C_FastModeDutyCycleConfig (I2C_TypeDef *I2Cx, uint16_t I2C_DutyCycle) |
Selects the specified I2C fast mode duty cycle. More... | |
void | I2C_NACKPositionConfig (I2C_TypeDef *I2Cx, uint16_t I2C_NACKPosition) |
Selects the specified I2C NACK position in master receiver mode. More... | |
void | I2C_SMBusAlertConfig (I2C_TypeDef *I2Cx, uint16_t I2C_SMBusAlert) |
Drives the SMBusAlert pin high or low for the specified I2C. More... | |
void | I2C_ARPCmd (I2C_TypeDef *I2Cx, FunctionalState NewState) |
Enables or disables the specified I2C ARP. More... | |
Initialization and Configuration functions.
=============================================================================== Initialization and Configuration functions ===============================================================================
void I2C_AcknowledgeConfig | ( | I2C_TypeDef * | I2Cx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified I2C acknowledge feature.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
NewState,: | new state of the I2C Acknowledgement. This parameter can be: ENABLE or DISABLE. |
None. |
void I2C_ARPCmd | ( | I2C_TypeDef * | I2Cx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified I2C ARP.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
NewState,: | new state of the I2Cx ARP. This parameter can be: ENABLE or DISABLE. |
None |
void I2C_Cmd | ( | I2C_TypeDef * | I2Cx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified I2C peripheral.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
NewState,: | new state of the I2Cx peripheral. This parameter can be: ENABLE or DISABLE. |
None |
void I2C_DeInit | ( | I2C_TypeDef * | I2Cx | ) |
Deinitialize the I2Cx peripheral registers to their default reset values.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
None |
void I2C_DualAddressCmd | ( | I2C_TypeDef * | I2Cx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified I2C dual addressing mode.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
NewState,: | new state of the I2C dual addressing mode. This parameter can be: ENABLE or DISABLE. |
None |
void I2C_FastModeDutyCycleConfig | ( | I2C_TypeDef * | I2Cx, |
uint16_t | I2C_DutyCycle | ||
) |
Selects the specified I2C fast mode duty cycle.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
I2C_DutyCycle,: | specifies the fast mode duty cycle. This parameter can be one of the following values:
|
None |
void I2C_GeneralCallCmd | ( | I2C_TypeDef * | I2Cx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified I2C general call feature.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
NewState,: | new state of the I2C General call. This parameter can be: ENABLE or DISABLE. |
None |
void I2C_GenerateSTART | ( | I2C_TypeDef * | I2Cx, |
FunctionalState | NewState | ||
) |
Generates I2Cx communication START condition.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
NewState,: | new state of the I2C START condition generation. This parameter can be: ENABLE or DISABLE. |
None. |
void I2C_GenerateSTOP | ( | I2C_TypeDef * | I2Cx, |
FunctionalState | NewState | ||
) |
Generates I2Cx communication STOP condition.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
NewState,: | new state of the I2C STOP condition generation. This parameter can be: ENABLE or DISABLE. |
None. |
void I2C_Init | ( | I2C_TypeDef * | I2Cx, |
I2C_InitTypeDef * | I2C_InitStruct | ||
) |
Initializes the I2Cx peripheral according to the specified parameters in the I2C_InitStruct.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
I2C_InitStruct,: | pointer to a I2C_InitTypeDef structure that contains the configuration information for the specified I2C peripheral. |
None |
void I2C_NACKPositionConfig | ( | I2C_TypeDef * | I2Cx, |
uint16_t | I2C_NACKPosition | ||
) |
Selects the specified I2C NACK position in master receiver mode.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
I2C_NACKPosition,: | specifies the NACK position. This parameter can be one of the following values:
|
None |
void I2C_OwnAddress2Config | ( | I2C_TypeDef * | I2Cx, |
uint8_t | Address | ||
) |
Configures the specified I2C own address2.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
Address,: | specifies the 7bit I2C own address2. |
None. |
void I2C_Send7bitAddress | ( | I2C_TypeDef * | I2Cx, |
uint8_t | Address, | ||
uint8_t | I2C_Direction | ||
) |
Transmits the address byte to select the slave device.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
Address,: | specifies the slave address which will be transmitted |
I2C_Direction,: | specifies whether the I2C device will be a Transmitter or a Receiver. This parameter can be one of the following values
|
None. |
void I2C_SMBusAlertConfig | ( | I2C_TypeDef * | I2Cx, |
uint16_t | I2C_SMBusAlert | ||
) |
Drives the SMBusAlert pin high or low for the specified I2C.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
I2C_SMBusAlert,: | specifies SMBAlert pin level. This parameter can be one of the following values:
|
None |
void I2C_SoftwareResetCmd | ( | I2C_TypeDef * | I2Cx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified I2C software reset.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
NewState,: | new state of the I2C software reset. This parameter can be: ENABLE or DISABLE. |
None |
void I2C_StretchClockCmd | ( | I2C_TypeDef * | I2Cx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified I2C Clock stretching.
I2Cx,: | where x can be 1, 2 or 3 to select the I2C peripheral. |
NewState,: | new state of the I2Cx Clock stretching. This parameter can be: ENABLE or DISABLE. |
None |
void I2C_StructInit | ( | I2C_InitTypeDef * | I2C_InitStruct | ) |
Fills each I2C_InitStruct member with its default value.
I2C_InitStruct,: | pointer to an I2C_InitTypeDef structure which will be initialized. |
None |