Commit | Line | Data |
---|---|---|
874bcba6 MW |
1 | /* |
2 | * enumerations for HopeRf rf69 radio module | |
3 | * | |
4 | * Copyright (C) 2016 Wolf-Entwicklungen | |
5 | * Marcus Wolf <linux@wolf-entwicklungen.de> | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify | |
8 | * it under the terms of the GNU General Public License as published by | |
9 | * the Free Software Foundation; either version 2 of the License, or | |
10 | * (at your option) any later version. | |
11 | * | |
12 | * This program is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | * GNU General Public License for more details. | |
16 | */ | |
17 | ||
18 | #ifndef RF69_ENUM_H | |
19 | #define RF69_ENUM_H | |
20 | ||
8d05bce2 | 21 | enum mode { |
21a97589 SS |
22 | mode_sleep, |
23 | standby, | |
24 | synthesizer, | |
25 | transmit, | |
26 | receive | |
874bcba6 MW |
27 | }; |
28 | ||
8d05bce2 | 29 | enum modulation { |
21a97589 | 30 | OOK, |
1c12da35 MC |
31 | FSK, |
32 | UNDEF | |
874bcba6 MW |
33 | }; |
34 | ||
494b11b6 SS |
35 | enum mod_shaping { |
36 | SHAPING_OFF, | |
37 | SHAPING_1_0, | |
38 | SHAPING_0_5, | |
39 | SHAPING_0_3, | |
40 | SHAPING_BR, | |
41 | SHAPING_2BR | |
874bcba6 MW |
42 | }; |
43 | ||
8d05bce2 | 44 | enum paRamp { |
21a97589 SS |
45 | ramp3400, |
46 | ramp2000, | |
47 | ramp1000, | |
48 | ramp500, | |
49 | ramp250, | |
50 | ramp125, | |
51 | ramp100, | |
52 | ramp62, | |
53 | ramp50, | |
54 | ramp40, | |
55 | ramp31, | |
56 | ramp25, | |
57 | ramp20, | |
58 | ramp15, | |
59 | ramp12, | |
60 | ramp10 | |
874bcba6 MW |
61 | }; |
62 | ||
370d7ce6 | 63 | enum antenna_impedance { |
0b897065 VV |
64 | fifty_ohm, |
65 | two_hundred_ohm | |
874bcba6 MW |
66 | }; |
67 | ||
8d05bce2 | 68 | enum lnaGain { |
21a97589 SS |
69 | automatic, |
70 | max, | |
b167a524 VV |
71 | max_minus_6, |
72 | max_minus_12, | |
73 | max_minus_24, | |
74 | max_minus_36, | |
75 | max_minus_48, | |
21a97589 | 76 | undefined |
874bcba6 MW |
77 | }; |
78 | ||
8d05bce2 | 79 | enum mantisse { |
21a97589 SS |
80 | mantisse16, |
81 | mantisse20, | |
82 | mantisse24 | |
874bcba6 MW |
83 | }; |
84 | ||
8d05bce2 | 85 | enum thresholdDecrement { |
21a97589 SS |
86 | dec_every8th, |
87 | dec_every4th, | |
88 | dec_every2nd, | |
89 | dec_once, | |
90 | dec_twice, | |
91 | dec_4times, | |
92 | dec_8times, | |
93 | dec_16times | |
874bcba6 MW |
94 | }; |
95 | ||
8d05bce2 | 96 | enum flag { |
21a97589 SS |
97 | modeSwitchCompleted, |
98 | readyToReceive, | |
99 | readyToSend, | |
100 | pllLocked, | |
101 | rssiExceededThreshold, | |
102 | timeout, | |
103 | automode, | |
104 | syncAddressMatch, | |
acf71f8d VV |
105 | fifo_full, |
106 | // fifo_not_empty, collision with next enum; replaced by following enum... | |
107 | fifo_empty, | |
108 | fifo_level_below_threshold, | |
109 | fifo_overrun, | |
21a97589 | 110 | packetSent, |
0b9acf7d | 111 | payload_ready, |
21a97589 SS |
112 | crcOk, |
113 | batteryLow | |
874bcba6 MW |
114 | }; |
115 | ||
acf71f8d | 116 | enum fifo_fill_condition { |
21a97589 SS |
117 | afterSyncInterrupt, |
118 | always | |
874bcba6 MW |
119 | }; |
120 | ||
8d05bce2 | 121 | enum packetFormat { |
21a97589 SS |
122 | packetLengthFix, |
123 | packetLengthVar | |
874bcba6 MW |
124 | }; |
125 | ||
6252016c | 126 | enum tx_start_condition { |
acf71f8d VV |
127 | fifo_level, |
128 | fifo_not_empty | |
874bcba6 MW |
129 | }; |
130 | ||
8d05bce2 | 131 | enum addressFiltering { |
21a97589 SS |
132 | filteringOff, |
133 | nodeAddress, | |
134 | nodeOrBroadcastAddress | |
874bcba6 MW |
135 | }; |
136 | ||
8d05bce2 | 137 | enum dagc { |
21a97589 SS |
138 | normalMode, |
139 | improve, | |
140 | improve4LowModulationIndex | |
874bcba6 MW |
141 | }; |
142 | ||
874bcba6 | 143 | #endif |