Files
F411VE-ILI9341/Core/Src/Components/PWM_Pin_STM32.hpp
2024-02-11 13:20:18 -03:00

27 lines
558 B
C++

/*
* PWM_Pin_STM32.hpp
*
* Created on: Feb 11, 2024
* Author: Gabriel
*/
#ifndef SRC_COMPONENTS_PWM_PIN_STM32_HPP_
#define SRC_COMPONENTS_PWM_PIN_STM32_HPP_
#include "main.h"
#include "PWM_Pin.hpp"
class PWM_Pin_STM32 : public PWM_Pin {
public:
PWM_Pin_STM32(TIM_HandleTypeDef* hTim, uint32_t channel);
virtual ~PWM_Pin_STM32();
int32_t init();
int32_t setDuty(float dutyCycle);
int32_t setFreq(float freq);
private:
TIM_HandleTypeDef* hTim;
uint32_t channel;
};
#endif /* SRC_COMPONENTS_PWM_PIN_STM32_HPP_ */