GPIO#
This module provides a low-level interface to the Leaderboard’s GPIO ports, intended for switches and some lights. The code is fairly straightforward, and only slightly simplifies the Minions Driver.
- group BSP_GPIO
Enums
Functions
-
void BSP_GPIO_Init(port_t port, uint16_t mask, direction_t direction, bool pull_down)#
Initializes a GPIO port.
- Parameters:
port – - port to initialize
mask – - pins
direction – - input or output
- Returns:
None
-
uint16_t BSP_GPIO_Read(port_t port)#
Reads value of the specified port.
- Parameters:
port – to read
- Returns:
data of the port
-
void BSP_GPIO_Write(port_t port, uint16_t data)#
Writes data to a specified port.
- Parameters:
port – port to write to
data – data to write
- Returns:
None
-
uint8_t BSP_GPIO_Read_Pin(port_t port, uint16_t pinmask)#
Reads data from a specified pin (not applicalbe to output pins)
Reads data from a specified pin (not applicalbe to output pins)
- Parameters:
port – The port to read from
pinmask – Mask from stm header file that says which pin to read from
port – The port to read from
pin – The pin to read from
- Returns:
State of the pin
- Returns:
State of the pin
-
void BSP_GPIO_Write_Pin(port_t port, uint16_t pinmask, bool state)#
Writes data to a specified pin.
- Parameters:
port – The port to write to
pinmask – Mask from stm header file that says which pin to write too
state – true=ON or false=OFF
port – The port to write to
pin – The pin to write to
state – true=ON or false=OFF
- Returns:
None
- Returns:
None
-
void BSP_GPIO_Init(port_t port, uint16_t mask, direction_t direction, bool pull_down)#