#include <stdint.h>
#include <stdlib.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** The type of message buffers */
typedef struct tmsg tmsg_t;
*/
void tmsg_write_float_be(tmsg_t *msg, size_t offset, float x);
+#ifdef __cplusplus
+}
+#endif
+
#endif
#ifndef SERIALSOURCE_H
#define SERIALSOURCE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct serial_source *serial_source;
typedef enum {
atoi(platform_name).
*/
+#ifdef __cplusplus
+}
+#endif
+
#endif
count -= n;
actual += n;
- buffer += n;
+ buffer = (char*)buffer + n;
}
return actual;
}
count -= n;
actual += n;
- buffer += n;
+ buffer = (char*)buffer + n;
}
return actual;
}
#ifndef SFSOURCE_H
#define SFSOURCE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int open_sf_source(const char *host, int port);
/* Returns: file descriptor for TinyOS 2.0 serial forwarder at host:port, or
-1 for failure
Returns: 0 if packet successfully written, -1 otherwise
*/
+#ifdef __cplusplus
+}
+#endif
+
#endif