STM32F37 Standard Peripheral bibliotheek
1.0
ST Microelectronics bibliotheek documentatie voor de STM32F37 Standard Peripheral Library
|
GPIO driver modules. More...
Data Structures | |
struct | GPIO_InitTypeDef |
GPIO Init structure definition. More... | |
Macros | |
#define | IS_GPIO_ALL_PERIPH(PERIPH) |
#define | IS_GPIO_LIST_PERIPH(PERIPH) |
Functions | |
void | GPIO_DeInit (GPIO_TypeDef *GPIOx) |
Deinitializes the GPIOx peripheral registers to their default reset values. More... | |
void | GPIO_Init (GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_InitStruct) |
Initializes the GPIOx peripheral according to the specified parameters in the GPIO_InitStruct. More... | |
void | GPIO_StructInit (GPIO_InitTypeDef *GPIO_InitStruct) |
Fills each GPIO_InitStruct member with its default value. More... | |
void | GPIO_PinLockConfig (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Locks GPIO Pins configuration registers. More... | |
uint8_t | GPIO_ReadInputDataBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Reads the specified input port pin. More... | |
uint16_t | GPIO_ReadInputData (GPIO_TypeDef *GPIOx) |
Reads the specified input port pin. More... | |
uint8_t | GPIO_ReadOutputDataBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Reads the specified output data port bit. More... | |
uint16_t | GPIO_ReadOutputData (GPIO_TypeDef *GPIOx) |
Reads the specified GPIO output data port. More... | |
void | GPIO_SetBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Sets the selected data port bits. More... | |
void | GPIO_ResetBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Clears the selected data port bits. More... | |
void | GPIO_WriteBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, BitAction BitVal) |
Sets or clears the selected data port bit. More... | |
void | GPIO_Write (GPIO_TypeDef *GPIOx, uint16_t PortVal) |
Writes data to the specified GPIO data port. More... | |
void | GPIO_PinAFConfig (GPIO_TypeDef *GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF) |
Writes data to the specified GPIO data port. More... | |
GPIO driver modules.
#define IS_GPIO_ALL_PERIPH | ( | PERIPH | ) |
#define IS_GPIO_LIST_PERIPH | ( | PERIPH | ) |
void GPIO_DeInit | ( | GPIO_TypeDef * | GPIOx | ) |
Deinitializes the GPIOx peripheral registers to their default reset values.
GPIOx,: | where x can be (A, B, C, D, E or F) to select the GPIO peripheral. |
None |
void GPIO_Init | ( | GPIO_TypeDef * | GPIOx, |
GPIO_InitTypeDef * | GPIO_InitStruct | ||
) |
Initializes the GPIOx peripheral according to the specified parameters in the GPIO_InitStruct.
GPIOx,: | where x can be (A, B, C, D, E or F) to select the GPIO peripheral. |
GPIO_InitStruct,: | pointer to a GPIO_InitTypeDef structure that contains the configuration information for the specified GPIO peripheral. |
None |
void GPIO_PinAFConfig | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | GPIO_PinSource, | ||
uint8_t | GPIO_AF | ||
) |
Writes data to the specified GPIO data port.
GPIOx,: | where x can be (A, B, C, D, E or F) to select the GPIO peripheral. |
GPIO_PinSource,: | specifies the pin for the Alternate function. This parameter can be GPIO_PinSourcex where x can be (0..15). |
GPIO_AF,: | selects the pin to be used as Alternate function. This parameter can be one of the following value:
|
None |
void GPIO_PinLockConfig | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | GPIO_Pin | ||
) |
Locks GPIO Pins configuration registers.
GPIOx,: | where x can be (A or B or D) to select the GPIO peripheral. |
GPIO_Pin,: | specifies the port bit to be written. This parameter can be any combination of GPIO_Pin_x where x can be (0..15). |
None |
uint16_t GPIO_ReadInputData | ( | GPIO_TypeDef * | GPIOx | ) |
Reads the specified input port pin.
GPIOx,: | where x can be (A, B, C, D, E or F) to select the GPIO peripheral. |
The | input port pin value. |
uint8_t GPIO_ReadInputDataBit | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | GPIO_Pin | ||
) |
Reads the specified input port pin.
GPIOx,: | where x can be (A, B, C, D, E or F) to select the GPIO peripheral. |
GPIO_Pin,: | specifies the port bit to read. |
The | input port pin value. |
uint16_t GPIO_ReadOutputData | ( | GPIO_TypeDef * | GPIOx | ) |
Reads the specified GPIO output data port.
GPIOx,: | where x can be (A, B, C, D, E or F) to select the GPIO peripheral. |
GPIO | output data port value. |
uint8_t GPIO_ReadOutputDataBit | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | GPIO_Pin | ||
) |
Reads the specified output data port bit.
GPIOx,: | where x can be (A, B, C, D, E or F) to select the GPIO peripheral. |
GPIO_Pin,: | Specifies the port bit to read. |
The | output port pin value. |
void GPIO_ResetBits | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | GPIO_Pin | ||
) |
Clears the selected data port bits.
GPIOx,: | where x can be (A, B, C, D, E or F) to select the GPIO peripheral. |
GPIO_Pin,: | specifies the port bits to be written. |
None |
void GPIO_SetBits | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | GPIO_Pin | ||
) |
Sets the selected data port bits.
GPIOx,: | where x can be (A, B, C, D, E or F) to select the GPIO peripheral. |
GPIO_Pin,: | specifies the port bits to be written. |
None |
void GPIO_StructInit | ( | GPIO_InitTypeDef * | GPIO_InitStruct | ) |
Fills each GPIO_InitStruct member with its default value.
GPIO_InitStruct,: | pointer to a GPIO_InitTypeDef structure which will be initialized. |
None |
void GPIO_Write | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | PortVal | ||
) |
Writes data to the specified GPIO data port.
GPIOx,: | where x can be (A, B, C, D, E or F) to select the GPIO peripheral. |
PortVal,: | specifies the value to be written to the port output data register. |
None |
void GPIO_WriteBit | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | GPIO_Pin, | ||
BitAction | BitVal | ||
) |
Sets or clears the selected data port bit.
GPIOx,: | where x can be (A, B, C, D, E or F) to select the GPIO peripheral. |
GPIO_Pin,: | specifies the port bit to be written. |
BitVal,: | specifies the value to be written to the selected bit. This parameter can be one of the BitAction enumeration values:
|
None |