20#ifndef INC_CMD_PROCESSING_DEF_H_
21#define INC_CMD_PROCESSING_DEF_H_
25#define CMD_BUFFER_LEN 256
28#define PULSE_LEN_MIN 100
31#define PULSE_LEN_MAX 1000
37#define TURN_ANGLE_MIN 10
40#define TURN_ANGLE_MAX 90
43#define HOME_ANGLE_MIN -180
46#define HOME_ANGLE_MAX 180
static void process_cmd(char *cmd, uint32_t *p_reg)
Executes the corresponding commands are stores the result in the command register.
static void process_cmd_read(char *cmd)
Sends sensors data based on the command.
static void process_cmd_turn(char *cmd, uint32_t *p_reg)
Triggers a rotation by a defined angle.
static void process_cmd_ncmd(char *cmd, uint32_t *p_reg)
Reserved.
static void process_cmd_autoread(char *cmd, uint32_t *p_reg)
Enables and disables autoread.
static void process_cmd_set_read(char *cmd, uint32_t *p_reg)
Enables turn on/off autoreport from these sensors.
static void process_cmd_home(uint32_t *p_reg)
Triggers a home command.
static void process_cmd_set_time(char *cmd)
Allows adjusting the valve-opening time settings.
static void process_cmd_set(char *cmd, uint32_t *p_reg)
Allows modifying the settings global variable and changing the contents of the autoread report.
static void process_cmd_set_angle(char *cmd)
Allows setting the rotation angle for the TURN command.
static void process_cmd_set_auto(char *cmd)
Enables change the period of autoreading.
static void process_cmd_reset(uint32_t *p_reg)
Clears command register. Closes valves.
static void process_cmd_set_home(char *cmd)
Allows setting the default orientation for the HOME command.
static void process_cmd_pulse(char *cmd, uint32_t *p_reg)
Triggers a pulse with a defined duration.