X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/5bcc76c427b680e28c001783c29c695e3a8d0c17..349eabe567c5c66bc95279abfd17f203f2ad697a:/client/uart.c?ds=sidebyside diff --git a/client/uart.c b/client/uart.c index e4da1951..75a15b2e 100644 --- a/client/uart.c +++ b/client/uart.c @@ -282,6 +282,15 @@ typedef struct { COMMTIMEOUTS ct; // Serial port time-out configuration } serial_port_windows; +void upcase(char *p) { + while(*p != '\0') { + if(*p >= 97 && *p <= 122) { + *p -= 32; + } + ++p; + } +} + serial_port uart_open(const char* pcPortName) { char acPortName[255]; @@ -289,7 +298,7 @@ serial_port uart_open(const char* pcPortName) // Copy the input "com?" to "\\.\COM?" format sprintf(acPortName,"\\\\.\\%s",pcPortName); - _strupr(acPortName); + upcase(acPortName); // Try to open the serial port sp->hPort = CreateFileA(acPortName,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);