8#ifndef INC_MOTOR_DRIVER_H_
9#define INC_MOTOR_DRIVER_H_
24#include <stm32f4xx_hal.h>
void motor_disable(motor_t *p_mot)
Disables PWM output to the motor.
Definition motor_driver.c:28
void motor_set_duty(motor_t *p_mot, int32_t duty)
Sets the PWM duty cycle to control motor speed and direction.
Definition motor_driver.c:41
void motor_enable(motor_t *p_mot)
Enables PWM output to the motor by starting both channels.
Definition motor_driver.c:18
Struct representing a DC motor controlled by two PWM channels.
Definition motor_driver.h:31
TIM_HandleTypeDef * htim
Definition motor_driver.h:33
uint32_t ch_B
Definition motor_driver.h:35
uint32_t ch_A
Definition motor_driver.h:34
int32_t duty
Definition motor_driver.h:32