feat: add include/telemetry.h
This commit is contained in:
11
include/telemetry.h
Normal file
11
include/telemetry.h
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#ifndef TELEMETRY_H
|
||||||
|
#define TELEMETRY_H
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
typedef enum { FRAME_OK, FRAME_SHORT, FRAME_VERSION, FRAME_CRC, FRAME_RANGE,
|
||||||
|
FRAME_DUPLICATE, FRAME_ROLLBACK } frame_result_t;
|
||||||
|
typedef struct { uint16_t sequence; int16_t temperature_centi; uint16_t voltage_mv; } sample_t;
|
||||||
|
frame_result_t decode_frame(const uint8_t *bytes, size_t length, sample_t *sample);
|
||||||
|
const char *frame_result_name(frame_result_t result);
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user