ME 507 Romi++
Cylindrical Differential Drive Robot created for ME 507 at Cal Poly in Spring 2025
|
Struct representing a DC motor controlled by two PWM channels. More...
#include <motor_driver.h>
Public Attributes | |
int32_t | duty |
TIM_HandleTypeDef * | htim |
uint32_t | ch_A |
uint32_t | ch_B |
Struct representing a DC motor controlled by two PWM channels.
Stores duty cycle, timer handle, and output channels used to set motor speed and direction.
uint32_t motor_t::ch_A |
Timer channel A for one motor lead
uint32_t motor_t::ch_B |
Timer channel B for the other motor lead
int32_t motor_t::duty |
Signed duty cycle value (-100% to +100%) scaled to timer period
TIM_HandleTypeDef* motor_t::htim |
Pointer to the timer used for PWM generation