diff options
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 + |