summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-01-18 11:47:24 +0700
committerhathach <[email protected]>2023-01-18 11:47:24 +0700
commit075095554aee6b72f7678c4db881162f533cbb13 (patch)
tree5e83b68e3d9813a18fd7bf9cc3856087411a281a /examples/device
parentfb7122f07d2b6cc064e4898735fdb6c63f14df8e (diff)
dont use non-std strncasecmp
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/usbtmc/src/usbtmc_app.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/device/usbtmc/src/usbtmc_app.c b/examples/device/usbtmc/src/usbtmc_app.c
index 4700656cb..503ee3071 100644
--- a/examples/device/usbtmc/src/usbtmc_app.c
+++ b/examples/device/usbtmc/src/usbtmc_app.c
@@ -148,11 +148,12 @@ bool tud_usbtmc_msg_data_cb(void *data, size_t len, bool transfer_complete)
queryState = transfer_complete;
idnQuery = 0;
- if(transfer_complete && (len >=4) && !strncasecmp("*idn?",data,4))
+ if ( transfer_complete && (len >= 4) && (!strncmp("*idn?", data, 4) || !strncmp("*IDN?", data, 4)) )
{
idnQuery = 1;
}
- if(transfer_complete && !strncasecmp("delay ",data,5))
+
+ if ( transfer_complete && (!strncmp("delay ", data, 5) || !strncmp("DELAY ", data, 5)) )
{
queryState = 0;
int d = atoi((char*)data + 5);