STM8S/A Standard Peripherals Drivers
|
Functions | |
void | GPIO_DeInit (GPIO_TypeDef *GPIOx) |
Deinitializes the GPIOx peripheral registers to their default reset values. | |
void | GPIO_ExternalPullUpConfig (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef GPIO_Pin, FunctionalState NewState) |
Configures the external pull-up on GPIOx pins. | |
void | GPIO_Init (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef GPIO_Pin, GPIO_Mode_TypeDef GPIO_Mode) |
Initializes the GPIOx according to the specified parameters. | |
uint8_t | GPIO_ReadInputData (GPIO_TypeDef *GPIOx) |
Reads the specified GPIO input data port. | |
BitStatus | GPIO_ReadInputPin (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef GPIO_Pin) |
Reads the specified GPIO input data pin. | |
uint8_t | GPIO_ReadOutputData (GPIO_TypeDef *GPIOx) |
Reads the specified GPIO output data port. | |
void | GPIO_Write (GPIO_TypeDef *GPIOx, uint8_t PortVal) |
Writes data to the specified GPIO data port. | |
void | GPIO_WriteHigh (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef PortPins) |
Writes high level to the specified GPIO pins. | |
void | GPIO_WriteLow (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef PortPins) |
Writes low level to the specified GPIO pins. | |
void | GPIO_WriteReverse (GPIO_TypeDef *GPIOx, GPIO_Pin_TypeDef PortPins) |
Writes reverse level to the specified GPIO pins. |
Function Documentation
void GPIO_DeInit | ( | GPIO_TypeDef * | GPIOx | ) |
Deinitializes the GPIOx peripheral registers to their default reset values.
Definition at line 53 of file stm8s_gpio.c.
References GPIO_struct::CR1, GPIO_struct::CR2, GPIO_struct::DDR, GPIO_CR1_RESET_VALUE, GPIO_CR2_RESET_VALUE, GPIO_DDR_RESET_VALUE, GPIO_ODR_RESET_VALUE, and GPIO_struct::ODR.
void GPIO_ExternalPullUpConfig | ( | GPIO_TypeDef * | GPIOx, |
GPIO_Pin_TypeDef | GPIO_Pin, | ||
FunctionalState | NewState | ||
) |
Configures the external pull-up on GPIOx pins.
Definition at line 225 of file stm8s_gpio.c.
References GPIO_struct::CR1, DISABLE, IS_FUNCTIONALSTATE_OK, and IS_GPIO_PIN_OK.
void GPIO_Init | ( | GPIO_TypeDef * | GPIOx, |
GPIO_Pin_TypeDef | GPIO_Pin, | ||
GPIO_Mode_TypeDef | GPIO_Mode | ||
) |
Initializes the GPIOx according to the specified parameters.
Definition at line 71 of file stm8s_gpio.c.
References GPIO_struct::CR1, GPIO_struct::CR2, GPIO_struct::DDR, IS_GPIO_MODE_OK, IS_GPIO_PIN_OK, and GPIO_struct::ODR.
uint8_t GPIO_ReadInputData | ( | GPIO_TypeDef * | GPIOx | ) |
Reads the specified GPIO input data port.
- Note:
- The port must be configured in input mode.
Definition at line 202 of file stm8s_gpio.c.
References GPIO_struct::IDR.
BitStatus GPIO_ReadInputPin | ( | GPIO_TypeDef * | GPIOx, |
GPIO_Pin_TypeDef | GPIO_Pin | ||
) |
Reads the specified GPIO input data pin.
Definition at line 213 of file stm8s_gpio.c.
References GPIO_struct::IDR.
uint8_t GPIO_ReadOutputData | ( | GPIO_TypeDef * | GPIOx | ) |
Reads the specified GPIO output data port.
- Note:
- The port must be configured in input mode.
Definition at line 191 of file stm8s_gpio.c.
References GPIO_struct::ODR.
void GPIO_Write | ( | GPIO_TypeDef * | GPIOx, |
uint8_t | PortVal | ||
) |
Writes data to the specified GPIO data port.
- Note:
- The port must be configured in output mode.
Definition at line 141 of file stm8s_gpio.c.
References GPIO_struct::ODR.
void GPIO_WriteHigh | ( | GPIO_TypeDef * | GPIOx, |
GPIO_Pin_TypeDef | PortPins | ||
) |
Writes high level to the specified GPIO pins.
- Note:
- The port must be configured in output mode.
Definition at line 154 of file stm8s_gpio.c.
References GPIO_struct::ODR.
void GPIO_WriteLow | ( | GPIO_TypeDef * | GPIOx, |
GPIO_Pin_TypeDef | PortPins | ||
) |
Writes low level to the specified GPIO pins.
- Note:
- The port must be configured in output mode.
Definition at line 167 of file stm8s_gpio.c.
References GPIO_struct::ODR.
void GPIO_WriteReverse | ( | GPIO_TypeDef * | GPIOx, |
GPIO_Pin_TypeDef | PortPins | ||
) |
Writes reverse level to the specified GPIO pins.
- Note:
- The port must be configured in output mode.
Definition at line 180 of file stm8s_gpio.c.
References GPIO_struct::ODR.