Loading...
Searching...
No Matches
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. More...
 
   gpio_t   gpio_brake 
 GPIO to control brake. More...
 
};  
 
bool gpio_dir_reverse
 flag to reverse direction
 

Field Documentation

◆ gpio_brake

gpio_t motor_t::gpio_brake

GPIO to control brake.

Definition at line 135 of file motor_driver.h.

◆ gpio_dir0

gpio_t motor_t::gpio_dir0

GPIO to control direction.

Definition at line 132 of file motor_driver.h.

◆ gpio_dir1

gpio_t motor_t::gpio_dir1

GPIO to control direction.

Definition at line 134 of file motor_driver.h.

◆ gpio_dir_reverse

bool motor_t::gpio_dir_reverse

flag to reverse direction

Definition at line 137 of file motor_driver.h.

◆ gpio_enable

gpio_t motor_t::gpio_enable

GPIO to enable/disable motor.

Definition at line 131 of file motor_driver.h.

◆ pwm_channel

int motor_t::pwm_channel

PWM channel the motor is connected to.

Definition at line 130 of file motor_driver.h.


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