summaryrefslogtreecommitdiff
path: root/prototype/fw/src/microcobs.h
diff options
context:
space:
mode:
Diffstat (limited to 'prototype/fw/src/microcobs.h')
-rw-r--r--prototype/fw/src/microcobs.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/prototype/fw/src/microcobs.h b/prototype/fw/src/microcobs.h
new file mode 100644
index 0000000..774a27b
--- /dev/null
+++ b/prototype/fw/src/microcobs.h
@@ -0,0 +1,15 @@
+#ifndef __MICROCOBS_H__
+#define __MICROCOBS_H__
+
+#include <stdint.h>
+#include <unistd.h>
+
+struct sg_entry {
+ uint8_t *target;
+ ssize_t size;
+};
+
+ssize_t cobs_encode_sg(const struct sg_entry input[], uint8_t *output, size_t output_len);
+ssize_t cobs_encode(const uint8_t *input, size_t input_len, uint8_t *output, size_t output_len);
+
+#endif /* __MICROCOBS_H__ */