| | |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | | static const scpi_command_t scpi_commands[] = { |
| | | const scpi_command_t scpi_commands[] = { |
| | | /* IEEE Mandated Commands (SCPI std V1999.0 4.1.1) */ |
| | | { .pattern = "*CLS", .callback = SCPI_CoreCls,}, |
| | | { .pattern = "*ESE", .callback = SCPI_CoreEse,}, |
| | |
| | | SCPI_CMD_LIST_END |
| | | }; |
| | | |
| | | static scpi_interface_t scpi_interface = { |
| | | scpi_interface_t scpi_interface = { |
| | | .error = SCPI_Error, |
| | | .write = SCPI_Write, |
| | | .control = SCPI_Control, |
| | |
| | | .reset = SCPI_Reset, |
| | | }; |
| | | |
| | | #define SCPI_INPUT_BUFFER_LENGTH 256 |
| | | static char scpi_input_buffer[SCPI_INPUT_BUFFER_LENGTH]; |
| | | char scpi_input_buffer[SCPI_INPUT_BUFFER_LENGTH]; |
| | | int16_t scpi_error_queue_data[SCPI_ERROR_QUEUE_SIZE]; |
| | | |
| | | static scpi_reg_val_t scpi_regs[SCPI_REG_COUNT]; |
| | | |
| | | |
| | | scpi_t scpi_context = { |
| | | .cmdlist = scpi_commands, |
| | | .buffer = |
| | | { |
| | | .length = SCPI_INPUT_BUFFER_LENGTH, |
| | | .data = scpi_input_buffer, |
| | | }, |
| | | .interface = &scpi_interface, |
| | | .registers = scpi_regs, |
| | | .units = scpi_units_def, |
| | | .idn = |
| | | {"MANUFACTURE", "INSTR2013", NULL, "01-02"}, |
| | | }; |
| | | |
| | | scpi_t scpi_context; |