motor_t Struct Reference

Describe DC motor with PWM channel and GPIOs. More...

Detailed Description

Describe DC motor with PWM channel and GPIOs.

Definition at line 129 of file motor_driver.h.

#include <motor_driver.h>

Data Fields

int pwm_channel
 PWM channel the motor is connected to.
 
gpio_t gpio_enable
 GPIO to enable/disable motor.
 
gpio_t gpio_dir0
 GPIO to control direction.
 
union {
   gpio_t   gpio_dir1
 GPIO to control direction.
 
   gpio_t   gpio_brake
 GPIO to control brake.
 
}; 
 
bool gpio_dir_reverse
 flag to reverse direction
 

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