summaryrefslogtreecommitdiff
path: root/include/stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stream.h')
-rw-r--r--include/stream.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/stream.h b/include/stream.h
index 96d9823..73b3daa 100644
--- a/include/stream.h
+++ b/include/stream.h
@@ -1,7 +1,16 @@
#include <stdint.h>
#include <stddef.h>
-/* typedef struct p_stream_s p_stream_t; */
+#ifndef __STREAM_H
+#define __STREAM_H
+/*
+ * Struct for abstract stream
+ *
+ * Stream properties: generalized variables for individual devices
+ * props[0]: Peripheral device (fd, hi2c, huart, and so on)
+ * props[1]: Bus device ID
+ *
+ */
typedef struct {
int (*read)(uint8_t *buf, size_t len, void **vptr, void *sptr);
@@ -9,3 +18,5 @@ typedef struct {
int (*init)(void **vptr, void *sptr);
void **props;
} p_stream_t;
+
+#endif