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.h
Go to the documentation of this file.
1/* This file has been prepared for Doxygen automatic documentation generation.*/
27
28#ifndef _SCPI_H_
29#define _SCPI_H_
30
31#include "scpi_helper.h"
32#include "config.h"
33
35#define MOTOR_DIRECTION_OPTIONS 2
37extern const SCPI_choice_def_t motorDirections[MOTOR_DIRECTION_OPTIONS];
39#define INPUT_SOURCE_OPTIONS 2
41extern const SCPI_choice_def_t inputSources[INPUT_SOURCE_OPTIONS];
43
45// External prototypes and (defined in main.cpp or another relevant file)
46extern void TimersInit(void);
47extern void ConfigsInit(void);
48extern volatile motorflags_t motorFlags;
49extern volatile motorconfigs_t motorConfigs;
50extern volatile faultflags_t faultFlags;
51extern volatile uint16_t lastCommutationTicks;
52extern volatile uint16_t ibus;
53extern volatile int16_t iphaseU;
54extern volatile int16_t iphaseV;
55extern volatile int16_t iphaseW;
56extern volatile uint16_t vbusVref;
57extern volatile uint8_t speedInput;
59
60// SCPI Parser Instance
62
63// Function Prototypes
64void ScpiInit(void);
65void ScpiInput(Stream &interface);
66
302
303#endif // _SCPI_H_
SCPI Parser class.
Definition scpi_parser.h:55
Motor config header file.
struct motorflags motorflags_t
Collection of all motor control flags.
struct motorconfigs motorconfigs_t
Collection of motor configurations.
struct faultflags faultflags_t
Collection of all fault flags.
volatile uint16_t vbusVref
VBUS voltage measurement (Register Value)
Definition main.ino:255
volatile uint8_t speedInput
The most recent "speed" input measurement.
Definition main.ino:101
volatile uint16_t ibus
Hi-side Current (IBUS) measurement (Register Value).
Definition main.ino:137
volatile motorconfigs_t motorConfigs
Motor Configs.
Definition main.ino:66
volatile int16_t iphaseW
In-line Phase W current current measurement (Register Value).
Definition main.ino:226
volatile uint16_t lastCommutationTicks
The number of 'ticks' between two hall sensor changes (store).
Definition main.ino:94
void TimersInit(void)
Initializes and synchronizes Timers.
Definition main.ino:457
volatile int16_t iphaseU
In-line Phase U current current measurement (Register Value).
Definition main.ino:167
static void ConfigsInit(void)
Initializes motorConfigs.
Definition main.ino:368
volatile int16_t iphaseV
In-line Phase V current current measurement (Register Value).
Definition main.ino:196
const SCPI_choice_def_t inputSources[2]
Array defining the possible input sources for speed/duty cycle control.
Definition scpi.cpp:667
SCPI_Parser scpiParser
Speed input source options array.
Definition scpi.cpp:62
const SCPI_choice_def_t motorDirections[2]
Array defining the possible motor directions for SCPI commands.
Definition scpi.cpp:654
#define INPUT_SOURCE_OPTIONS
Motor direction options array.
Definition scpi.h:39
#define MOTOR_DIRECTION_OPTIONS
Motor direction options array.
Definition scpi.h:35
void ScpiInput(Stream &interface)
Processes incoming data from a serial interface for SCPI commands.
Definition scpi.cpp:124
void ScpiInit(void)
Initializes the SCPI command parser and registers all supported commands.
Definition scpi.cpp:71
SCPI helper header file.