34#define __AVR_ATmega32U4__ 1
40#include "src/SCPI_Parser/SCPI_Parser.h"
47#define SCPI_INPUT_BUFFER_LENGTH 64
50#define SCPI_ERROR_QUEUE_SIZE 4
53#define SCPI_IDN1 "NEXPERIA"
55#define SCPI_IDN2 "NEVB-MCTRL-100-xx"
59#define SCPI_IDN4 "NEVC-MCTRL-100-t01-1.0.0"
71extern volatile uint16_t
current;
82size_t SCPI_Write(scpi_t *context,
const char *data,
size_t len);
83int SCPI_Error(scpi_t *context, int_fast16_t err);
84scpi_result_t
SCPI_Control(scpi_t *context, scpi_ctrl_name_t ctrl, scpi_reg_val_t val);
Motor control header file.
scpi_interface_t scpi_interface
SCPI interface structure.
scpi_result_t SCPI_Reset(scpi_t *context)
Resets the SCPI context.
scpi_result_t SCPI_Control(scpi_t *context, scpi_ctrl_name_t ctrl, scpi_reg_val_t val)
Handles control messages for the SCPI interface (dummy)
volatile motorflags_t motorFlags
Motor control flags placed in I/O space for fast access.
scpi_error_t scpi_error_queue_data[]
SCPI error queue data array.
volatile uint8_t speedInput
The most recent "speed" input measurement.
const scpi_command_t scpi_commands[]
Array of SCPI commands.
volatile motorconfigs_t motorConfigs
Motor Configs.
size_t SCPI_Write(scpi_t *context, const char *data, size_t len)
Writes data to the SCPI interface.
volatile uint16_t current
Current measurement (Register Value).
int SCPI_Error(scpi_t *context, int_fast16_t err)
Handles SCPI errors and outputs them to the Serial interface.
void ConfigsInit(void)
Initializes motorConfigs.
volatile faultflags_t faultFlags
Fault flags placed in I/O space for fast access.
char scpi_input_buffer[]
SCPI input buffer.
volatile uint16_t lastCommutationTicks
The number of 'ticks' between two hall sensor changes (store).
void TimersInit(void)
Initializes and synchronizes Timers.
scpi_t scpi_context
SCPI context structure.
scpi_result_t SCPI_Flush(scpi_t *context)
Flushes the Serial interface buffer.
volatile uint16_t gateVref
Gate voltage measurement (Register Value)
Collection of all fault flags.
Collection of motor configurations.
Collection of all motor control flags.