j123b567 / scpi-parser

Open Source SCPI device library
BSD 2-Clause "Simplified" License
463 stars 194 forks source link

Add support for run-time configuration of the user errors and line en… #154

Closed eniv closed 5 months ago

eniv commented 11 months ago

This pull request introduces run-time configuration of the line ending and user errors. Run-time configuration is valuable when compiling the library as an independent archive or shared object and linking against it from different applications.

Minor modifications are applied to _scpi_interface_t in order to allow run time configuration, however, legacy compile time configuration is maintained using the following two macros (in scpi_user_config.h):

eniv commented 11 months ago

I am not using the new feature for custom registers, but I think it would make sense to allow run time configuration there as well.