Loading...
Searching...
No Matches
manchester_decoder.h
1#pragma once
2#include <stdbool.h>
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8typedef enum {
9 ManchesterEventShortLow = 0,
10 ManchesterEventShortHigh = 2,
11 ManchesterEventLongLow = 4,
12 ManchesterEventLongHigh = 6,
13 ManchesterEventReset = 8
14} ManchesterEvent;
15
16typedef enum {
17 ManchesterStateStart1 = 0,
18 ManchesterStateMid1 = 1,
19 ManchesterStateMid0 = 2,
20 ManchesterStateStart0 = 3
21} ManchesterState;
22
23bool manchester_advance(
24 ManchesterState state,
25 ManchesterEvent event,
26 ManchesterState* next_state,
27 bool* data);
28
29#ifdef __cplusplus
30}
31#endif