2026-02-28 11:58:23 -05:00

20 lines
439 B
C

#ifndef CRSF_H
#define CRSF_H
#include <stdint.h>
#include <stdbool.h>
typedef struct {
uint16_t channels[16]; // Raw CRSF values (172-1811)
uint32_t last_rx_ms; // Timestamp of last valid frame
bool armed; // Arm switch state
} CRSFState;
void crsf_init(void);
void crsf_parse_byte(uint8_t byte);
int16_t crsf_to_range(uint16_t val, int16_t min, int16_t max);
extern volatile CRSFState crsf_state;
#endif