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);
Mtr & mtr2
The Motor at Port M2.
Mtr mtrs[4]
The Motors at M-Ports.
Mtr & mtr4
The Motor at Port M4.
Mtr & mtr3
The Motor at Port M3.
Mtr & mtr1
The Motor at Port M1.
Motor Driver for XRCU.
Definition Motors.h:20
void end()
Deactivates the motor and release the occupied resources.
int16_t operator-=(const int16_t spd_dec)
Decreases this motor speed by spd_dec.
int16_t get_spd()
Gets the motor speed.
int16_t operator=(const int16_t spd)
Sets the motor to spin at a new speed, and return its motor speed after setting.
int16_t operator--()
Decreases this motor speed by 1.
Mtr(const uint32_t pwm_ch, const uint32_t pwm_pin, const uint32_t dir_pin)
Constructor for Mtr objects.
int16_t operator++()
Increases this motor speed by 1.
bool get_reverse_flag()
Gets whether the motor spinning direction is reversed when driving to the motor.
void set_reverse_flag(bool reverse)
Sets whether the motor spinning direction is reversed when driving to the motor.
int16_t set_spd(int16_t spd)
Sets the motor to spin at a new speed, and return its motor speed after setting.
void begin()
Activates the motor.
int16_t operator+=(const int16_t spd_inc)
Increases this motor speed by spd_inc.
Supported_actuator()
Creates an object of a supported actuator.
Definition Supported_actuator.h:23