All modules and core of the app was created
This commit is contained in:
22
Motor/BrushedMotor.cpp
Normal file
22
Motor/BrushedMotor.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "BrushedMotor.hpp"
|
||||
|
||||
BrushedMotor::BrushedMotor(uint32_t PwmAGpioNum, uint32_t PwmBGpioNum, uint32_t PwmFreqHz,
|
||||
uint32_t McpwmResolutionHz, int McpwmGroupId) {}
|
||||
|
||||
void BrushedMotor::enable() {}
|
||||
|
||||
void BrushedMotor::disable() {}
|
||||
|
||||
void BrushedMotor::setDuty(uint16_t duty) {}
|
||||
|
||||
uint16_t BrushedMotor::maxDuty() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void BrushedMotor::forward() {}
|
||||
|
||||
void BrushedMotor::reverse() {}
|
||||
|
||||
void BrushedMotor::coast() {}
|
||||
|
||||
void BrushedMotor::brake() {}
|
||||
29
Motor/BrushedMotor.hpp
Normal file
29
Motor/BrushedMotor.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include <stdint.h>
|
||||
|
||||
// TODO: implement class
|
||||
|
||||
class BrushedMotor {
|
||||
/* Driver for native MCPWM controller. */
|
||||
// TODO: define default values
|
||||
public:
|
||||
BrushedMotor(uint32_t PwmAGpioNum, uint32_t PwmBGpioNum, uint32_t PwmFreqHz,
|
||||
uint32_t McpwmResolutionHz, int McpwmGroupId = 0);
|
||||
void setDuty(uint16_t duty);
|
||||
uint16_t maxDuty();
|
||||
void enable();
|
||||
void disable();
|
||||
void forward();
|
||||
void reverse();
|
||||
void coast();
|
||||
void brake();
|
||||
|
||||
protected:
|
||||
/* MCPWM group */
|
||||
int _mcpwmGroupId = 0;
|
||||
uint32_t _mcpwmResolutionHz;
|
||||
|
||||
/* Brushed motor properties */
|
||||
uint32_t _pwmAGpioNum;
|
||||
uint32_t _pwmBGpioNum;
|
||||
uint32_t _pwmFreqHz;
|
||||
};
|
||||
Reference in New Issue
Block a user