From b88160084eb65276ffb55fbced7d65ac902b64a9 Mon Sep 17 00:00:00 2001 From: xueyanhong Date: Tue, 16 Nov 2021 16:27:38 +0800 Subject: [PATCH] motor: Add pattern control mode Signed-off-by: xueyanhong --- include/nuttx/motor/motor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/nuttx/motor/motor.h b/include/nuttx/motor/motor.h index 8ec4e59741..165225316b 100644 --- a/include/nuttx/motor/motor.h +++ b/include/nuttx/motor/motor.h @@ -62,7 +62,8 @@ enum motor_opmode_e MOTOR_OPMODE_POSITION = 1, /* Position control mode */ MOTOR_OPMODE_SPEED = 2, /* Speed control mode */ MOTOR_OPMODE_TORQUE = 3, /* Torque control mode */ - MOTOR_OPMODE_FORCE = 4 /* Force control mode */ + MOTOR_OPMODE_FORCE = 4, /* Force control mode */ + MOTOR_OPMODE_PATTERN = 5 /* Pattern control mode */ }; /* Motor driver state */ @@ -209,6 +210,7 @@ struct motor_params_s #ifdef CONFIG_MOTOR_UPPER_HAVE_DECELERATION float deceleration; /* Motor deceleration */ #endif + FAR void *privdata; /* out of band data */ }; /* Motor operations used to call from the upper-half, generic motor driver