| | |
| | | * @param buffer |
| | | * @param interface |
| | | */ |
| | | void SCPI_Init(scpi_t * context) { |
| | | void SCPI_Init(scpi_t * context, |
| | | const scpi_command_t * commands, |
| | | scpi_interface_t * interface, |
| | | const scpi_unit_def_t * units, |
| | | const char * idn1, const char * idn2, const char * idn3, const char * idn4, |
| | | char * input_buffer, size_t input_buffer_length, |
| | | int16_t * error_queue_data, int16_t error_queue_size) { |
| | | memset(context, 0, sizeof(*context)); |
| | | context->cmdlist = commands; |
| | | context->interface = interface; |
| | | context->units = units; |
| | | context->idn[0] = idn1; |
| | | context->idn[1] = idn2; |
| | | context->idn[2] = idn3; |
| | | context->idn[3] = idn4; |
| | | context->buffer.data = input_buffer; |
| | | context->buffer.length = input_buffer_length; |
| | | context->buffer.position = 0; |
| | | SCPI_ErrorInit(context); |
| | | SCPI_ErrorInit(context, error_queue_data, error_queue_size); |
| | | } |
| | | |
| | | /** |