feat: add include/telemetry.h

This commit is contained in:
2026-09-25 11:56:44 +08:00
parent 1f6350d2cf
commit 635e66f872

11
include/telemetry.h Normal file
View 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