fsfw/src/fsfw_hal/stm32h7/definitions.h

27 lines
597 B
C
Raw Normal View History

2021-10-27 18:05:18 +02:00
#ifndef FSFW_HAL_STM32H7_DEFINITIONS_H_
#define FSFW_HAL_STM32H7_DEFINITIONS_H_
#include <utility>
2022-02-02 10:29:30 +01:00
2021-10-27 18:05:18 +02:00
#include "stm32h7xx.h"
namespace stm32h7 {
/**
* Typedef for STM32 GPIO pair where the first entry is the port used (e.g. GPIOA)
* and the second entry is the pin number
*/
struct GpioCfg {
2022-02-02 10:29:30 +01:00
GpioCfg() : port(nullptr), pin(0), altFnc(0){};
2021-10-27 18:05:18 +02:00
2022-02-02 10:29:30 +01:00
GpioCfg(GPIO_TypeDef* port, uint16_t pin, uint8_t altFnc = 0)
: port(port), pin(pin), altFnc(altFnc){};
GPIO_TypeDef* port;
uint16_t pin;
uint8_t altFnc;
2021-10-27 18:05:18 +02:00
};
2022-02-02 10:29:30 +01:00
} // namespace stm32h7
2021-10-27 18:05:18 +02:00
#endif /* #ifndef FSFW_HAL_STM32H7_DEFINITIONS_H_ */