X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=support%2Fsdk%2Fc%2Fsf%2Fserialsource.h;h=8fa232bd071a961c2431d99a840cf45eb44a7264;hp=28ba5bdc6ccfde284a82729d3e835b1b790754be;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400 diff --git a/support/sdk/c/sf/serialsource.h b/support/sdk/c/sf/serialsource.h index 28ba5bdc..8fa232bd 100644 --- a/support/sdk/c/sf/serialsource.h +++ b/support/sdk/c/sf/serialsource.h @@ -1,11 +1,15 @@ #ifndef SERIALSOURCE_H #define SERIALSOURCE_H +#ifdef _WIN32 +#include +#endif + #ifdef __cplusplus extern "C" { #endif -typedef struct serial_source *serial_source; +typedef struct serial_source_t *serial_source; typedef enum { msg_unknown_packet_type, /* packet of unknown type received */ @@ -32,10 +36,19 @@ serial_source open_serial_source(const char *device, int baud_rate, NULL for failure */ +#ifndef _WIN32 int serial_source_fd(serial_source src); /* Returns: the file descriptor used by serial source src (useful when non-blocking reads were requested) */ +#endif + +#ifdef _WIN32 +HANDLE serial_source_handle(serial_source src); +/* Returns: the file descriptor used by serial source src (useful when + non-blocking reads were requested) +*/ +#endif int serial_source_empty(serial_source src); /* Returns: true if serial source does not contain any pending data, i.e.,