Smart Knob Controller
Main Page
Classes
Files
File List
File Members
gpio.h
1
/*
2
* gpio.h
3
*
4
* Created on: Jun 4, 2025
5
* Author: nickl
6
*
7
*/
8
9
#ifndef INC_GPIO_H_
10
#define INC_GPIO_H_
11
12
#include "stm32f4xx_hal.h"
13
17
class
GPIO
{
18
public
:
24
GPIO
(GPIO_TypeDef* port, uint16_t pin);
25
30
void
write
(GPIO_PinState state)
const
;
32
void
high
()
const
;
34
void
low
()
const
;
35
36
private
:
37
GPIO_TypeDef* port;
38
uint16_t pin;
39
};
40
41
#endif
/* INC_GPIO_H_ */
GPIO::low
void low() const
Sets the GPIO pin low.
Definition
gpio.cpp:24
GPIO::write
void write(GPIO_PinState state) const
Writes a logic level to the GPIO pin.
Definition
gpio.cpp:16
GPIO::high
void high() const
Sets the GPIO pin high.
Definition
gpio.cpp:20
GPIO::GPIO
GPIO(GPIO_TypeDef *port, uint16_t pin)
Constructs a GPIO object.
Definition
gpio.cpp:12
DoxCommd
gpio.h
Generated by
1.14.0