HPM APP
HPMicro Application solution
command_process.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024 hpmicro
3  * SPDX-License-Identifier: BSD-3-Clause
4  *
5  */
6 
7 #ifndef __COMMAND_PROCESS_H__
8 #define __COMMAND_PROCESS_H__
9 
14 #define MOTOR_COUNT 4
19 #define OP_MODE_COUNT 2
24 #define CONTROL_MODE_COUNT 2
25 
26 typedef enum{
30 typedef enum{
38 void enable_all_motor(void);
43 void disable_all_motor(void);
48 void cmd_all(void);
53 void cmd_indivdual(void);
58 void process_cmd(void);
59 
60 #endif
void cmd_all(void)
Command processing when all motors are enabled ;所有电机使能时的命令处理
Definition: command_process.c:67
void disable_all_motor(void)
Disable all motors ;禁用所有电机
Definition: command_process.c:59
motor_op_mode
Definition: command_process.h:26
@ MOTOR_DISABLE
Definition: command_process.h:27
@ MOTOR_ENABLE
Definition: command_process.h:28
void cmd_indivdual(void)
Command processing when independently controlling motors ;独立控制电机时的命令处理
Definition: command_process.c:19
motor_control_mode
Definition: command_process.h:30
@ MOTOR_CONTROL_INDEPEND
Definition: command_process.h:31
@ MOTOR_CONTROL_ALL
Definition: command_process.h:32
void process_cmd(void)
Command processing:handling commands sent by the upper computer ;命令处理:处理上位机发送的命令
Definition: command_process.c:86
void enable_all_motor(void)
Enable all motors ;使能所有电机
Definition: command_process.c:51