diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-05-18 15:08:20 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-05-18 15:08:20 +0200 |
commit | cddfbb715d6f4f9d022d383ab8737b6af57a1d6f (patch) | |
tree | d05b08c75f30949c8dfcd8caf6973e6b9cb352ec /proto/puzbusv1.h | |
parent | 573643a1d3220830de47c810cb1a6be629ce7abd (diff) |
cmake build config for mpack
Diffstat (limited to 'proto/puzbusv1.h')
-rw-r--r-- | proto/puzbusv1.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/proto/puzbusv1.h b/proto/puzbusv1.h new file mode 100644 index 0000000..071c887 --- /dev/null +++ b/proto/puzbusv1.h @@ -0,0 +1,22 @@ +#pragma once + +#include <stddef.h> +#include <stdint.h> + +#ifdef __cplusplus +extern "C" { +#endif + +struct pb_msg { + uint16_t addr; + char* data; + size_t length; +}; + +int pb_read(struct pb_msg* target, char* buf, size_t buf_sz); +void pb_free(struct pb_msg* msg); + +#ifdef __cplusplus +} +#endif + |