Motor Driver Evaluation Kit NEVB-MTR1-t01-1.0.0
Firmware for NEVB-MTR1-KIT1 for trapezoidal control of BLDC motors using Hall-effect sensors
Loading...
Searching...
No Matches
scpi_helper.h
Go to the documentation of this file.
1/* This file has been prepared for Doxygen automatic documentation generation.*/
23
24#ifndef _SCPI_HELPER_H_
25#define _SCPI_HELPER_H_
26
27#include "config.h"
28#include "scpi_parser.h"
29
38typedef struct _SCPI_choice_def_t
39{
40 String stem;
41 String suffix;
42 int8_t tag;
43} SCPI_choice_def_t;
44
45// Prototypes
46uint8_t ScpiParamString(SCPI_P &parameters, String &param);
47uint8_t ScpiParamUInt8(SCPI_P &parameters, uint8_t &param);
48uint8_t ScpiParamUInt32(SCPI_P &parameters, uint32_t &param);
49uint8_t ScpiParamDouble(SCPI_P &parameters, double &param);
50uint8_t ScpiParamBool(SCPI_P &parameters, bool &param);
51uint8_t ScpiParamInt8(SCPI_P &parameters, int8_t &param);
52uint8_t ScpiParamChoice(SCPI_P &parameters, const SCPI_choice_def_t *options, size_t optionsSize, uint8_t &param);
53uint8_t ScpiChoiceToName(const SCPI_choice_def_t *options, size_t optionsSize, int8_t value, String &name);
54
55#endif // _SCPI_HELPER_H_
Motor config header file.
uint8_t ScpiParamChoice(SCPI_P &parameters, const SCPI_choice_def_t *options, size_t optionsSize, uint8_t &param)
Extracts a choice parameter from the SCPI parameter list and maps it to a numerical tag.
uint8_t ScpiParamBool(SCPI_P &parameters, bool &param)
Extracts a boolean parameter ('ON', '1', 'OFF', or '0') from the SCPI parameter list.
uint8_t ScpiParamUInt8(SCPI_P &parameters, uint8_t &param)
Extracts an unsigned 8-bit integer parameter from the SCPI parameter list.
uint8_t ScpiParamUInt32(SCPI_P &parameters, uint32_t &param)
Extracts an unsigned 32-bit integer parameter from the SCPI parameter list.
uint8_t ScpiParamDouble(SCPI_P &parameters, double &param)
Extracts a double-precision floating-point parameter from the SCPI parameter list.
uint8_t ScpiChoiceToName(const SCPI_choice_def_t *options, size_t optionsSize, int8_t value, String &name)
Converts a numerical choice tag back to its string representation.
uint8_t ScpiParamString(SCPI_P &parameters, String &param)
Extracts a string parameter from the SCPI parameter list.
SCPI parser header file.
SCPI_Parameters SCPI_P
Alias for SCPI_Parameters.
Definition scpi_types.h:106
Defines a structure for SCPI choice options.
Definition scpi_helper.h:39