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 143 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 rotation direction.
 
gpio_t gpio_dir1_or_brake
 GPIO to control rotation direction.
 
uint8_t gpio_dir_reverse
 flag to reverse direction
 
uint8_t gpio_enable_invert
 flag to set enable GPIO inverted mode
 
uint8_t gpio_brake_invert
 flag to make brake active low
 

Field Documentation

◆ gpio_brake_invert

uint8_t motor_t::gpio_brake_invert

flag to make brake active low

Definition at line 150 of file motor_driver.h.

◆ gpio_dir0

gpio_t motor_t::gpio_dir0

GPIO to control rotation direction.

Definition at line 146 of file motor_driver.h.

◆ gpio_dir1_or_brake

gpio_t motor_t::gpio_dir1_or_brake

GPIO to control rotation direction.

Definition at line 147 of file motor_driver.h.

◆ gpio_dir_reverse

uint8_t motor_t::gpio_dir_reverse

flag to reverse direction

Definition at line 148 of file motor_driver.h.

◆ gpio_enable

gpio_t motor_t::gpio_enable

GPIO to enable/disable motor.

Definition at line 145 of file motor_driver.h.

◆ gpio_enable_invert

uint8_t motor_t::gpio_enable_invert

flag to set enable GPIO inverted mode

Definition at line 149 of file motor_driver.h.

◆ pwm_channel

int motor_t::pwm_channel

PWM channel the motor is connected to.

Definition at line 144 of file motor_driver.h.


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