]> sigrok.org Git - libserialport.git/blobdiff - libserialport_internal.h
windows: Revise management of WaitCommEvent() operations.
[libserialport.git] / libserialport_internal.h
index 08e4eb2094cce65fe9820d2f87673c931b0f5f9d..329c3786305df950a9eed0e3ab62d07ecb8847ea 100644 (file)
@@ -24,7 +24,7 @@
 #include "config.h"
 
 #ifdef __linux__
-#define _BSD_SOURCE // for timeradd, timersub, timercmp
+#define _BSD_SOURCE /* For timeradd, timersub, timercmp. */
 #endif
 
 #include <string.h>
@@ -109,6 +109,7 @@ struct sp_port {
        DWORD events;
        BYTE pending_byte;
        BOOL writing;
+       BOOL wait_running;
 #else
        int fd;
 #endif
@@ -160,10 +161,7 @@ struct std_baudrate {
        int value;
 };
 
-extern const struct std_baudrate std_baudrates[];
-
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
-#define NUM_STD_BAUDRATES ARRAY_SIZE(std_baudrates)
 
 extern void (*sp_debug_handler)(const char *format, ...);
 
@@ -182,7 +180,7 @@ extern void (*sp_debug_handler)(const char *format, ...);
 #define RETURN() do { \
        DEBUG_FMT("%s returning", __func__); \
        return; \
-} while(0)
+} while (0)
 #define RETURN_CODE(x) do { \
        DEBUG_FMT("%s returning " #x, __func__); \
        return x; \