aboutsummaryrefslogtreecommitdiff
path: root/lib/pbdrv/pb-serial.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pbdrv/pb-serial.h')
-rw-r--r--lib/pbdrv/pb-serial.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/pbdrv/pb-serial.h b/lib/pbdrv/pb-serial.h
new file mode 100644
index 0000000..77e1345
--- /dev/null
+++ b/lib/pbdrv/pb-serial.h
@@ -0,0 +1,38 @@
+#pragma once
+
+#include <mpack.h>
+
+#include "pb-types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+void pbdrv_serialize(mpack_writer_t * writer, const pb_msg_t * msg);
+
+void pbdrv_s_msg_header(mpack_writer_t * writer, const pb_msg_t * msg);
+void pbdrv_s_cmd_req_read(mpack_writer_t * writer, const pb_cmd_req_read_t * msg);
+void pbdrv_s_cmd_res_read(mpack_writer_t * writer, const pb_cmd_res_read_t * msg);
+void pbdrv_s_cmd_req_write(mpack_writer_t * writer, const pb_cmd_req_write_t * msg);
+void pbdrv_s_cmd_req_state(mpack_writer_t * writer, const pb_cmd_req_state_t * msg);
+void pbdrv_s_cmd_res_state(mpack_writer_t * writer, const pb_cmd_res_state_t * msg);
+void pbdrv_s_cmd_req_set_state(mpack_writer_t * writer, const pb_cmd_req_set_state_t * msg);
+void pbdrv_s_cmd_req_magic(mpack_writer_t * writer, const pb_cmd_req_magic_t * msg);
+void pbdrv_s_cmd_res_magic(mpack_writer_t * writer, const pb_cmd_res_magic_t * msg);
+
+// typedef void pbdrv_deserialize_t(mpack_reader_t * reader);
+// pbdrv_deserialize_t pbdrv_d_msg_header;
+// pbdrv_deserialize_t pbdrv_d_cmd_req_read;
+// pbdrv_deserialize_t pbdrv_d_cmd_res_read;
+// pbdrv_deserialize_t pbdrv_d_cmd_req_write;
+// pbdrv_deserialize_t pbdrv_d_cmd_req_state;
+// pbdrv_deserialize_t pbdrv_d_cmd_res_state;
+// pbdrv_deserialize_t pbdrv_d_cmd_req_set_state;
+// pbdrv_deserialize_t pbdrv_d_cmd_req_magic;
+// pbdrv_deserialize_t pbdrv_d_cmd_res_magic;
+
+#ifdef __cplusplus
+}
+#endif
+