10#ifndef SEMF_HARDWAREABSTRACTION_STM32_STM32GPIO_H_
11#define SEMF_HARDWAREABSTRACTION_STM32_STM32GPIO_H_
35 void reset()
override;
36 bool state()
const override;
49 GPIO_TypeDef*
port()
const;
Interface class for using a GPIO pin of the microcontroller.
Gpio implementation for STM32.
GPIO_TypeDef * port() const
Returns the GPIO handler.
uint16_t pinNumberToIOPosition(uint16_t pin) const
Returns the io position based on the pin number.
Stm32Gpio(GPIO_TypeDef *port, uint16_t pin)
Constructor.
virtual ~Stm32Gpio()=default
void setPullUpPullDown(PullUpPullDown pullUpPullDown) override
Sets the pullup or pulldown setting of a GPIO.
PullUpPullDown pullUpPullDown() const override
Returns the pullup or pulldown setting of a GPIO.
uint16_t pin() const
Returns pin number.
Stm32Gpio(const Stm32Gpio &other)=delete
bool state() const override
Returns the current state of the pin.
Direction direction() const override
Returns the direction setting of a GPIO.
void setDirection(Direction direction) override
Sets the direction of a GPIO.