25#ifndef MCPWM_INTERFACE_H
26#define MCPWM_INTERFACE_H
esp_err_t motor_new_mcpwm_device(const motor_config_t *motor_config, const motor_mcpwm_config_t *mcpwm_config, motor_t **ret_motor)
Create Motor based on MCPWM peripheral.
Definition: mcpwm_interface.c:110
struct motor_t * motor_handle_t
Definition: mcpwm_interface.h:36
Motor Configuration.
Definition: mcpwm_interface.h:108
uint32_t pwm_freq_hz
Definition: mcpwm_interface.h:111
uint32_t pwma_gpio_num
Definition: mcpwm_interface.h:109
uint32_t pwmb_gpio_num
Definition: mcpwm_interface.h:110
Motor MCPWM specific configuration.
Definition: mcpwm_interface.h:117
int group_id
Definition: mcpwm_interface.h:118
uint32_t resolution_hz
Definition: mcpwm_interface.h:119
Definition: mcpwm_interface.h:38
esp_err_t(* forward)(motor_t *motor)
Set direction of motor to forward.
Definition: mcpwm_interface.h:75
esp_err_t(* brake)(motor_t *motor)
Brake motor.
Definition: mcpwm_interface.h:93
esp_err_t(* disable)(motor_t *motor)
Disable motor.
Definition: mcpwm_interface.h:56
esp_err_t(* enable)(motor_t *motor)
Enable motor.
Definition: mcpwm_interface.h:47
esp_err_t(* backwards)(motor_t *motor)
Set direction of motor to backwards.
Definition: mcpwm_interface.h:84
esp_err_t(* set_speed)(motor_t *motor, uint32_t speed)
Set motor speed.
Definition: mcpwm_interface.h:66
esp_err_t(* del)(motor_t *motor)
Delete motor object.
Definition: mcpwm_interface.h:102