aboutsummaryrefslogtreecommitdiff
path: root/shared/pb/driver.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-05-29 17:41:41 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-05-29 17:41:41 +0200
commita9a38d387f98b29b68f97b8a9c6858d2b399caf0 (patch)
treea981e8d195d1743f2b218c02aef12b8809978912 /shared/pb/driver.h
parent439859f1133fb88e64df31acaa1b2845e36ba348 (diff)
WIP puzzle bus driver rework
Diffstat (limited to 'shared/pb/driver.h')
-rw-r--r--shared/pb/driver.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/shared/pb/driver.h b/shared/pb/driver.h
new file mode 100644
index 0000000..1c9c3a3
--- /dev/null
+++ b/shared/pb/driver.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void pbdrv_i2c_recv(uint16_t addr, const char * buf, size_t sz);
+void pbdrv_i2c_send(uint16_t addr, const char * buf, size_t sz);
+
+void pbdrv_hook_state(enum pb_global_state * state, bool rw);
+bool pbdrv_hook_cmd(enum pb_cmd cmd, const char * buf, size_t sz);
+
+void pbdrv_handle_read(const char * buf, size_t sz);
+
+#ifdef __cplusplus
+}
+#endif
+