GNU Linux-libre 4.19.286-gnu1
[releases.git] / drivers / staging / pi433 / rf69_enum.h
1 /* SPDX-License-Identifier: GPL-2.0+
2  *
3  * enumerations for HopeRf rf69 radio module
4  *
5  * Copyright (C) 2016 Wolf-Entwicklungen
6  *      Marcus Wolf <linux@wolf-entwicklungen.de>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  */
18
19 #ifndef RF69_ENUM_H
20 #define RF69_ENUM_H
21
22 enum mode {
23         mode_sleep,
24         standby,
25         synthesizer,
26         transmit,
27         receive
28 };
29
30 enum modulation {
31         OOK,
32         FSK,
33         UNDEF
34 };
35
36 enum mod_shaping {
37         SHAPING_OFF,
38         SHAPING_1_0,
39         SHAPING_0_5,
40         SHAPING_0_3,
41         SHAPING_BR,
42         SHAPING_2BR
43 };
44
45 enum pa_ramp {
46         ramp3400,
47         ramp2000,
48         ramp1000,
49         ramp500,
50         ramp250,
51         ramp125,
52         ramp100,
53         ramp62,
54         ramp50,
55         ramp40,
56         ramp31,
57         ramp25,
58         ramp20,
59         ramp15,
60         ramp12,
61         ramp10
62 };
63
64 enum antenna_impedance {
65         fifty_ohm,
66         two_hundred_ohm
67 };
68
69 enum lna_gain {
70         automatic,
71         max,
72         max_minus_6,
73         max_minus_12,
74         max_minus_24,
75         max_minus_36,
76         max_minus_48,
77         undefined
78 };
79
80 enum mantisse {
81         mantisse16,
82         mantisse20,
83         mantisse24
84 };
85
86 enum threshold_decrement {
87         dec_every8th,
88         dec_every4th,
89         dec_every2nd,
90         dec_once,
91         dec_twice,
92         dec_4times,
93         dec_8times,
94         dec_16times
95 };
96
97 enum flag {
98         mode_switch_completed,
99         ready_to_receive,
100         ready_to_send,
101         pll_locked,
102         rssi_exceeded_threshold,
103         timeout,
104         automode,
105         sync_address_match,
106         fifo_full,
107 //      fifo_not_empty, collision with next enum; replaced by following enum...
108         fifo_empty,
109         fifo_level_below_threshold,
110         fifo_overrun,
111         packet_sent,
112         payload_ready,
113         crc_ok,
114         battery_low
115 };
116
117 enum fifo_fill_condition {
118         after_sync_interrupt,
119         always
120 };
121
122 enum packet_format {
123         packet_length_fix,
124         packet_length_var
125 };
126
127 enum tx_start_condition {
128         fifo_level,
129         fifo_not_empty
130 };
131
132 enum address_filtering {
133         filtering_off,
134         node_address,
135         node_or_broadcast_address
136 };
137
138 enum dagc {
139         normal_mode,
140         improve,
141         improve_for_low_modulation_index
142 };
143
144 #endif