diff --git a/libscpi/inc/scpi/config.h b/libscpi/inc/scpi/config.h index 85cd07f4..94bf67d7 100644 --- a/libscpi/inc/scpi/config.h +++ b/libscpi/inc/scpi/config.h @@ -199,8 +199,10 @@ extern "C" { /* PIC32mx */ #if defined(__C32__) #define HAVE_STRNLEN 0 -#define HAVE_STRNCASECMP 1 +#define HAVE_STRNCASECMP 0 #define HAVE_STRNICMP 0 +#define isfinite finite +#define signbit(x) ((x)<0) #endif /* AVR libc */ diff --git a/libscpi/src/error.c b/libscpi/src/error.c index bc370a91..fedf7952 100644 --- a/libscpi/src/error.c +++ b/libscpi/src/error.c @@ -134,7 +134,7 @@ static scpi_bool_t SCPI_ErrorAddInternal(scpi_t * context, int16_t err, char * i struct error_reg { int16_t from; int16_t to; - scpi_reg_val_t bit; + scpi_reg_val_t esrBit; }; #define ERROR_DEFS_N 9 @@ -170,7 +170,7 @@ void SCPI_ErrorPushEx(scpi_t * context, int16_t err, char * info) { for (i = 0; i < ERROR_DEFS_N; i++) { if ((err <= errs[i].from) && (err >= errs[i].to)) { - SCPI_RegSetBits(context, SCPI_REG_ESR, errs[i].bit); + SCPI_RegSetBits(context, SCPI_REG_ESR, errs[i].esrBit); } }