This commit is contained in:
2025-05-13 03:26:56 +03:00
parent 87a14db6f4
commit 154af64dde
563 changed files with 797817 additions and 0 deletions
@@ -0,0 +1,25 @@
/*
* motor.h
*
* Created on: 08 íîÿá. 2015 ã.
* Author: Sergey
*/
#ifndef SRC_MOTOR_H_
#define SRC_MOTOR_H_
#include <cstdint>
#include "stm32f1xx_hal.h"
class Motor {
public:
Motor();
void init(TIM_HandleTypeDef* timer, uint32_t channel);
void set_speed(uint8_t speed_percent);
private:
uint32_t _channel;
TIM_HandleTypeDef* _pwm_timer;
};
#endif /* SRC_MOTOR_H_ */