|
STM32 Blue Pill Drivers
Drivers that could be used to interface and interact with STM32F103C8T6 Microcontroller
|
This file contains the implementation for the GPIO module. More...
#include "../../LIB/LSTD_TYPES.h"#include "../../LIB/LSTD_COMPILER.h"#include "../../LIB/LSTD_BITMATH.h"#include "../../LIB/LSTD_VALUES.h"#include "GPIO_private.h"#include "GPIO_interface.h"#include "GPIO_config.h"
Include dependency graph for GPIO_program.c:Macros | |
| #define | IS_PIN_IN_LOW_REGISTER(GPIO_PIN) (GPIO_PIN <= GPIO_Pins_7) |
| Check if the pin is in the low register. More... | |
Functions | |
| static void | GPIO_vGetPortAddress (t_GPIO_Ports tPort, t_GPIOx_RegisterMap **ppu32PortBaseAddress) |
| This function gets the base address of a GPIO port. More... | |
| static t_u8 | GPIO_vGetPinSpan (t_GPIO_Pins tPin) |
| This function gets the pin span. More... | |
| static void | GPIO_vSetPinInputTypePullUpDown (t_GPIOx_RegisterMap *pu32PortBaseAddress, t_GPIO_Pins tPin, t_GPIO_Input_Type tInputType) |
| This function is used to set the pin input type. More... | |
| void | GPIO_vSetPinDirection (t_GPIO_Ports tPort, t_GPIO_Pins tPin, t_GPIO_Direction tDirection) |
| This function is used to set the direction of a GPIO pin. More... | |
| void | GPIO_vSetPinInputType (t_GPIO_Ports tPort, t_GPIO_Pins tPin, t_GPIO_Input_Type tInputType) |
| This function is used to set the input type of a GPIO pin. More... | |
| void | GPIO_vSetPinOutputType (t_GPIO_Ports tPort, t_GPIO_Pins tPin, t_GPIO_Output_Type tOutputType) |
| This function is used to set the output type of a GPIO pin. More... | |
| void | GPIO_vSetPinValue (t_GPIO_Ports tPort, t_GPIO_Pins tPin, t_GPIO_Value tValue) |
| This function is used to set the value of a GPIO pin. More... | |
| t_GPIO_Value | GPIO_tGetPinValue (t_GPIO_Ports tPort, t_GPIO_Pins tPin) |
| This function is used to get the value of a GPIO pin. More... | |
This file contains the implementation for the GPIO module.
This file contains the implementation for the GPIO module.
| #define IS_PIN_IN_LOW_REGISTER | ( | GPIO_PIN | ) | (GPIO_PIN <= GPIO_Pins_7) |
Check if the pin is in the low register.
This macro checks if the pin is in the low register (CRL)
| [in] | GPIO_PIN | The pin to check if it is in the low register (CRL) or not |
|
static |
This function gets the base address of a GPIO port.
This function gets the base address of a GPIO port
| [in] | tPort | The GPIO port to get its base address |
| [out] | ppu32PortBaseAddress | The base address of the GPIO port |
References GPIO_A, GPIO_B, GPIO_C, GPIO_D, GPIO_E, GPIO_F, GPIO_G, GPIO_Ports_A, GPIO_Ports_B, GPIO_Ports_C, GPIO_Ports_D, GPIO_Ports_E, GPIO_Ports_F, GPIO_Ports_G, NULL, P2VAR, and VOLATILE.
Referenced by GPIO_tGetPinValue(), GPIO_vSetPinDirection(), GPIO_vSetPinInputType(), GPIO_vSetPinOutputType(), and GPIO_vSetPinValue().
Here is the caller graph for this function:
|
static |
This function gets the pin span.
This function gets the pin span, which is the number of bits to shift to reach the target pin mode and configuration bits
| [in] | tPin | The target pin |
References GPIO_Pins_7, GPIO_Pins_8, and PIN_SHIFT_VALUE.
Referenced by GPIO_vSetPinDirection(), GPIO_vSetPinInputType(), and GPIO_vSetPinOutputType().
Here is the caller graph for this function:
|
static |
This function is used to set the pin input type.
This function is used to set the pin input type in case of it is pull-up or pull-down in the ODR register
| [in] | pu32PortBaseAddress | The base address of the GPIO port |
| [in] | tPin | The target pin |
| [in] | tInputType | The input type of the target pin (pull-up or pull-down) |
References GET_BIT, GPIO_Input_Type_Pull_Down, t_GPIOx_RegisterMap::ODR, and PIN_RESET_ODR_MASK.
Referenced by GPIO_vSetPinInputType().
Here is the caller graph for this function: