ME 507 Romi++
Cylindrical Differential Drive Robot created for ME 507 at Cal Poly in Spring 2025
Loading...
Searching...
No Matches
motor_t Struct Reference

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

Detailed Description

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.

Member Data Documentation

◆ ch_A

uint32_t motor_t::ch_A

Timer channel A for one motor lead

◆ ch_B

uint32_t motor_t::ch_B

Timer channel B for the other motor lead

◆ duty

int32_t motor_t::duty

Signed duty cycle value (-100% to +100%) scaled to timer period

◆ htim

TIM_HandleTypeDef* motor_t::htim

Pointer to the timer used for PWM generation


The documentation for this struct was generated from the following file: