motor_driver_params.h File Reference

Default configuration for motor driver. More...

Detailed Description

Default configuration for motor driver.

Author
Gilles DOFFE g.dof.nosp@m.fe@g.nosp@m.mail..nosp@m.com

Definition in file motor_driver_params.h.

#include "board.h"
#include "motor_driver.h"
#include "saul_reg.h"
+ Include dependency graph for motor_driver_params.h:

Go to the source code of this file.

Variables

static const motor_driver_params_t motor_driver_params []
 MOTOR_DRIVER configuration. More...
 
static const saul_reg_info_t motor_driver_saul_info []
 Additional meta information to keep in the SAUL registry. More...
 

Set default configuration parameters for motor_driver

#define MOTOR_DRIVER_PARAM_MODE   MOTOR_DRIVER_1_DIR
 Default motor driver mode.
 
#define MOTOR_DRIVER_PARAM_BRAKE_INVERTED   false
 Default brake level.
 
#define MOTOR_DRIVER_PARAM_ENABLE_INVERTED   false
 Default enable level.
 
#define MOTOR_DRIVER_PARAM_PWM   0
 Default PWM device.
 
#define MOTOR_DRIVER_PARAM_PWM_MODE   PWM_LEFT
 Default PWM mode.
 
#define MOTOR_DRIVER_PARAM_PWM_FREQUENCY   20000U
 Default PWM frequency.
 
#define MOTOR_DRIVER_PARAM_PWM_RESOLUTION   100U
 Default PWM resolution.
 
#define MOTOR_DRIVER_PARAM_NB_MOTORS   2U
 Default number of motors.
 
#define MOTOR_DRIVER_PARAM_MOTOR_SET_POST_CALLBACK   NULL
 Default callback called at end of motor_set()
 
#define MOTOR_DRIVER_PARAM_MOTOR1_PWM_CHANNEL   1U
 Default motor 1 PWM channel.
 
#define MOTOR_DRIVER_PARAM_MOTOR1_GPIO_ENABLE   GPIO_UNDEF
 Default motor 1 enable GPIO.
 
#define MOTOR_DRIVER_PARAM_MOTOR1_GPIO_DIR0   GPIO_UNDEF
 Default motor 1 direction GPIO.
 
#define MOTOR_DRIVER_PARAM_MOTOR1_GPIO_DIR1_OR_BRAKE   GPIO_UNDEF
 Default motor 1 direction or brake GPIO.
 
#define MOTOR_DRIVER_PARAM_MOTOR1_GPIO_DIR_REVERSE   0
 Default motor 1 direction GPIO(s) reverse.
 
#define MOTOR_DRIVER_PARAM_MOTOR2_PWM_CHANNEL   2U
 Default motor 2 PWM channel.
 
#define MOTOR_DRIVER_PARAM_MOTOR2_GPIO_ENABLE   GPIO_UNDEF
 Default motor 2 enable GPIO.
 
#define MOTOR_DRIVER_PARAM_MOTOR2_GPIO_DIR0   GPIO_UNDEF
 Default motor 2 direction GPIO.
 
#define MOTOR_DRIVER_PARAM_MOTOR2_GPIO_DIR1_OR_BRAKE   GPIO_UNDEF
 Default motor 2 direction or brake GPIO.
 
#define MOTOR_DRIVER_PARAM_MOTOR2_GPIO_DIR_REVERSE   0
 Default motor 2 direction GPIO(s) reverse.
 
#define MOTOR_DRIVER_PARAMS
 Default motor driver parameters. More...
 
#define MOTOR_DRIVER_SAUL_INFO   { .name = "motor_driver" }
 SAUL information.
 

Macro Definition Documentation

◆ MOTOR_DRIVER_PARAMS

#define MOTOR_DRIVER_PARAMS
Value:
{ \
.pwm_dev = MOTOR_DRIVER_PARAM_PWM, \
.pwm_resolution = MOTOR_DRIVER_PARAM_PWM_RESOLUTION, \
.brake_inverted = MOTOR_DRIVER_PARAM_BRAKE_INVERTED, \
.enable_inverted = MOTOR_DRIVER_PARAM_ENABLE_INVERTED, \
.motors = { \
{ \
}, \
{ \
} \
}, \
}
#define MOTOR_DRIVER_PARAM_MOTOR2_PWM_CHANNEL
Default motor 2 PWM channel.
#define MOTOR_DRIVER_PARAM_PWM_RESOLUTION
Default PWM resolution.
#define MOTOR_DRIVER_PARAM_MOTOR2_GPIO_DIR1_OR_BRAKE
Default motor 2 direction or brake GPIO.
#define MOTOR_DRIVER_PARAM_MOTOR1_GPIO_DIR1_OR_BRAKE
Default motor 1 direction or brake GPIO.
#define MOTOR_DRIVER_PARAM_MOTOR2_GPIO_ENABLE
Default motor 2 enable GPIO.
#define MOTOR_DRIVER_PARAM_MOTOR1_GPIO_DIR_REVERSE
Default motor 1 direction GPIO(s) reverse.
#define MOTOR_DRIVER_PARAM_MOTOR1_GPIO_DIR0
Default motor 1 direction GPIO.
#define MOTOR_DRIVER_PARAM_MOTOR1_PWM_CHANNEL
Default motor 1 PWM channel.
#define MOTOR_DRIVER_PARAM_PWM
Default PWM device.
#define MOTOR_DRIVER_PARAM_PWM_MODE
Default PWM mode.
#define MOTOR_DRIVER_PARAM_MOTOR1_GPIO_ENABLE
Default motor 1 enable GPIO.
#define MOTOR_DRIVER_PARAM_BRAKE_INVERTED
Default brake level.
#define MOTOR_DRIVER_PARAM_PWM_FREQUENCY
Default PWM frequency.
#define MOTOR_DRIVER_PARAM_MODE
Default motor driver mode.
#define MOTOR_DRIVER_PARAM_MOTOR_SET_POST_CALLBACK
Default callback called at end of motor_set()
#define MOTOR_DRIVER_PARAM_NB_MOTORS
Default number of motors.
#define MOTOR_DRIVER_PARAM_ENABLE_INVERTED
Default enable level.
#define MOTOR_DRIVER_PARAM_MOTOR2_GPIO_DIR0
Default motor 2 direction GPIO.
#define MOTOR_DRIVER_PARAM_MOTOR2_GPIO_DIR_REVERSE
Default motor 2 direction GPIO(s) reverse.

Default motor driver parameters.

Definition at line 115 of file motor_driver_params.h.

Variable Documentation

◆ motor_driver_params

const motor_driver_params_t motor_driver_params[]
static
Initial value:
=
{
}
#define MOTOR_DRIVER_PARAMS
Default motor driver parameters.

MOTOR_DRIVER configuration.

Definition at line 155 of file motor_driver_params.h.

◆ motor_driver_saul_info

const saul_reg_info_t motor_driver_saul_info[]
static
Initial value:
=
{
}
#define MOTOR_DRIVER_SAUL_INFO
SAUL information.

Additional meta information to keep in the SAUL registry.

Definition at line 163 of file motor_driver_params.h.