aboutsummaryrefslogtreecommitdiff
path: root/shared/pb/driver.h
diff options
context:
space:
mode:
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
+