23 const uint32_t pwm_ch;
25 const uint32_t pwm_pin;
27 const uint32_t dir_pin;
39 void set_raw_spd (int16_t spd);
54 Mtr (
const uint32_t pwm_ch,
const uint32_t pwm_pin,
const uint32_t dir_pin);
Motor Driver for XRCU.
Definition Motors.h:20
void end()
Deactivates the motor and release the occupied resources.
Definition Motors.cpp:62
int16_t operator-=(const int16_t spd_dec)
Decreases this motor speed by spd_dec.
Definition Motors.cpp:169
int16_t get_spd()
Gets the motor speed.
Definition Motors.cpp:180
int16_t operator=(const int16_t spd)
Sets the motor to spin at a new speed, and return its motor speed after setting.
Definition Motors.cpp:161
int16_t operator--()
Decreases this motor speed by 1.
Definition Motors.cpp:176
Mtr(const uint32_t pwm_ch, const uint32_t pwm_pin, const uint32_t dir_pin)
Constructor for Mtr objects.
Definition Motors.cpp:26
int16_t operator++()
Increases this motor speed by 1.
Definition Motors.cpp:173
bool get_reverse_flag()
Gets whether the motor spinning direction is reversed when driving to the motor.
Definition Motors.cpp:67
void set_reverse_flag(bool reverse)
Sets whether the motor spinning direction is reversed when driving to the motor.
Definition Motors.cpp:71
int16_t set_spd(int16_t spd)
Sets the motor to spin at a new speed, and return its motor speed after setting.
Definition Motors.cpp:140
void begin()
Activates the motor.
Definition Motors.cpp:36
int16_t operator+=(const int16_t spd_inc)
Increases this motor speed by spd_inc.
Definition Motors.cpp:165
Supported_actuator()
Creates an object of a supported actuator.
Definition Supported_actuator.h:23