loragw_reg.h 86 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503
  1. /*
  2. / _____) _ | |
  3. ( (____ _____ ____ _| |_ _____ ____| |__
  4. \____ \| ___ | (_ _) ___ |/ ___) _ \
  5. _____) ) ____| | | || |_| ____( (___| | | |
  6. (______/|_____)_|_|_| \__)_____)\____)_| |_|
  7. (C)2019 Semtech
  8. Description:
  9. Functions used to handle a single LoRa SX1302 concentrator.
  10. Registers are addressed by name.
  11. Multi-bytes registers are handled automatically.
  12. Read-modify-write is handled automatically.
  13. License: Revised BSD License, see LICENSE.TXT file include in the project
  14. */
  15. #ifndef _LORAGW_REG_H
  16. #define _LORAGW_REG_H
  17. /* -------------------------------------------------------------------------- */
  18. /* --- DEPENDANCIES --------------------------------------------------------- */
  19. #include <stdint.h> /* C99 types */
  20. #include <stdbool.h> /* bool type */
  21. #include "config.h" /* library configuration options (dynamically generated) */
  22. #include "loragw_com.h"
  23. /* -------------------------------------------------------------------------- */
  24. /* --- INTERNAL SHARED TYPES ------------------------------------------------ */
  25. struct lgw_reg_s {
  26. int8_t page; /*!< page containing the register (-1 for all pages) */
  27. uint16_t addr; /*!< base address of the register (15 bit) */
  28. uint8_t offs; /*!< position of the register LSB (between 0 to 7) */
  29. bool sign; /*!< 1 indicates the register is signed (2 complem.) */
  30. uint8_t leng; /*!< number of bits in the register */
  31. bool rdon; /*!< 1 indicates a read-only register */
  32. bool chck; /*!< register can be checked or not: (pulse, w0clr, w1clr) */
  33. int32_t dflt; /*!< register default value */
  34. };
  35. /* -------------------------------------------------------------------------- */
  36. /* --- INTERNAL SHARED FUNCTIONS -------------------------------------------- */
  37. /* -------------------------------------------------------------------------- */
  38. /* --- PUBLIC CONSTANTS ----------------------------------------------------- */
  39. #define LGW_REG_SUCCESS 0
  40. #define LGW_REG_ERROR -1
  41. #define LGW_REG_WARNING -2
  42. #define SX1302_REG_COMMON_PAGE_PAGE 0
  43. #define SX1302_REG_COMMON_CTRL0_CLK32_RIF_CTRL 1
  44. #define SX1302_REG_COMMON_CTRL0_HOST_RADIO_CTRL 2
  45. #define SX1302_REG_COMMON_CTRL0_RADIO_MISC_EN 3
  46. #define SX1302_REG_COMMON_CTRL0_SX1261_MODE_RADIO_B 4
  47. #define SX1302_REG_COMMON_CTRL0_SX1261_MODE_RADIO_A 5
  48. #define SX1302_REG_COMMON_CTRL1_SWAP_IQ_RADIO_B 6
  49. #define SX1302_REG_COMMON_CTRL1_SAMPLING_EDGE_RADIO_B 7
  50. #define SX1302_REG_COMMON_CTRL1_SWAP_IQ_RADIO_A 8
  51. #define SX1302_REG_COMMON_CTRL1_SAMPLING_EDGE_RADIO_A 9
  52. #define SX1302_REG_COMMON_SPI_DIV_RATIO_SPI_HALF_PERIOD 10
  53. #define SX1302_REG_COMMON_RADIO_SELECT_RADIO_SELECT 11
  54. #define SX1302_REG_COMMON_GEN_GLOBAL_EN 12
  55. #define SX1302_REG_COMMON_GEN_FSK_MODEM_ENABLE 13
  56. #define SX1302_REG_COMMON_GEN_CONCENTRATOR_MODEM_ENABLE 14
  57. #define SX1302_REG_COMMON_GEN_MBWSSF_MODEM_ENABLE 15
  58. #define SX1302_REG_COMMON_VERSION_VERSION 16
  59. #define SX1302_REG_COMMON_DUMMY_DUMMY 17
  60. #define SX1302_REG_AGC_MCU_CTRL_CLK_EN 18
  61. #define SX1302_REG_AGC_MCU_CTRL_FORCE_HOST_FE_CTRL 19
  62. #define SX1302_REG_AGC_MCU_CTRL_MCU_CLEAR 20
  63. #define SX1302_REG_AGC_MCU_CTRL_HOST_PROG 21
  64. #define SX1302_REG_AGC_MCU_CTRL_PARITY_ERROR 22
  65. #define SX1302_REG_AGC_MCU_MCU_AGC_STATUS_MCU_AGC_STATUS 23
  66. #define SX1302_REG_AGC_MCU_PA_GAIN_PA_B_GAIN 24
  67. #define SX1302_REG_AGC_MCU_PA_GAIN_PA_A_GAIN 25
  68. #define SX1302_REG_AGC_MCU_RF_EN_A_RADIO_RST 26
  69. #define SX1302_REG_AGC_MCU_RF_EN_A_RADIO_EN 27
  70. #define SX1302_REG_AGC_MCU_RF_EN_A_PA_EN 28
  71. #define SX1302_REG_AGC_MCU_RF_EN_A_LNA_EN 29
  72. #define SX1302_REG_AGC_MCU_RF_EN_B_RADIO_RST 30
  73. #define SX1302_REG_AGC_MCU_RF_EN_B_RADIO_EN 31
  74. #define SX1302_REG_AGC_MCU_RF_EN_B_PA_EN 32
  75. #define SX1302_REG_AGC_MCU_RF_EN_B_LNA_EN 33
  76. #define SX1302_REG_AGC_MCU_LUT_TABLE_A_PA_LUT 34
  77. #define SX1302_REG_AGC_MCU_LUT_TABLE_A_LNA_LUT 35
  78. #define SX1302_REG_AGC_MCU_LUT_TABLE_B_PA_LUT 36
  79. #define SX1302_REG_AGC_MCU_LUT_TABLE_B_LNA_LUT 37
  80. #define SX1302_REG_AGC_MCU_UART_CFG_MSBF 38
  81. #define SX1302_REG_AGC_MCU_UART_CFG_PAR_EN 39
  82. #define SX1302_REG_AGC_MCU_UART_CFG_PAR_MODE 40
  83. #define SX1302_REG_AGC_MCU_UART_CFG_START_LEN 41
  84. #define SX1302_REG_AGC_MCU_UART_CFG_STOP_LEN 42
  85. #define SX1302_REG_AGC_MCU_UART_CFG_WORD_LEN 43
  86. #define SX1302_REG_AGC_MCU_UART_CFG2_BIT_RATE 44
  87. #define SX1302_REG_AGC_MCU_MCU_MAIL_BOX_WR_DATA_BYTE3_MCU_MAIL_BOX_WR_DATA 45
  88. #define SX1302_REG_AGC_MCU_MCU_MAIL_BOX_WR_DATA_BYTE2_MCU_MAIL_BOX_WR_DATA 46
  89. #define SX1302_REG_AGC_MCU_MCU_MAIL_BOX_WR_DATA_BYTE1_MCU_MAIL_BOX_WR_DATA 47
  90. #define SX1302_REG_AGC_MCU_MCU_MAIL_BOX_WR_DATA_BYTE0_MCU_MAIL_BOX_WR_DATA 48
  91. #define SX1302_REG_AGC_MCU_MCU_MAIL_BOX_RD_DATA_BYTE3_MCU_MAIL_BOX_RD_DATA 49
  92. #define SX1302_REG_AGC_MCU_MCU_MAIL_BOX_RD_DATA_BYTE2_MCU_MAIL_BOX_RD_DATA 50
  93. #define SX1302_REG_AGC_MCU_MCU_MAIL_BOX_RD_DATA_BYTE1_MCU_MAIL_BOX_RD_DATA 51
  94. #define SX1302_REG_AGC_MCU_MCU_MAIL_BOX_RD_DATA_BYTE0_MCU_MAIL_BOX_RD_DATA 52
  95. #define SX1302_REG_AGC_MCU_DUMMY_DUMMY3 53
  96. #define SX1302_REG_CLK_CTRL_CLK_SEL_CLKDIV_EN 54
  97. #define SX1302_REG_CLK_CTRL_CLK_SEL_CLK_RADIO_B_SEL 55
  98. #define SX1302_REG_CLK_CTRL_CLK_SEL_CLK_RADIO_A_SEL 56
  99. #define SX1302_REG_CLK_CTRL_DUMMY_DUMMY 57
  100. #define SX1302_REG_TX_TOP_A_TX_TRIG_TX_FSM_CLR 58
  101. #define SX1302_REG_TX_TOP_A_TX_TRIG_TX_TRIG_GPS 59
  102. #define SX1302_REG_TX_TOP_A_TX_TRIG_TX_TRIG_DELAYED 60
  103. #define SX1302_REG_TX_TOP_A_TX_TRIG_TX_TRIG_IMMEDIATE 61
  104. #define SX1302_REG_TX_TOP_A_TIMER_TRIG_BYTE3_TIMER_DELAYED_TRIG 62
  105. #define SX1302_REG_TX_TOP_A_TIMER_TRIG_BYTE2_TIMER_DELAYED_TRIG 63
  106. #define SX1302_REG_TX_TOP_A_TIMER_TRIG_BYTE1_TIMER_DELAYED_TRIG 64
  107. #define SX1302_REG_TX_TOP_A_TIMER_TRIG_BYTE0_TIMER_DELAYED_TRIG 65
  108. #define SX1302_REG_TX_TOP_A_TX_START_DELAY_MSB_TX_START_DELAY 66
  109. #define SX1302_REG_TX_TOP_A_TX_START_DELAY_LSB_TX_START_DELAY 67
  110. #define SX1302_REG_TX_TOP_A_TX_CTRL_WRITE_BUFFER 68
  111. #define SX1302_REG_TX_TOP_A_TX_RAMP_DURATION_TX_RAMP_DURATION 69
  112. #define SX1302_REG_TX_TOP_A_GEN_CFG_0_MODULATION_TYPE 70
  113. #define SX1302_REG_TX_TOP_A_TEST_0_TX_ACTIVE_CTRL 71
  114. #define SX1302_REG_TX_TOP_A_TEST_0_TX_ACTIVE_SEL 72
  115. #define SX1302_REG_TX_TOP_A_TX_FLAG_TX_TIMEOUT 73
  116. #define SX1302_REG_TX_TOP_A_TX_FLAG_PKT_DONE 74
  117. #define SX1302_REG_TX_TOP_A_AGC_TX_BW_AGC_TX_BW 75
  118. #define SX1302_REG_TX_TOP_A_AGC_TX_PWR_AGC_TX_PWR 76
  119. #define SX1302_REG_TX_TOP_A_TIMEOUT_CNT_BYTE_2_TIMEOUT_CNT 77
  120. #define SX1302_REG_TX_TOP_A_TIMEOUT_CNT_BYTE_1_TIMEOUT_CNT 78
  121. #define SX1302_REG_TX_TOP_A_TIMEOUT_CNT_BYTE_0_TIMEOUT_CNT 79
  122. #define SX1302_REG_TX_TOP_A_TX_FSM_STATUS_TX_STATUS 80
  123. #define SX1302_REG_TX_TOP_A_DUMMY_CONTROL_DUMMY 81
  124. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL_PLL_DIV_CTRL 82
  125. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL_TX_CLK_EDGE 83
  126. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL_TX_MODE 84
  127. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL_TX_IF_DST 85
  128. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL_TX_IF_SRC 86
  129. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL2_SX125X_IQ_INVERT 87
  130. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL2_PLL_DIV_CTRL_AGC 88
  131. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_IQ_GAIN_IQ_GAIN 89
  132. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_I_OFFSET_I_OFFSET 90
  133. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_Q_OFFSET_Q_OFFSET 91
  134. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_FREQ_RF_H_FREQ_RF 92
  135. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_FREQ_RF_M_FREQ_RF 93
  136. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_FREQ_RF_L_FREQ_RF 94
  137. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_FREQ_DEV_H_FREQ_DEV 95
  138. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_FREQ_DEV_L_FREQ_DEV 96
  139. #define SX1302_REG_TX_TOP_A_TX_RFFE_IF_TEST_MOD_FREQ 97
  140. #define SX1302_REG_TX_TOP_A_DUMMY_MODULATOR_DUMMY 98
  141. #define SX1302_REG_TX_TOP_A_FSK_PKT_LEN_PKT_LENGTH 99
  142. #define SX1302_REG_TX_TOP_A_FSK_CFG_0_TX_CONT 100
  143. #define SX1302_REG_TX_TOP_A_FSK_CFG_0_CRC_IBM 101
  144. #define SX1302_REG_TX_TOP_A_FSK_CFG_0_DCFREE_ENC 102
  145. #define SX1302_REG_TX_TOP_A_FSK_CFG_0_CRC_EN 103
  146. #define SX1302_REG_TX_TOP_A_FSK_CFG_0_PKT_MODE 104
  147. #define SX1302_REG_TX_TOP_A_FSK_PREAMBLE_SIZE_MSB_PREAMBLE_SIZE 105
  148. #define SX1302_REG_TX_TOP_A_FSK_PREAMBLE_SIZE_LSB_PREAMBLE_SIZE 106
  149. #define SX1302_REG_TX_TOP_A_FSK_BIT_RATE_MSB_BIT_RATE 107
  150. #define SX1302_REG_TX_TOP_A_FSK_BIT_RATE_LSB_BIT_RATE 108
  151. #define SX1302_REG_TX_TOP_A_FSK_MOD_FSK_REF_PATTERN_SIZE 109
  152. #define SX1302_REG_TX_TOP_A_FSK_MOD_FSK_PREAMBLE_SEQ 110
  153. #define SX1302_REG_TX_TOP_A_FSK_MOD_FSK_REF_PATTERN_EN 111
  154. #define SX1302_REG_TX_TOP_A_FSK_MOD_FSK_GAUSSIAN_SELECT_BT 112
  155. #define SX1302_REG_TX_TOP_A_FSK_MOD_FSK_GAUSSIAN_EN 113
  156. #define SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE7_FSK_REF_PATTERN 114
  157. #define SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE6_FSK_REF_PATTERN 115
  158. #define SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE5_FSK_REF_PATTERN 116
  159. #define SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE4_FSK_REF_PATTERN 117
  160. #define SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE3_FSK_REF_PATTERN 118
  161. #define SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE2_FSK_REF_PATTERN 119
  162. #define SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE1_FSK_REF_PATTERN 120
  163. #define SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE0_FSK_REF_PATTERN 121
  164. #define SX1302_REG_TX_TOP_A_DUMMY_GSFK_DUMMY 122
  165. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_0_MODEM_BW 123
  166. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_0_MODEM_SF 124
  167. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_1_PPM_OFFSET_HDR_CTRL 125
  168. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_1_PPM_OFFSET 126
  169. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_1_POST_PREAMBLE_GAP_LONG 127
  170. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_1_CODING_RATE 128
  171. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_2_FINE_SYNCH_EN 129
  172. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_2_MODEM_EN 130
  173. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_2_CADRXTX 131
  174. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_2_IMPLICIT_HEADER 132
  175. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_2_CRC_EN 133
  176. #define SX1302_REG_TX_TOP_A_TXRX_CFG0_3_PAYLOAD_LENGTH 134
  177. #define SX1302_REG_TX_TOP_A_TXRX_CFG1_0_INT_STEP_ORIDE_EN 135
  178. #define SX1302_REG_TX_TOP_A_TXRX_CFG1_0_INT_STEP_ORIDE 136
  179. #define SX1302_REG_TX_TOP_A_TXRX_CFG1_1_MODEM_START 137
  180. #define SX1302_REG_TX_TOP_A_TXRX_CFG1_1_HEADER_DIFF_MODE 138
  181. #define SX1302_REG_TX_TOP_A_TXRX_CFG1_1_ZERO_PAD 139
  182. #define SX1302_REG_TX_TOP_A_TXRX_CFG1_2_PREAMBLE_SYMB_NB 140
  183. #define SX1302_REG_TX_TOP_A_TXRX_CFG1_3_PREAMBLE_SYMB_NB 141
  184. #define SX1302_REG_TX_TOP_A_TXRX_CFG1_4_AUTO_ACK_INT_DELAY 142
  185. #define SX1302_REG_TX_TOP_A_TXRX_CFG1_4_AUTO_ACK_RX 143
  186. #define SX1302_REG_TX_TOP_A_TXRX_CFG1_4_AUTO_ACK_TX 144
  187. #define SX1302_REG_TX_TOP_A_TX_CFG0_0_CHIRP_LOWPASS 145
  188. #define SX1302_REG_TX_TOP_A_TX_CFG0_0_PPM_OFFSET_SIG 146
  189. #define SX1302_REG_TX_TOP_A_TX_CFG0_0_CONTCHIRP 147
  190. #define SX1302_REG_TX_TOP_A_TX_CFG0_0_CHIRP_INVERT 148
  191. #define SX1302_REG_TX_TOP_A_TX_CFG0_0_CONTINUOUS 149
  192. #define SX1302_REG_TX_TOP_A_TX_CFG0_1_POWER_RANGING 150
  193. #define SX1302_REG_TX_TOP_A_TX_CFG1_0_FRAME_NB 151
  194. #define SX1302_REG_TX_TOP_A_TX_CFG1_1_HOP_CTRL 152
  195. #define SX1302_REG_TX_TOP_A_TX_CFG1_1_IFS 153
  196. #define SX1302_REG_TX_TOP_A_FRAME_SYNCH_0_AUTO_SCALE 154
  197. #define SX1302_REG_TX_TOP_A_FRAME_SYNCH_0_DROP_ON_SYNCH 155
  198. #define SX1302_REG_TX_TOP_A_FRAME_SYNCH_0_GAIN 156
  199. #define SX1302_REG_TX_TOP_A_FRAME_SYNCH_0_PEAK1_POS 157
  200. #define SX1302_REG_TX_TOP_A_FRAME_SYNCH_1_FINETIME_ON_LAST 158
  201. #define SX1302_REG_TX_TOP_A_FRAME_SYNCH_1_TIMEOUT_OPT 159
  202. #define SX1302_REG_TX_TOP_A_FRAME_SYNCH_1_PEAK2_POS 160
  203. #define SX1302_REG_TX_TOP_A_LORA_TX_STATE_STATUS 161
  204. #define SX1302_REG_TX_TOP_A_LORA_TX_FLAG_FRAME_DONE 162
  205. #define SX1302_REG_TX_TOP_A_LORA_TX_FLAG_CONT_DONE 163
  206. #define SX1302_REG_TX_TOP_A_LORA_TX_FLAG_PLD_DONE 164
  207. #define SX1302_REG_TX_TOP_A_DUMMY_LORA_DUMMY 165
  208. #define SX1302_REG_TX_TOP_B_TX_TRIG_TX_FSM_CLR 166
  209. #define SX1302_REG_TX_TOP_B_TX_TRIG_TX_TRIG_GPS 167
  210. #define SX1302_REG_TX_TOP_B_TX_TRIG_TX_TRIG_DELAYED 168
  211. #define SX1302_REG_TX_TOP_B_TX_TRIG_TX_TRIG_IMMEDIATE 169
  212. #define SX1302_REG_TX_TOP_B_TIMER_TRIG_BYTE3_TIMER_DELAYED_TRIG 170
  213. #define SX1302_REG_TX_TOP_B_TIMER_TRIG_BYTE2_TIMER_DELAYED_TRIG 171
  214. #define SX1302_REG_TX_TOP_B_TIMER_TRIG_BYTE1_TIMER_DELAYED_TRIG 172
  215. #define SX1302_REG_TX_TOP_B_TIMER_TRIG_BYTE0_TIMER_DELAYED_TRIG 173
  216. #define SX1302_REG_TX_TOP_B_TX_START_DELAY_MSB_TX_START_DELAY 174
  217. #define SX1302_REG_TX_TOP_B_TX_START_DELAY_LSB_TX_START_DELAY 175
  218. #define SX1302_REG_TX_TOP_B_TX_CTRL_WRITE_BUFFER 176
  219. #define SX1302_REG_TX_TOP_B_TX_RAMP_DURATION_TX_RAMP_DURATION 177
  220. #define SX1302_REG_TX_TOP_B_GEN_CFG_0_MODULATION_TYPE 178
  221. #define SX1302_REG_TX_TOP_B_TEST_0_TX_ACTIVE_CTRL 179
  222. #define SX1302_REG_TX_TOP_B_TEST_0_TX_ACTIVE_SEL 180
  223. #define SX1302_REG_TX_TOP_B_TX_FLAG_TX_TIMEOUT 181
  224. #define SX1302_REG_TX_TOP_B_TX_FLAG_PKT_DONE 182
  225. #define SX1302_REG_TX_TOP_B_AGC_TX_BW_AGC_TX_BW 183
  226. #define SX1302_REG_TX_TOP_B_AGC_TX_PWR_AGC_TX_PWR 184
  227. #define SX1302_REG_TX_TOP_B_TIMEOUT_CNT_BYTE_2_TIMEOUT_CNT 185
  228. #define SX1302_REG_TX_TOP_B_TIMEOUT_CNT_BYTE_1_TIMEOUT_CNT 186
  229. #define SX1302_REG_TX_TOP_B_TIMEOUT_CNT_BYTE_0_TIMEOUT_CNT 187
  230. #define SX1302_REG_TX_TOP_B_TX_FSM_STATUS_TX_STATUS 188
  231. #define SX1302_REG_TX_TOP_B_DUMMY_CONTROL_DUMMY 189
  232. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL_PLL_DIV_CTRL 190
  233. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL_TX_CLK_EDGE 191
  234. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL_TX_MODE 192
  235. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL_TX_IF_DST 193
  236. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL_TX_IF_SRC 194
  237. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL2_SX125X_IQ_INVERT 195
  238. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL2_PLL_DIV_CTRL_AGC 196
  239. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_IQ_GAIN_IQ_GAIN 197
  240. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_I_OFFSET_I_OFFSET 198
  241. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_Q_OFFSET_Q_OFFSET 199
  242. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_FREQ_RF_H_FREQ_RF 200
  243. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_FREQ_RF_M_FREQ_RF 201
  244. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_FREQ_RF_L_FREQ_RF 202
  245. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_FREQ_DEV_H_FREQ_DEV 203
  246. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_FREQ_DEV_L_FREQ_DEV 204
  247. #define SX1302_REG_TX_TOP_B_TX_RFFE_IF_TEST_MOD_FREQ 205
  248. #define SX1302_REG_TX_TOP_B_DUMMY_MODULATOR_DUMMY 206
  249. #define SX1302_REG_TX_TOP_B_FSK_PKT_LEN_PKT_LENGTH 207
  250. #define SX1302_REG_TX_TOP_B_FSK_CFG_0_TX_CONT 208
  251. #define SX1302_REG_TX_TOP_B_FSK_CFG_0_CRC_IBM 209
  252. #define SX1302_REG_TX_TOP_B_FSK_CFG_0_DCFREE_ENC 210
  253. #define SX1302_REG_TX_TOP_B_FSK_CFG_0_CRC_EN 211
  254. #define SX1302_REG_TX_TOP_B_FSK_CFG_0_PKT_MODE 212
  255. #define SX1302_REG_TX_TOP_B_FSK_PREAMBLE_SIZE_MSB_PREAMBLE_SIZE 213
  256. #define SX1302_REG_TX_TOP_B_FSK_PREAMBLE_SIZE_LSB_PREAMBLE_SIZE 214
  257. #define SX1302_REG_TX_TOP_B_FSK_BIT_RATE_MSB_BIT_RATE 215
  258. #define SX1302_REG_TX_TOP_B_FSK_BIT_RATE_LSB_BIT_RATE 216
  259. #define SX1302_REG_TX_TOP_B_FSK_MOD_FSK_REF_PATTERN_SIZE 217
  260. #define SX1302_REG_TX_TOP_B_FSK_MOD_FSK_PREAMBLE_SEQ 218
  261. #define SX1302_REG_TX_TOP_B_FSK_MOD_FSK_REF_PATTERN_EN 219
  262. #define SX1302_REG_TX_TOP_B_FSK_MOD_FSK_GAUSSIAN_SELECT_BT 220
  263. #define SX1302_REG_TX_TOP_B_FSK_MOD_FSK_GAUSSIAN_EN 221
  264. #define SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE7_FSK_REF_PATTERN 222
  265. #define SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE6_FSK_REF_PATTERN 223
  266. #define SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE5_FSK_REF_PATTERN 224
  267. #define SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE4_FSK_REF_PATTERN 225
  268. #define SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE3_FSK_REF_PATTERN 226
  269. #define SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE2_FSK_REF_PATTERN 227
  270. #define SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE1_FSK_REF_PATTERN 228
  271. #define SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE0_FSK_REF_PATTERN 229
  272. #define SX1302_REG_TX_TOP_B_DUMMY_GSFK_DUMMY 230
  273. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_0_MODEM_BW 231
  274. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_0_MODEM_SF 232
  275. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_1_PPM_OFFSET_HDR_CTRL 233
  276. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_1_PPM_OFFSET 234
  277. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_1_POST_PREAMBLE_GAP_LONG 235
  278. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_1_CODING_RATE 236
  279. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_2_FINE_SYNCH_EN 237
  280. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_2_MODEM_EN 238
  281. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_2_CADRXTX 239
  282. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_2_IMPLICIT_HEADER 240
  283. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_2_CRC_EN 241
  284. #define SX1302_REG_TX_TOP_B_TXRX_CFG0_3_PAYLOAD_LENGTH 242
  285. #define SX1302_REG_TX_TOP_B_TXRX_CFG1_0_INT_STEP_ORIDE_EN 243
  286. #define SX1302_REG_TX_TOP_B_TXRX_CFG1_0_INT_STEP_ORIDE 244
  287. #define SX1302_REG_TX_TOP_B_TXRX_CFG1_1_MODEM_START 245
  288. #define SX1302_REG_TX_TOP_B_TXRX_CFG1_1_HEADER_DIFF_MODE 246
  289. #define SX1302_REG_TX_TOP_B_TXRX_CFG1_1_ZERO_PAD 247
  290. #define SX1302_REG_TX_TOP_B_TXRX_CFG1_2_PREAMBLE_SYMB_NB 248
  291. #define SX1302_REG_TX_TOP_B_TXRX_CFG1_3_PREAMBLE_SYMB_NB 249
  292. #define SX1302_REG_TX_TOP_B_TXRX_CFG1_4_AUTO_ACK_INT_DELAY 250
  293. #define SX1302_REG_TX_TOP_B_TXRX_CFG1_4_AUTO_ACK_RX 251
  294. #define SX1302_REG_TX_TOP_B_TXRX_CFG1_4_AUTO_ACK_TX 252
  295. #define SX1302_REG_TX_TOP_B_TX_CFG0_0_CHIRP_LOWPASS 253
  296. #define SX1302_REG_TX_TOP_B_TX_CFG0_0_PPM_OFFSET_SIG 254
  297. #define SX1302_REG_TX_TOP_B_TX_CFG0_0_CONTCHIRP 255
  298. #define SX1302_REG_TX_TOP_B_TX_CFG0_0_CHIRP_INVERT 256
  299. #define SX1302_REG_TX_TOP_B_TX_CFG0_0_CONTINUOUS 257
  300. #define SX1302_REG_TX_TOP_B_TX_CFG0_1_POWER_RANGING 258
  301. #define SX1302_REG_TX_TOP_B_TX_CFG1_0_FRAME_NB 259
  302. #define SX1302_REG_TX_TOP_B_TX_CFG1_1_HOP_CTRL 260
  303. #define SX1302_REG_TX_TOP_B_TX_CFG1_1_IFS 261
  304. #define SX1302_REG_TX_TOP_B_FRAME_SYNCH_0_AUTO_SCALE 262
  305. #define SX1302_REG_TX_TOP_B_FRAME_SYNCH_0_DROP_ON_SYNCH 263
  306. #define SX1302_REG_TX_TOP_B_FRAME_SYNCH_0_GAIN 264
  307. #define SX1302_REG_TX_TOP_B_FRAME_SYNCH_0_PEAK1_POS 265
  308. #define SX1302_REG_TX_TOP_B_FRAME_SYNCH_1_FINETIME_ON_LAST 266
  309. #define SX1302_REG_TX_TOP_B_FRAME_SYNCH_1_TIMEOUT_OPT 267
  310. #define SX1302_REG_TX_TOP_B_FRAME_SYNCH_1_PEAK2_POS 268
  311. #define SX1302_REG_TX_TOP_B_LORA_TX_STATE_STATUS 269
  312. #define SX1302_REG_TX_TOP_B_LORA_TX_FLAG_FRAME_DONE 270
  313. #define SX1302_REG_TX_TOP_B_LORA_TX_FLAG_CONT_DONE 271
  314. #define SX1302_REG_TX_TOP_B_LORA_TX_FLAG_PLD_DONE 272
  315. #define SX1302_REG_TX_TOP_B_DUMMY_LORA_DUMMY 273
  316. #define SX1302_REG_GPIO_GPIO_DIR_H_DIRECTION 274
  317. #define SX1302_REG_GPIO_GPIO_DIR_L_DIRECTION 275
  318. #define SX1302_REG_GPIO_GPIO_OUT_H_OUT_VALUE 276
  319. #define SX1302_REG_GPIO_GPIO_OUT_L_OUT_VALUE 277
  320. #define SX1302_REG_GPIO_GPIO_IN_H_IN_VALUE 278
  321. #define SX1302_REG_GPIO_GPIO_IN_L_IN_VALUE 279
  322. #define SX1302_REG_GPIO_GPIO_PD_H_PD_VALUE 280
  323. #define SX1302_REG_GPIO_GPIO_PD_L_PD_VALUE 281
  324. #define SX1302_REG_GPIO_GPIO_SEL_0_SELECTION 282
  325. #define SX1302_REG_GPIO_GPIO_SEL_1_SELECTION 283
  326. #define SX1302_REG_GPIO_GPIO_SEL_2_SELECTION 284
  327. #define SX1302_REG_GPIO_GPIO_SEL_3_SELECTION 285
  328. #define SX1302_REG_GPIO_GPIO_SEL_4_SELECTION 286
  329. #define SX1302_REG_GPIO_GPIO_SEL_5_SELECTION 287
  330. #define SX1302_REG_GPIO_GPIO_SEL_6_SELECTION 288
  331. #define SX1302_REG_GPIO_GPIO_SEL_7_SELECTION 289
  332. #define SX1302_REG_GPIO_GPIO_SEL_8_11_GPIO_11_9_SEL 290
  333. #define SX1302_REG_GPIO_GPIO_SEL_8_11_GPIO_8_SEL 291
  334. #define SX1302_REG_GPIO_HOST_IRQ_TX_TIMEOUT_B 292
  335. #define SX1302_REG_GPIO_HOST_IRQ_TX_TIMEOUT_A 293
  336. #define SX1302_REG_GPIO_HOST_IRQ_TX_DONE_B 294
  337. #define SX1302_REG_GPIO_HOST_IRQ_TX_DONE_A 295
  338. #define SX1302_REG_GPIO_HOST_IRQ_TIMESTAMP 296
  339. #define SX1302_REG_GPIO_HOST_IRQ_RX_BUFFER_WATERMARK 297
  340. #define SX1302_REG_GPIO_HOST_IRQ_EN_TX_TIMEOUT_B 298
  341. #define SX1302_REG_GPIO_HOST_IRQ_EN_TX_TIMEOUT_A 299
  342. #define SX1302_REG_GPIO_HOST_IRQ_EN_TX_DONE_B 300
  343. #define SX1302_REG_GPIO_HOST_IRQ_EN_TX_DONE_A 301
  344. #define SX1302_REG_GPIO_HOST_IRQ_EN_TIMESTAMP 302
  345. #define SX1302_REG_GPIO_HOST_IRQ_EN_RX_BUFFER_WATERMARK 303
  346. #define SX1302_REG_GPIO_DUMMY_DUMMY 304
  347. #define SX1302_REG_TIMESTAMP_GPS_CTRL_GPS_POL 305
  348. #define SX1302_REG_TIMESTAMP_GPS_CTRL_GPS_EN 306
  349. #define SX1302_REG_TIMESTAMP_TIMESTAMP_PPS_MSB2_TIMESTAMP_PPS 307
  350. #define SX1302_REG_TIMESTAMP_TIMESTAMP_PPS_MSB1_TIMESTAMP_PPS 308
  351. #define SX1302_REG_TIMESTAMP_TIMESTAMP_PPS_LSB2_TIMESTAMP_PPS 309
  352. #define SX1302_REG_TIMESTAMP_TIMESTAMP_PPS_LSB1_TIMESTAMP_PPS 310
  353. #define SX1302_REG_TIMESTAMP_TIMESTAMP_MSB2_TIMESTAMP 311
  354. #define SX1302_REG_TIMESTAMP_TIMESTAMP_MSB1_TIMESTAMP 312
  355. #define SX1302_REG_TIMESTAMP_TIMESTAMP_LSB2_TIMESTAMP 313
  356. #define SX1302_REG_TIMESTAMP_TIMESTAMP_LSB1_TIMESTAMP 314
  357. #define SX1302_REG_TIMESTAMP_TIMESTAMP_SET3_TIMESTAMP 315
  358. #define SX1302_REG_TIMESTAMP_TIMESTAMP_SET2_TIMESTAMP 316
  359. #define SX1302_REG_TIMESTAMP_TIMESTAMP_SET1_TIMESTAMP 317
  360. #define SX1302_REG_TIMESTAMP_TIMESTAMP_SET0_TIMESTAMP 318
  361. #define SX1302_REG_TIMESTAMP_TIMESTAMP_IRQ_3_TIMESTAMP 319
  362. #define SX1302_REG_TIMESTAMP_TIMESTAMP_IRQ_2_TIMESTAMP 320
  363. #define SX1302_REG_TIMESTAMP_TIMESTAMP_IRQ_1_TIMESTAMP 321
  364. #define SX1302_REG_TIMESTAMP_TIMESTAMP_IRQ_0_TIMESTAMP 322
  365. #define SX1302_REG_TIMESTAMP_DUMMY_DUMMY 323
  366. #define SX1302_REG_RX_TOP_FREQ_0_MSB_IF_FREQ_0 324
  367. #define SX1302_REG_RX_TOP_FREQ_0_LSB_IF_FREQ_0 325
  368. #define SX1302_REG_RX_TOP_FREQ_1_MSB_IF_FREQ_1 326
  369. #define SX1302_REG_RX_TOP_FREQ_1_LSB_IF_FREQ_1 327
  370. #define SX1302_REG_RX_TOP_FREQ_2_MSB_IF_FREQ_2 328
  371. #define SX1302_REG_RX_TOP_FREQ_2_LSB_IF_FREQ_2 329
  372. #define SX1302_REG_RX_TOP_FREQ_3_MSB_IF_FREQ_3 330
  373. #define SX1302_REG_RX_TOP_FREQ_3_LSB_IF_FREQ_3 331
  374. #define SX1302_REG_RX_TOP_FREQ_4_MSB_IF_FREQ_4 332
  375. #define SX1302_REG_RX_TOP_FREQ_4_LSB_IF_FREQ_4 333
  376. #define SX1302_REG_RX_TOP_FREQ_5_MSB_IF_FREQ_5 334
  377. #define SX1302_REG_RX_TOP_FREQ_5_LSB_IF_FREQ_5 335
  378. #define SX1302_REG_RX_TOP_FREQ_6_MSB_IF_FREQ_6 336
  379. #define SX1302_REG_RX_TOP_FREQ_6_LSB_IF_FREQ_6 337
  380. #define SX1302_REG_RX_TOP_FREQ_7_MSB_IF_FREQ_7 338
  381. #define SX1302_REG_RX_TOP_FREQ_7_LSB_IF_FREQ_7 339
  382. #define SX1302_REG_RX_TOP_RADIO_SELECT_RADIO_SELECT 340
  383. #define SX1302_REG_RX_TOP_RSSI_CONTROL_RSSI_FILTER_ALPHA 341
  384. #define SX1302_REG_RX_TOP_RSSI_CONTROL_SELECT_RSSI 342
  385. #define SX1302_REG_RX_TOP_RSSI_DEF_VALUE_CHAN_RSSI_DEF_VALUE 343
  386. #define SX1302_REG_RX_TOP_CHANN_DAGC_CFG1_CHAN_DAGC_THRESHOLD_HIGH 344
  387. #define SX1302_REG_RX_TOP_CHANN_DAGC_CFG2_CHAN_DAGC_THRESHOLD_LOW 345
  388. #define SX1302_REG_RX_TOP_CHANN_DAGC_CFG3_CHAN_DAGC_MAX_ATTEN 346
  389. #define SX1302_REG_RX_TOP_CHANN_DAGC_CFG3_CHAN_DAGC_MIN_ATTEN 347
  390. #define SX1302_REG_RX_TOP_CHANN_DAGC_CFG4_CHAN_DAGC_STEP 348
  391. #define SX1302_REG_RX_TOP_CHANN_DAGC_CFG5_CHAN_DAGC_MODE 349
  392. #define SX1302_REG_RX_TOP_RSSI_VALUE_CHAN_RSSI 350
  393. #define SX1302_REG_RX_TOP_GAIN_CONTROL_CHAN_GAIN_VALID 351
  394. #define SX1302_REG_RX_TOP_GAIN_CONTROL_CHAN_GAIN 352
  395. #define SX1302_REG_RX_TOP_CLK_CONTROL_CHAN_CLK_EN 353
  396. #define SX1302_REG_RX_TOP_DUMMY0_DUMMY0 354
  397. #define SX1302_REG_RX_TOP_CORR_CLOCK_ENABLE_CLK_EN 355
  398. #define SX1302_REG_RX_TOP_CORRELATOR_EN_CORR_EN 356
  399. #define SX1302_REG_RX_TOP_CORRELATOR_SF_EN_CORR_SF_EN 357
  400. #define SX1302_REG_RX_TOP_CORRELATOR_ENABLE_ONLY_FIRST_DET_EDGE_ENABLE_ONLY_FIRST_DET_EDGE 358
  401. #define SX1302_REG_RX_TOP_CORRELATOR_ENABLE_ACC_CLEAR_ENABLE_CORR_ACC_CLEAR 359
  402. #define SX1302_REG_RX_TOP_SF5_CFG1_ACC_WIN_LEN 360
  403. #define SX1302_REG_RX_TOP_SF5_CFG1_ACC_PEAK_SUM_EN 361
  404. #define SX1302_REG_RX_TOP_SF5_CFG1_ACC_PEAK_POS_SEL 362
  405. #define SX1302_REG_RX_TOP_SF5_CFG1_ACC_COEFF 363
  406. #define SX1302_REG_RX_TOP_SF5_CFG1_ACC_AUTO_RESCALE 364
  407. #define SX1302_REG_RX_TOP_SF5_CFG1_ACC_2_SAME_PEAKS 365
  408. #define SX1302_REG_RX_TOP_SF5_CFG2_ACC_MIN2 366
  409. #define SX1302_REG_RX_TOP_SF5_CFG2_ACC_PNR 367
  410. #define SX1302_REG_RX_TOP_SF5_CFG3_MIN_SINGLE_PEAK 368
  411. #define SX1302_REG_RX_TOP_SF5_CFG4_MSP_PNR 369
  412. #define SX1302_REG_RX_TOP_SF5_CFG5_MSP2_PNR 370
  413. #define SX1302_REG_RX_TOP_SF5_CFG6_MSP_PEAK_NB 371
  414. #define SX1302_REG_RX_TOP_SF5_CFG6_MSP_CNT_MODE 372
  415. #define SX1302_REG_RX_TOP_SF5_CFG6_MSP_POS_SEL 373
  416. #define SX1302_REG_RX_TOP_SF5_CFG7_MSP2_PEAK_NB 374
  417. #define SX1302_REG_RX_TOP_SF5_CFG7_NOISE_COEFF 375
  418. #define SX1302_REG_RX_TOP_SF6_CFG1_ACC_WIN_LEN 376
  419. #define SX1302_REG_RX_TOP_SF6_CFG1_ACC_PEAK_SUM_EN 377
  420. #define SX1302_REG_RX_TOP_SF6_CFG1_ACC_PEAK_POS_SEL 378
  421. #define SX1302_REG_RX_TOP_SF6_CFG1_ACC_COEFF 379
  422. #define SX1302_REG_RX_TOP_SF6_CFG1_ACC_AUTO_RESCALE 380
  423. #define SX1302_REG_RX_TOP_SF6_CFG1_ACC_2_SAME_PEAKS 381
  424. #define SX1302_REG_RX_TOP_SF6_CFG2_ACC_MIN2 382
  425. #define SX1302_REG_RX_TOP_SF6_CFG2_ACC_PNR 383
  426. #define SX1302_REG_RX_TOP_SF6_CFG3_MIN_SINGLE_PEAK 384
  427. #define SX1302_REG_RX_TOP_SF6_CFG4_MSP_PNR 385
  428. #define SX1302_REG_RX_TOP_SF6_CFG5_MSP2_PNR 386
  429. #define SX1302_REG_RX_TOP_SF6_CFG6_MSP_PEAK_NB 387
  430. #define SX1302_REG_RX_TOP_SF6_CFG6_MSP_CNT_MODE 388
  431. #define SX1302_REG_RX_TOP_SF6_CFG6_MSP_POS_SEL 389
  432. #define SX1302_REG_RX_TOP_SF6_CFG7_MSP2_PEAK_NB 390
  433. #define SX1302_REG_RX_TOP_SF6_CFG7_NOISE_COEFF 391
  434. #define SX1302_REG_RX_TOP_SF7_CFG1_ACC_WIN_LEN 392
  435. #define SX1302_REG_RX_TOP_SF7_CFG1_ACC_PEAK_SUM_EN 393
  436. #define SX1302_REG_RX_TOP_SF7_CFG1_ACC_PEAK_POS_SEL 394
  437. #define SX1302_REG_RX_TOP_SF7_CFG1_ACC_COEFF 395
  438. #define SX1302_REG_RX_TOP_SF7_CFG1_ACC_AUTO_RESCALE 396
  439. #define SX1302_REG_RX_TOP_SF7_CFG1_ACC_2_SAME_PEAKS 397
  440. #define SX1302_REG_RX_TOP_SF7_CFG2_ACC_MIN2 398
  441. #define SX1302_REG_RX_TOP_SF7_CFG2_ACC_PNR 399
  442. #define SX1302_REG_RX_TOP_SF7_CFG3_MIN_SINGLE_PEAK 400
  443. #define SX1302_REG_RX_TOP_SF7_CFG4_MSP_PNR 401
  444. #define SX1302_REG_RX_TOP_SF7_CFG5_MSP2_PNR 402
  445. #define SX1302_REG_RX_TOP_SF7_CFG6_MSP_PEAK_NB 403
  446. #define SX1302_REG_RX_TOP_SF7_CFG6_MSP_CNT_MODE 404
  447. #define SX1302_REG_RX_TOP_SF7_CFG6_MSP_POS_SEL 405
  448. #define SX1302_REG_RX_TOP_SF7_CFG7_MSP2_PEAK_NB 406
  449. #define SX1302_REG_RX_TOP_SF7_CFG7_NOISE_COEFF 407
  450. #define SX1302_REG_RX_TOP_SF8_CFG1_ACC_WIN_LEN 408
  451. #define SX1302_REG_RX_TOP_SF8_CFG1_ACC_PEAK_SUM_EN 409
  452. #define SX1302_REG_RX_TOP_SF8_CFG1_ACC_PEAK_POS_SEL 410
  453. #define SX1302_REG_RX_TOP_SF8_CFG1_ACC_COEFF 411
  454. #define SX1302_REG_RX_TOP_SF8_CFG1_ACC_AUTO_RESCALE 412
  455. #define SX1302_REG_RX_TOP_SF8_CFG1_ACC_2_SAME_PEAKS 413
  456. #define SX1302_REG_RX_TOP_SF8_CFG2_ACC_MIN2 414
  457. #define SX1302_REG_RX_TOP_SF8_CFG2_ACC_PNR 415
  458. #define SX1302_REG_RX_TOP_SF8_CFG3_MIN_SINGLE_PEAK 416
  459. #define SX1302_REG_RX_TOP_SF8_CFG4_MSP_PNR 417
  460. #define SX1302_REG_RX_TOP_SF8_CFG5_MSP2_PNR 418
  461. #define SX1302_REG_RX_TOP_SF8_CFG6_MSP_PEAK_NB 419
  462. #define SX1302_REG_RX_TOP_SF8_CFG6_MSP_CNT_MODE 420
  463. #define SX1302_REG_RX_TOP_SF8_CFG6_MSP_POS_SEL 421
  464. #define SX1302_REG_RX_TOP_SF8_CFG7_MSP2_PEAK_NB 422
  465. #define SX1302_REG_RX_TOP_SF8_CFG7_NOISE_COEFF 423
  466. #define SX1302_REG_RX_TOP_SF9_CFG1_ACC_WIN_LEN 424
  467. #define SX1302_REG_RX_TOP_SF9_CFG1_ACC_PEAK_SUM_EN 425
  468. #define SX1302_REG_RX_TOP_SF9_CFG1_ACC_PEAK_POS_SEL 426
  469. #define SX1302_REG_RX_TOP_SF9_CFG1_ACC_COEFF 427
  470. #define SX1302_REG_RX_TOP_SF9_CFG1_ACC_AUTO_RESCALE 428
  471. #define SX1302_REG_RX_TOP_SF9_CFG1_ACC_2_SAME_PEAKS 429
  472. #define SX1302_REG_RX_TOP_SF9_CFG2_ACC_MIN2 430
  473. #define SX1302_REG_RX_TOP_SF9_CFG2_ACC_PNR 431
  474. #define SX1302_REG_RX_TOP_SF9_CFG3_MIN_SINGLE_PEAK 432
  475. #define SX1302_REG_RX_TOP_SF9_CFG4_MSP_PNR 433
  476. #define SX1302_REG_RX_TOP_SF9_CFG5_MSP2_PNR 434
  477. #define SX1302_REG_RX_TOP_SF9_CFG6_MSP_PEAK_NB 435
  478. #define SX1302_REG_RX_TOP_SF9_CFG6_MSP_CNT_MODE 436
  479. #define SX1302_REG_RX_TOP_SF9_CFG6_MSP_POS_SEL 437
  480. #define SX1302_REG_RX_TOP_SF9_CFG7_MSP2_PEAK_NB 438
  481. #define SX1302_REG_RX_TOP_SF9_CFG7_NOISE_COEFF 439
  482. #define SX1302_REG_RX_TOP_SF10_CFG1_ACC_WIN_LEN 440
  483. #define SX1302_REG_RX_TOP_SF10_CFG1_ACC_PEAK_SUM_EN 441
  484. #define SX1302_REG_RX_TOP_SF10_CFG1_ACC_PEAK_POS_SEL 442
  485. #define SX1302_REG_RX_TOP_SF10_CFG1_ACC_COEFF 443
  486. #define SX1302_REG_RX_TOP_SF10_CFG1_ACC_AUTO_RESCALE 444
  487. #define SX1302_REG_RX_TOP_SF10_CFG1_ACC_2_SAME_PEAKS 445
  488. #define SX1302_REG_RX_TOP_SF10_CFG2_ACC_MIN2 446
  489. #define SX1302_REG_RX_TOP_SF10_CFG2_ACC_PNR 447
  490. #define SX1302_REG_RX_TOP_SF10_CFG3_MIN_SINGLE_PEAK 448
  491. #define SX1302_REG_RX_TOP_SF10_CFG4_MSP_PNR 449
  492. #define SX1302_REG_RX_TOP_SF10_CFG5_MSP2_PNR 450
  493. #define SX1302_REG_RX_TOP_SF10_CFG6_MSP_PEAK_NB 451
  494. #define SX1302_REG_RX_TOP_SF10_CFG6_MSP_CNT_MODE 452
  495. #define SX1302_REG_RX_TOP_SF10_CFG6_MSP_POS_SEL 453
  496. #define SX1302_REG_RX_TOP_SF10_CFG7_MSP2_PEAK_NB 454
  497. #define SX1302_REG_RX_TOP_SF10_CFG7_NOISE_COEFF 455
  498. #define SX1302_REG_RX_TOP_SF11_CFG1_ACC_WIN_LEN 456
  499. #define SX1302_REG_RX_TOP_SF11_CFG1_ACC_PEAK_SUM_EN 457
  500. #define SX1302_REG_RX_TOP_SF11_CFG1_ACC_PEAK_POS_SEL 458
  501. #define SX1302_REG_RX_TOP_SF11_CFG1_ACC_COEFF 459
  502. #define SX1302_REG_RX_TOP_SF11_CFG1_ACC_AUTO_RESCALE 460
  503. #define SX1302_REG_RX_TOP_SF11_CFG1_ACC_2_SAME_PEAKS 461
  504. #define SX1302_REG_RX_TOP_SF11_CFG2_ACC_MIN2 462
  505. #define SX1302_REG_RX_TOP_SF11_CFG2_ACC_PNR 463
  506. #define SX1302_REG_RX_TOP_SF11_CFG3_MIN_SINGLE_PEAK 464
  507. #define SX1302_REG_RX_TOP_SF11_CFG4_MSP_PNR 465
  508. #define SX1302_REG_RX_TOP_SF11_CFG5_MSP2_PNR 466
  509. #define SX1302_REG_RX_TOP_SF11_CFG6_MSP_PEAK_NB 467
  510. #define SX1302_REG_RX_TOP_SF11_CFG6_MSP_CNT_MODE 468
  511. #define SX1302_REG_RX_TOP_SF11_CFG6_MSP_POS_SEL 469
  512. #define SX1302_REG_RX_TOP_SF11_CFG7_MSP2_PEAK_NB 470
  513. #define SX1302_REG_RX_TOP_SF11_CFG7_NOISE_COEFF 471
  514. #define SX1302_REG_RX_TOP_SF12_CFG1_ACC_WIN_LEN 472
  515. #define SX1302_REG_RX_TOP_SF12_CFG1_ACC_PEAK_SUM_EN 473
  516. #define SX1302_REG_RX_TOP_SF12_CFG1_ACC_PEAK_POS_SEL 474
  517. #define SX1302_REG_RX_TOP_SF12_CFG1_ACC_COEFF 475
  518. #define SX1302_REG_RX_TOP_SF12_CFG1_ACC_AUTO_RESCALE 476
  519. #define SX1302_REG_RX_TOP_SF12_CFG1_ACC_2_SAME_PEAKS 477
  520. #define SX1302_REG_RX_TOP_SF12_CFG2_ACC_MIN2 478
  521. #define SX1302_REG_RX_TOP_SF12_CFG2_ACC_PNR 479
  522. #define SX1302_REG_RX_TOP_SF12_CFG3_MIN_SINGLE_PEAK 480
  523. #define SX1302_REG_RX_TOP_SF12_CFG4_MSP_PNR 481
  524. #define SX1302_REG_RX_TOP_SF12_CFG5_MSP2_PNR 482
  525. #define SX1302_REG_RX_TOP_SF12_CFG6_MSP_PEAK_NB 483
  526. #define SX1302_REG_RX_TOP_SF12_CFG6_MSP_CNT_MODE 484
  527. #define SX1302_REG_RX_TOP_SF12_CFG6_MSP_POS_SEL 485
  528. #define SX1302_REG_RX_TOP_SF12_CFG7_MSP2_PEAK_NB 486
  529. #define SX1302_REG_RX_TOP_SF12_CFG7_NOISE_COEFF 487
  530. #define SX1302_REG_RX_TOP_DUMMY1_DUMMY1 488
  531. #define SX1302_REG_RX_TOP_DC_NOTCH_CFG1_BW_START 489
  532. #define SX1302_REG_RX_TOP_DC_NOTCH_CFG1_AUTO_BW_RED 490
  533. #define SX1302_REG_RX_TOP_DC_NOTCH_CFG1_NO_FAST_START 491
  534. #define SX1302_REG_RX_TOP_DC_NOTCH_CFG1_BYPASS 492
  535. #define SX1302_REG_RX_TOP_DC_NOTCH_CFG1_ENABLE 493
  536. #define SX1302_REG_RX_TOP_DC_NOTCH_CFG2_BW_LOCKED 494
  537. #define SX1302_REG_RX_TOP_DC_NOTCH_CFG2_BW 495
  538. #define SX1302_REG_RX_TOP_DC_NOTCH_CFG3_BW_RED 496
  539. #define SX1302_REG_RX_TOP_DC_NOTCH_CFG4_IIR_DCC_TIME 497
  540. #define SX1302_REG_RX_TOP_RX_DFE_FIR1_0_FIR1_COEFF_0 498
  541. #define SX1302_REG_RX_TOP_RX_DFE_FIR1_1_FIR1_COEFF_1 499
  542. #define SX1302_REG_RX_TOP_RX_DFE_FIR1_2_FIR1_COEFF_2 500
  543. #define SX1302_REG_RX_TOP_RX_DFE_FIR1_3_FIR1_COEFF_3 501
  544. #define SX1302_REG_RX_TOP_RX_DFE_FIR1_4_FIR1_COEFF_4 502
  545. #define SX1302_REG_RX_TOP_RX_DFE_FIR1_5_FIR1_COEFF_5 503
  546. #define SX1302_REG_RX_TOP_RX_DFE_FIR1_6_FIR1_COEFF_6 504
  547. #define SX1302_REG_RX_TOP_RX_DFE_FIR1_7_FIR1_COEFF_7 505
  548. #define SX1302_REG_RX_TOP_RX_DFE_FIR2_0_FIR2_COEFF_0 506
  549. #define SX1302_REG_RX_TOP_RX_DFE_FIR2_1_FIR2_COEFF_1 507
  550. #define SX1302_REG_RX_TOP_RX_DFE_FIR2_2_FIR2_COEFF_2 508
  551. #define SX1302_REG_RX_TOP_RX_DFE_FIR2_3_FIR2_COEFF_3 509
  552. #define SX1302_REG_RX_TOP_RX_DFE_FIR2_4_FIR2_COEFF_4 510
  553. #define SX1302_REG_RX_TOP_RX_DFE_FIR2_5_FIR2_COEFF_5 511
  554. #define SX1302_REG_RX_TOP_RX_DFE_FIR2_6_FIR2_COEFF_6 512
  555. #define SX1302_REG_RX_TOP_RX_DFE_FIR2_7_FIR2_COEFF_7 513
  556. #define SX1302_REG_RX_TOP_RX_DFE_AGC0_RADIO_GAIN_RED_SEL 514
  557. #define SX1302_REG_RX_TOP_RX_DFE_AGC0_RADIO_GAIN_RED_DB 515
  558. #define SX1302_REG_RX_TOP_RX_DFE_AGC1_DC_COMP_EN 516
  559. #define SX1302_REG_RX_TOP_RX_DFE_AGC1_FORCE_DEFAULT_FIR 517
  560. #define SX1302_REG_RX_TOP_RX_DFE_AGC1_RSSI_EARLY_LATCH 518
  561. #define SX1302_REG_RX_TOP_RX_DFE_AGC1_FREEZE_ON_SYNC 519
  562. #define SX1302_REG_RX_TOP_RX_DFE_AGC2_DAGC_IN_COMP 520
  563. #define SX1302_REG_RX_TOP_RX_DFE_AGC2_DAGC_FIR_HYST 521
  564. #define SX1302_REG_RX_TOP_RX_DFE_AGC2_RSSI_MAX_SAMPLE 522
  565. #define SX1302_REG_RX_TOP_RX_DFE_AGC2_RSSI_MIN_SAMPLE 523
  566. #define SX1302_REG_RX_TOP_RX_DFE_GAIN0_DAGC_FIR_FAST 524
  567. #define SX1302_REG_RX_TOP_RX_DFE_GAIN0_FORCE_GAIN_FIR 525
  568. #define SX1302_REG_RX_TOP_RX_DFE_GAIN0_GAIN_FIR1 526
  569. #define SX1302_REG_RX_TOP_RX_DFE_GAIN0_GAIN_FIR2 527
  570. #define SX1302_REG_RX_TOP_DAGC_CFG_TARGET_LVL 528
  571. #define SX1302_REG_RX_TOP_DAGC_CFG_GAIN_INCR_STEP 529
  572. #define SX1302_REG_RX_TOP_DAGC_CFG_GAIN_DROP_COMP 530
  573. #define SX1302_REG_RX_TOP_DAGC_CFG_COMB_FILTER_EN 531
  574. #define SX1302_REG_RX_TOP_DAGC_CFG_NO_FREEZE_START 532
  575. #define SX1302_REG_RX_TOP_DAGC_CFG_FREEZE_ON_SYNC 533
  576. #define SX1302_REG_RX_TOP_DAGC_CNT0_SAMPLE 534
  577. #define SX1302_REG_RX_TOP_DAGC_CNT1_THR_M6 535
  578. #define SX1302_REG_RX_TOP_DAGC_CNT2_THR_M12 536
  579. #define SX1302_REG_RX_TOP_DAGC_CNT3_THR_M18 537
  580. #define SX1302_REG_RX_TOP_DAGC_CNT4_GAIN 538
  581. #define SX1302_REG_RX_TOP_DAGC_CNT4_FORCE_GAIN 539
  582. #define SX1302_REG_RX_TOP_TXRX_CFG1_PPM_OFFSET_HDR_CTRL 540
  583. #define SX1302_REG_RX_TOP_TXRX_CFG1_PPM_OFFSET 541
  584. #define SX1302_REG_RX_TOP_TXRX_CFG1_MODEM_EN 542
  585. #define SX1302_REG_RX_TOP_TXRX_CFG1_CODING_RATE 543
  586. #define SX1302_REG_RX_TOP_TXRX_CFG2_MODEM_START 544
  587. #define SX1302_REG_RX_TOP_TXRX_CFG2_CADRXTX 545
  588. #define SX1302_REG_RX_TOP_TXRX_CFG2_IMPLICIT_HEADER 546
  589. #define SX1302_REG_RX_TOP_TXRX_CFG2_CRC_EN 547
  590. #define SX1302_REG_RX_TOP_TXRX_CFG3_PAYLOAD_LENGTH 548
  591. #define SX1302_REG_RX_TOP_TXRX_CFG4_INT_STEP_ORIDE_EN 549
  592. #define SX1302_REG_RX_TOP_TXRX_CFG4_INT_STEP_ORIDE 550
  593. #define SX1302_REG_RX_TOP_TXRX_CFG5_HEADER_DIFF_MODE 551
  594. #define SX1302_REG_RX_TOP_TXRX_CFG5_ZERO_PAD 552
  595. #define SX1302_REG_RX_TOP_TXRX_CFG6_PREAMBLE_SYMB_NB 553
  596. #define SX1302_REG_RX_TOP_TXRX_CFG7_PREAMBLE_SYMB_NB 554
  597. #define SX1302_REG_RX_TOP_TXRX_CFG8_AUTO_ACK_INT_DELAY 555
  598. #define SX1302_REG_RX_TOP_TXRX_CFG8_AUTO_ACK_RX 556
  599. #define SX1302_REG_RX_TOP_TXRX_CFG8_AUTO_ACK_TX 557
  600. #define SX1302_REG_RX_TOP_TXRX_CFG8_POST_PREAMBLE_GAP_LONG 558
  601. #define SX1302_REG_RX_TOP_TXRX_CFG9_FINE_SYNCH_EN_SF12 559
  602. #define SX1302_REG_RX_TOP_TXRX_CFG9_FINE_SYNCH_EN_SF11 560
  603. #define SX1302_REG_RX_TOP_TXRX_CFG9_FINE_SYNCH_EN_SF10 561
  604. #define SX1302_REG_RX_TOP_TXRX_CFG9_FINE_SYNCH_EN_SF9 562
  605. #define SX1302_REG_RX_TOP_TXRX_CFG9_FINE_SYNCH_EN_SF8 563
  606. #define SX1302_REG_RX_TOP_TXRX_CFG9_FINE_SYNCH_EN_SF7 564
  607. #define SX1302_REG_RX_TOP_TXRX_CFG9_FINE_SYNCH_EN_SF6 565
  608. #define SX1302_REG_RX_TOP_TXRX_CFG9_FINE_SYNCH_EN_SF5 566
  609. #define SX1302_REG_RX_TOP_RX_CFG0_DFT_PEAK_EN 567
  610. #define SX1302_REG_RX_TOP_RX_CFG0_CHIRP_INVERT 568
  611. #define SX1302_REG_RX_TOP_RX_CFG0_SWAP_IQ 569
  612. #define SX1302_REG_RX_TOP_RX_CFG0_CONTINUOUS 570
  613. #define SX1302_REG_RX_TOP_RX_CFG1_DETECT_TIMEOUT 571
  614. #define SX1302_REG_RX_TOP_RX_CFG2_CLK_EN_RESYNC_DIN 572
  615. #define SX1302_REG_RX_TOP_RX_CFG2_LLR_SCALE 573
  616. #define SX1302_REG_RX_TOP_FRAME_SYNCH0_SF5_PEAK1_POS_SF5 574
  617. #define SX1302_REG_RX_TOP_FRAME_SYNCH1_SF5_PEAK2_POS_SF5 575
  618. #define SX1302_REG_RX_TOP_FRAME_SYNCH0_SF6_PEAK1_POS_SF6 576
  619. #define SX1302_REG_RX_TOP_FRAME_SYNCH1_SF6_PEAK2_POS_SF6 577
  620. #define SX1302_REG_RX_TOP_FRAME_SYNCH0_SF7TO12_PEAK1_POS_SF7TO12 578
  621. #define SX1302_REG_RX_TOP_FRAME_SYNCH1_SF7TO12_PEAK2_POS_SF7TO12 579
  622. #define SX1302_REG_RX_TOP_FRAME_SYNCH2_FINETIME_ON_LAST 580
  623. #define SX1302_REG_RX_TOP_FRAME_SYNCH2_AUTO_SCALE 581
  624. #define SX1302_REG_RX_TOP_FRAME_SYNCH2_DROP_ON_SYNCH 582
  625. #define SX1302_REG_RX_TOP_FRAME_SYNCH2_GAIN 583
  626. #define SX1302_REG_RX_TOP_FRAME_SYNCH2_TIMEOUT_OPT 584
  627. #define SX1302_REG_RX_TOP_FINE_TIMING_A_0_GAIN_P_HDR_RED 585
  628. #define SX1302_REG_RX_TOP_FINE_TIMING_A_0_ROUNDING 586
  629. #define SX1302_REG_RX_TOP_FINE_TIMING_A_0_POS_LIMIT 587
  630. #define SX1302_REG_RX_TOP_FINE_TIMING_A_0_SUM_SIZE 588
  631. #define SX1302_REG_RX_TOP_FINE_TIMING_A_0_MODE 589
  632. #define SX1302_REG_RX_TOP_FINE_TIMING_A_1_GAIN_P_AUTO 590
  633. #define SX1302_REG_RX_TOP_FINE_TIMING_A_1_GAIN_P_PAYLOAD 591
  634. #define SX1302_REG_RX_TOP_FINE_TIMING_A_1_GAIN_P_PREAMB 592
  635. #define SX1302_REG_RX_TOP_FINE_TIMING_A_2_GAIN_I_AUTO 593
  636. #define SX1302_REG_RX_TOP_FINE_TIMING_A_2_GAIN_I_PAYLOAD 594
  637. #define SX1302_REG_RX_TOP_FINE_TIMING_A_2_GAIN_I_PREAMB 595
  638. #define SX1302_REG_RX_TOP_FINE_TIMING_A_3_FINESYNCH_SUM 596
  639. #define SX1302_REG_RX_TOP_FINE_TIMING_A_3_FINESYNCH_GAIN 597
  640. #define SX1302_REG_RX_TOP_FINE_TIMING_A_4_GAIN_I_EN_SF8 598
  641. #define SX1302_REG_RX_TOP_FINE_TIMING_A_4_GAIN_I_EN_SF7 599
  642. #define SX1302_REG_RX_TOP_FINE_TIMING_A_4_GAIN_I_EN_SF6 600
  643. #define SX1302_REG_RX_TOP_FINE_TIMING_A_4_GAIN_I_EN_SF5 601
  644. #define SX1302_REG_RX_TOP_FINE_TIMING_A_5_GAIN_I_EN_SF12 602
  645. #define SX1302_REG_RX_TOP_FINE_TIMING_A_5_GAIN_I_EN_SF11 603
  646. #define SX1302_REG_RX_TOP_FINE_TIMING_A_5_GAIN_I_EN_SF10 604
  647. #define SX1302_REG_RX_TOP_FINE_TIMING_A_5_GAIN_I_EN_SF9 605
  648. #define SX1302_REG_RX_TOP_FINE_TIMING_A_6_GAIN_P_PREAMB_SF12 606
  649. #define SX1302_REG_RX_TOP_FINE_TIMING_A_6_GAIN_P_PREAMB_SF5_6 607
  650. #define SX1302_REG_RX_TOP_FINE_TIMING_7_GAIN_I_AUTO_MAX 608
  651. #define SX1302_REG_RX_TOP_FINE_TIMING_7_GAIN_P_AUTO_MAX 609
  652. #define SX1302_REG_RX_TOP_FINE_TIMING_B_0_GAIN_P_HDR_RED 610
  653. #define SX1302_REG_RX_TOP_FINE_TIMING_B_0_ROUNDING 611
  654. #define SX1302_REG_RX_TOP_FINE_TIMING_B_0_POS_LIMIT 612
  655. #define SX1302_REG_RX_TOP_FINE_TIMING_B_0_SUM_SIZE 613
  656. #define SX1302_REG_RX_TOP_FINE_TIMING_B_0_MODE 614
  657. #define SX1302_REG_RX_TOP_FINE_TIMING_B_1_GAIN_P_AUTO 615
  658. #define SX1302_REG_RX_TOP_FINE_TIMING_B_1_GAIN_P_PAYLOAD 616
  659. #define SX1302_REG_RX_TOP_FINE_TIMING_B_1_GAIN_P_PREAMB 617
  660. #define SX1302_REG_RX_TOP_FINE_TIMING_B_2_GAIN_I_AUTO 618
  661. #define SX1302_REG_RX_TOP_FINE_TIMING_B_2_GAIN_I_PAYLOAD 619
  662. #define SX1302_REG_RX_TOP_FINE_TIMING_B_2_GAIN_I_PREAMB 620
  663. #define SX1302_REG_RX_TOP_FINE_TIMING_B_3_FINESYNCH_SUM 621
  664. #define SX1302_REG_RX_TOP_FINE_TIMING_B_3_FINESYNCH_GAIN 622
  665. #define SX1302_REG_RX_TOP_FINE_TIMING_B_4_GAIN_I_EN_SF8 623
  666. #define SX1302_REG_RX_TOP_FINE_TIMING_B_4_GAIN_I_EN_SF7 624
  667. #define SX1302_REG_RX_TOP_FINE_TIMING_B_4_GAIN_I_EN_SF6 625
  668. #define SX1302_REG_RX_TOP_FINE_TIMING_B_4_GAIN_I_EN_SF5 626
  669. #define SX1302_REG_RX_TOP_FINE_TIMING_B_5_GAIN_I_EN_SF12 627
  670. #define SX1302_REG_RX_TOP_FINE_TIMING_B_5_GAIN_I_EN_SF11 628
  671. #define SX1302_REG_RX_TOP_FINE_TIMING_B_5_GAIN_I_EN_SF10 629
  672. #define SX1302_REG_RX_TOP_FINE_TIMING_B_5_GAIN_I_EN_SF9 630
  673. #define SX1302_REG_RX_TOP_FINE_TIMING_B_6_GAIN_P_PREAMB_SF12 631
  674. #define SX1302_REG_RX_TOP_FINE_TIMING_B_6_GAIN_P_PREAMB_SF5_6 632
  675. #define SX1302_REG_RX_TOP_FREQ_TO_TIME0_FREQ_TO_TIME_DRIFT_MANT 633
  676. #define SX1302_REG_RX_TOP_FREQ_TO_TIME1_FREQ_TO_TIME_DRIFT_MANT 634
  677. #define SX1302_REG_RX_TOP_FREQ_TO_TIME2_FREQ_TO_TIME_DRIFT_EXP 635
  678. #define SX1302_REG_RX_TOP_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_FREQ_DELTA 636
  679. #define SX1302_REG_RX_TOP_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_FINE_DELTA 637
  680. #define SX1302_REG_RX_TOP_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_FREQ_ERROR 638
  681. #define SX1302_REG_RX_TOP_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_TIME_SYMB 639
  682. #define SX1302_REG_RX_TOP_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_TIME_OFFSET 640
  683. #define SX1302_REG_RX_TOP_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_DETECT 641
  684. #define SX1302_REG_RX_TOP_FREQ_TO_TIME4_FREQ_TO_TIME_INVERT_RNG 642
  685. #define SX1302_REG_RX_TOP_FREQ_TRACK_A_0_FREQ_TRACK_EN_SF8 643
  686. #define SX1302_REG_RX_TOP_FREQ_TRACK_A_0_FREQ_TRACK_EN_SF7 644
  687. #define SX1302_REG_RX_TOP_FREQ_TRACK_A_0_FREQ_TRACK_EN_SF6 645
  688. #define SX1302_REG_RX_TOP_FREQ_TRACK_A_0_FREQ_TRACK_EN_SF5 646
  689. #define SX1302_REG_RX_TOP_FREQ_TRACK_A_1_FREQ_TRACK_EN_SF12 647
  690. #define SX1302_REG_RX_TOP_FREQ_TRACK_A_1_FREQ_TRACK_EN_SF11 648
  691. #define SX1302_REG_RX_TOP_FREQ_TRACK_A_1_FREQ_TRACK_EN_SF10 649
  692. #define SX1302_REG_RX_TOP_FREQ_TRACK_A_1_FREQ_TRACK_EN_SF9 650
  693. #define SX1302_REG_RX_TOP_FREQ_TRACK_B_0_FREQ_TRACK_EN_SF8 651
  694. #define SX1302_REG_RX_TOP_FREQ_TRACK_B_0_FREQ_TRACK_EN_SF7 652
  695. #define SX1302_REG_RX_TOP_FREQ_TRACK_B_0_FREQ_TRACK_EN_SF6 653
  696. #define SX1302_REG_RX_TOP_FREQ_TRACK_B_0_FREQ_TRACK_EN_SF5 654
  697. #define SX1302_REG_RX_TOP_FREQ_TRACK_B_1_FREQ_TRACK_EN_SF12 655
  698. #define SX1302_REG_RX_TOP_FREQ_TRACK_B_1_FREQ_TRACK_EN_SF11 656
  699. #define SX1302_REG_RX_TOP_FREQ_TRACK_B_1_FREQ_TRACK_EN_SF10 657
  700. #define SX1302_REG_RX_TOP_FREQ_TRACK_B_1_FREQ_TRACK_EN_SF9 658
  701. #define SX1302_REG_RX_TOP_FREQ_TRACK2_FREQ_TRACK_FINE 659
  702. #define SX1302_REG_RX_TOP_FREQ_TRACK2_FREQ_TRACK_HDR_SKIP 660
  703. #define SX1302_REG_RX_TOP_FREQ_TRACK3_FREQ_SYNCH_GAIN 661
  704. #define SX1302_REG_RX_TOP_FREQ_TRACK3_FREQ_TRACK_AUTO_THR 662
  705. #define SX1302_REG_RX_TOP_FREQ_TRACK4_SNR_MIN_WINDOW 663
  706. #define SX1302_REG_RX_TOP_FREQ_TRACK4_GAIN_AUTO_SNR_MIN 664
  707. #define SX1302_REG_RX_TOP_FREQ_TRACK4_FREQ_SYNCH_THR 665
  708. #define SX1302_REG_RX_TOP_DETECT_MSP0_MSP_PNR 666
  709. #define SX1302_REG_RX_TOP_DETECT_MSP1_MSP2_PNR 667
  710. #define SX1302_REG_RX_TOP_DETECT_MSP2_MSP2_PEAK_NB 668
  711. #define SX1302_REG_RX_TOP_DETECT_MSP2_MSP_PEAK_NB 669
  712. #define SX1302_REG_RX_TOP_DETECT_MSP3_ACC_MIN2 670
  713. #define SX1302_REG_RX_TOP_DETECT_MSP3_ACC_WIN_LEN 671
  714. #define SX1302_REG_RX_TOP_DETECT_MSP3_MSP_POS_SEL 672
  715. #define SX1302_REG_RX_TOP_DETECT_MSP3_MSP_CNT_MODE 673
  716. #define SX1302_REG_RX_TOP_DETECT_ACC1_USE_GAIN_SYMB 674
  717. #define SX1302_REG_RX_TOP_DETECT_ACC1_ACC_PNR 675
  718. #define SX1302_REG_RX_TOP_DETECT_ACC2_NOISE_COEFF 676
  719. #define SX1302_REG_RX_TOP_DETECT_ACC2_ACC_COEFF 677
  720. #define SX1302_REG_RX_TOP_DETECT_ACC2_ACC_2_SAME_PEAKS 678
  721. #define SX1302_REG_RX_TOP_DETECT_ACC2_ACC_AUTO_RESCALE 679
  722. #define SX1302_REG_RX_TOP_DETECT_ACC2_ACC_PEAK_POS_SEL 680
  723. #define SX1302_REG_RX_TOP_DETECT_ACC2_ACC_PEAK_SUM_EN 681
  724. #define SX1302_REG_RX_TOP_DETECT_ACC3_MIN_SINGLE_PEAK 682
  725. #define SX1302_REG_RX_TOP_TIMESTAMP_SEL_SNR_MIN 683
  726. #define SX1302_REG_RX_TOP_TIMESTAMP_ENABLE 684
  727. #define SX1302_REG_RX_TOP_TIMESTAMP_NB_SYMB 685
  728. #define SX1302_REG_RX_TOP_MODEM_BUSY_MSB_RX_MODEM_BUSY 686
  729. #define SX1302_REG_RX_TOP_MODEM_BUSY_LSB_RX_MODEM_BUSY 687
  730. #define SX1302_REG_RX_TOP_MODEM_STATE_RX_MODEM_STS_SPARE 688
  731. #define SX1302_REG_RX_TOP_MODEM_STATE_RX_MODEM_STATE 689
  732. #define SX1302_REG_RX_TOP_MODEM_SYNC_DELTA_MSB_PEAK_POS_FINE_GAIN_H 690
  733. #define SX1302_REG_RX_TOP_MODEM_SYNC_DELTA_MSB_PEAK_POS_FINE_GAIN_L 691
  734. #define SX1302_REG_RX_TOP_MODEM_SYNC_DELTA_MSB_PEAK_POS_FINE_SIGN 692
  735. #define SX1302_REG_RX_TOP_MODEM_SYNC_DELTA_MSB_MODEM_SYNC_DELTA 693
  736. #define SX1302_REG_RX_TOP_MODEM_SYNC_DELTA_LSB_MODEM_SYNC_DELTA 694
  737. #define SX1302_REG_RX_TOP_MODEM_PPM_OFFSET1_PPM_OFFSET_SF8 695
  738. #define SX1302_REG_RX_TOP_MODEM_PPM_OFFSET1_PPM_OFFSET_SF7 696
  739. #define SX1302_REG_RX_TOP_MODEM_PPM_OFFSET1_PPM_OFFSET_SF6 697
  740. #define SX1302_REG_RX_TOP_MODEM_PPM_OFFSET1_PPM_OFFSET_SF5 698
  741. #define SX1302_REG_RX_TOP_MODEM_PPM_OFFSET2_PPM_OFFSET_SF12 699
  742. #define SX1302_REG_RX_TOP_MODEM_PPM_OFFSET2_PPM_OFFSET_SF11 700
  743. #define SX1302_REG_RX_TOP_MODEM_PPM_OFFSET2_PPM_OFFSET_SF10 701
  744. #define SX1302_REG_RX_TOP_MODEM_PPM_OFFSET2_PPM_OFFSET_SF9 702
  745. #define SX1302_REG_RX_TOP_MODEM_CLOCK_GATE_OVERRIDE_3_CLK_OVERRIDE 703
  746. #define SX1302_REG_RX_TOP_MODEM_CLOCK_GATE_OVERRIDE_2_CLK_OVERRIDE 704
  747. #define SX1302_REG_RX_TOP_MODEM_CLOCK_GATE_OVERRIDE_1_CLK_OVERRIDE 705
  748. #define SX1302_REG_RX_TOP_MODEM_CLOCK_GATE_OVERRIDE_0_CLK_OVERRIDE 706
  749. #define SX1302_REG_RX_TOP_DUMMY2_DUMMY2 707
  750. #define SX1302_REG_RX_TOP_RX_BUFFER_DEBUG_MODE 708
  751. #define SX1302_REG_RX_TOP_RX_BUFFER_DIRECT_RAM_IF 709
  752. #define SX1302_REG_RX_TOP_RX_BUFFER_LEGACY_TIMESTAMP 710
  753. #define SX1302_REG_RX_TOP_RX_BUFFER_STORE_HEADER_ERR_META 711
  754. #define SX1302_REG_RX_TOP_RX_BUFFER_STORE_SYNC_FAIL_META 712
  755. #define SX1302_REG_RX_TOP_RX_BUFFER_TIMESTAMP_CFG_MAX_TS_METRICS 713
  756. #define SX1302_REG_RX_TOP_RX_BUFFER_IRQ_CTRL_MSB_RX_BUFFER_IRQ_THRESHOLD 714
  757. #define SX1302_REG_RX_TOP_RX_BUFFER_IRQ_CTRL_LSB_RX_BUFFER_IRQ_THRESHOLD 715
  758. #define SX1302_REG_RX_TOP_RX_BUFFER_LAST_ADDR_READ_MSB_LAST_ADDR_READ 716
  759. #define SX1302_REG_RX_TOP_RX_BUFFER_LAST_ADDR_READ_LSB_LAST_ADDR_READ 717
  760. #define SX1302_REG_RX_TOP_RX_BUFFER_LAST_ADDR_WRITE_MSB_LAST_ADDR_WRITE 718
  761. #define SX1302_REG_RX_TOP_RX_BUFFER_LAST_ADDR_WRITE_LSB_LAST_ADDR_WRITE 719
  762. #define SX1302_REG_RX_TOP_RX_BUFFER_NB_BYTES_MSB_RX_BUFFER_NB_BYTES 720
  763. #define SX1302_REG_RX_TOP_RX_BUFFER_NB_BYTES_LSB_RX_BUFFER_NB_BYTES 721
  764. #define SX1302_REG_RX_TOP_MULTI_SF_SYNC_ERR_PKT_CNT_MULTI_SF_SYNC_ERR_PKTS 722
  765. #define SX1302_REG_RX_TOP_MULTI_SF_PLD_ERR_PKT_CNT_MULTI_SF_PLD_ERR_PKTS 723
  766. #define SX1302_REG_RX_TOP_MULTI_SF_GOOD_PKT_CNT_MULTI_SF_GOOD_PKTS 724
  767. #define SX1302_REG_RX_TOP_SERV_MODEM_SYNC_ERR_PKT_CNT_SERV_MODEM_SYNC_ERR_PKTS 725
  768. #define SX1302_REG_RX_TOP_SERV_MODEM_PLD_ERR_PKT_CNT_SERV_MODEM_PLD_ERR_PKTS 726
  769. #define SX1302_REG_RX_TOP_SERV_MODEM_GOOD_PKT_CNT_SERV_MODEM_GOOD_PKTS 727
  770. #define SX1302_REG_RX_TOP_GFSK_MODEM_SYNC_ERR_PKT_CNT_GFSK_MODEM_SYNC_ERR_PKTS 728
  771. #define SX1302_REG_RX_TOP_GFSK_MODEM_PLD_ERR_PKT_CNT_GFSK_MODEM_PLD_ERR_PKTS 729
  772. #define SX1302_REG_RX_TOP_GFSK_MODEM_GOOD_PKT_CNT_GFSK_MODEM_GOOD_PKTS 730
  773. #define SX1302_REG_RX_TOP_BAD_MODEM_ID_WRITE_0_BAD_MODEM_ID_WRITE 731
  774. #define SX1302_REG_RX_TOP_BAD_MODEM_ID_WRITE_1_BAD_MODEM_ID_WRITE 732
  775. #define SX1302_REG_RX_TOP_BAD_MODEM_ID_WRITE_2_BAD_MODEM_ID_WRITE 733
  776. #define SX1302_REG_RX_TOP_BAD_MODEM_ID_READ_0_BAD_MODEM_ID_READ 734
  777. #define SX1302_REG_RX_TOP_BAD_MODEM_ID_READ_1_BAD_MODEM_ID_READ 735
  778. #define SX1302_REG_RX_TOP_BAD_MODEM_ID_READ_2_BAD_MODEM_ID_READ 736
  779. #define SX1302_REG_RX_TOP_CLOCK_GATE_OVERRIDE_0_CLK_OVERRIDE 737
  780. #define SX1302_REG_RX_TOP_SAMPLE_4_MSPS_LATCHED_125K_SAMPLE_4_MSPS_LATCHED_125K 738
  781. #define SX1302_REG_RX_TOP_DUMMY3_DUMMY3 739
  782. #define SX1302_REG_ARB_MCU_CTRL_CLK_EN 740
  783. #define SX1302_REG_ARB_MCU_CTRL_RADIO_RST 741
  784. #define SX1302_REG_ARB_MCU_CTRL_FORCE_HOST_FE_CTRL 742
  785. #define SX1302_REG_ARB_MCU_CTRL_MCU_CLEAR 743
  786. #define SX1302_REG_ARB_MCU_CTRL_HOST_PROG 744
  787. #define SX1302_REG_ARB_MCU_CTRL_PARITY_ERROR 745
  788. #define SX1302_REG_ARB_MCU_MCU_ARB_STATUS_MCU_ARB_STATUS 746
  789. #define SX1302_REG_ARB_MCU_UART_CFG_MSBF 747
  790. #define SX1302_REG_ARB_MCU_UART_CFG_PAR_EN 748
  791. #define SX1302_REG_ARB_MCU_UART_CFG_PAR_MODE 749
  792. #define SX1302_REG_ARB_MCU_UART_CFG_START_LEN 750
  793. #define SX1302_REG_ARB_MCU_UART_CFG_STOP_LEN 751
  794. #define SX1302_REG_ARB_MCU_UART_CFG_WORD_LEN 752
  795. #define SX1302_REG_ARB_MCU_UART_CFG2_BIT_RATE 753
  796. #define SX1302_REG_ARB_MCU_ARB_DEBUG_CFG_0_ARB_DEBUG_CFG_0 754
  797. #define SX1302_REG_ARB_MCU_ARB_DEBUG_CFG_1_ARB_DEBUG_CFG_1 755
  798. #define SX1302_REG_ARB_MCU_ARB_DEBUG_CFG_2_ARB_DEBUG_CFG_2 756
  799. #define SX1302_REG_ARB_MCU_ARB_DEBUG_CFG_3_ARB_DEBUG_CFG_3 757
  800. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_0_ARB_DEBUG_STS_0 758
  801. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_1_ARB_DEBUG_STS_1 759
  802. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_2_ARB_DEBUG_STS_2 760
  803. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_3_ARB_DEBUG_STS_3 761
  804. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_4_ARB_DEBUG_STS_4 762
  805. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_5_ARB_DEBUG_STS_5 763
  806. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_6_ARB_DEBUG_STS_6 764
  807. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_7_ARB_DEBUG_STS_7 765
  808. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_8_ARB_DEBUG_STS_8 766
  809. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_9_ARB_DEBUG_STS_9 767
  810. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_10_ARB_DEBUG_STS_10 768
  811. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_11_ARB_DEBUG_STS_11 769
  812. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_12_ARB_DEBUG_STS_12 770
  813. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_13_ARB_DEBUG_STS_13 771
  814. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_14_ARB_DEBUG_STS_14 772
  815. #define SX1302_REG_ARB_MCU_ARB_DEBUG_STS_15_ARB_DEBUG_STS_15 773
  816. #define SX1302_REG_ARB_MCU_CHANNEL_SYNC_OFFSET_01_CHANNEL_1_OFFSET 774
  817. #define SX1302_REG_ARB_MCU_CHANNEL_SYNC_OFFSET_01_CHANNEL_0_OFFSET 775
  818. #define SX1302_REG_ARB_MCU_CHANNEL_SYNC_OFFSET_23_CHANNEL_3_OFFSET 776
  819. #define SX1302_REG_ARB_MCU_CHANNEL_SYNC_OFFSET_23_CHANNEL_2_OFFSET 777
  820. #define SX1302_REG_ARB_MCU_CHANNEL_SYNC_OFFSET_45_CHANNEL_5_OFFSET 778
  821. #define SX1302_REG_ARB_MCU_CHANNEL_SYNC_OFFSET_45_CHANNEL_4_OFFSET 779
  822. #define SX1302_REG_ARB_MCU_CHANNEL_SYNC_OFFSET_67_CHANNEL_7_OFFSET 780
  823. #define SX1302_REG_ARB_MCU_CHANNEL_SYNC_OFFSET_67_CHANNEL_6_OFFSET 781
  824. #define SX1302_REG_ARB_MCU_DUMMY_DUMMY3 782
  825. #define SX1302_REG_RADIO_FE_GLBL_CTRL_DECIM_B_CLR 783
  826. #define SX1302_REG_RADIO_FE_GLBL_CTRL_DECIM_A_CLR 784
  827. #define SX1302_REG_RADIO_FE_CTRL0_RADIO_A_DC_NOTCH_EN 785
  828. #define SX1302_REG_RADIO_FE_CTRL0_RADIO_A_FORCE_HOST_FILTER_GAIN 786
  829. #define SX1302_REG_RADIO_FE_CTRL0_RADIO_A_HOST_FILTER_GAIN 787
  830. #define SX1302_REG_RADIO_FE_RSSI_DB_DEF_RADIO_A_RSSI_DB_DEFAULT_VALUE 788
  831. #define SX1302_REG_RADIO_FE_RSSI_DEC_DEF_RADIO_A_RSSI_DEC_DEFAULT_VALUE 789
  832. #define SX1302_REG_RADIO_FE_RSSI_DEC_RD_RADIO_A_RSSI_DEC_OUT 790
  833. #define SX1302_REG_RADIO_FE_RSSI_BB_RD_RADIO_A_RSSI_BB_OUT 791
  834. #define SX1302_REG_RADIO_FE_DEC_FILTER_RD_RADIO_A_DEC_FILTER_GAIN 792
  835. #define SX1302_REG_RADIO_FE_RSSI_BB_FILTER_ALPHA_RADIO_A_RSSI_BB_FILTER_ALPHA 793
  836. #define SX1302_REG_RADIO_FE_RSSI_DEC_FILTER_ALPHA_RADIO_A_RSSI_DEC_FILTER_ALPHA 794
  837. #define SX1302_REG_RADIO_FE_IQ_COMP_AMP_COEFF_RADIO_A_AMP_COEFF 795
  838. #define SX1302_REG_RADIO_FE_IQ_COMP_PHI_COEFF_RADIO_A_PHI_COEFF 796
  839. #define SX1302_REG_RADIO_FE_RADIO_DIO_TEST_MODE_RADIO_A_DIO_TEST_MODE 797
  840. #define SX1302_REG_RADIO_FE_RADIO_DIO_TEST_DIR_RADIO_A_DIO_TEST_DIR 798
  841. #define SX1302_REG_RADIO_FE_RADIO_DIO_DIR_RADIO_A_DIO_DIR 799
  842. #define SX1302_REG_RADIO_FE_CTRL0_RADIO_B_DC_NOTCH_EN 800
  843. #define SX1302_REG_RADIO_FE_CTRL0_RADIO_B_FORCE_HOST_FILTER_GAIN 801
  844. #define SX1302_REG_RADIO_FE_CTRL0_RADIO_B_HOST_FILTER_GAIN 802
  845. #define SX1302_REG_RADIO_FE_RSSI_DB_DEF_RADIO_B_RSSI_DB_DEFAULT_VALUE 803
  846. #define SX1302_REG_RADIO_FE_RSSI_DEC_DEF_RADIO_B_RSSI_DEC_DEFAULT_VALUE 804
  847. #define SX1302_REG_RADIO_FE_RSSI_DEC_RD_RADIO_B_RSSI_DEC_OUT 805
  848. #define SX1302_REG_RADIO_FE_RSSI_BB_RD_RADIO_B_RSSI_BB_OUT 806
  849. #define SX1302_REG_RADIO_FE_DEC_FILTER_RD_RADIO_B_DEC_FILTER_GAIN 807
  850. #define SX1302_REG_RADIO_FE_RSSI_BB_FILTER_ALPHA_RADIO_B_RSSI_BB_FILTER_ALPHA 808
  851. #define SX1302_REG_RADIO_FE_RSSI_DEC_FILTER_ALPHA_RADIO_B_RSSI_DEC_FILTER_ALPHA 809
  852. #define SX1302_REG_RADIO_FE_IQ_COMP_AMP_COEFF_RADIO_B_AMP_COEFF 810
  853. #define SX1302_REG_RADIO_FE_IQ_COMP_PHI_COEFF_RADIO_B_PHI_COEFF 811
  854. #define SX1302_REG_RADIO_FE_RADIO_DIO_TEST_MODE_RADIO_B_DIO_TEST_MODE 812
  855. #define SX1302_REG_RADIO_FE_RADIO_DIO_TEST_DIR_RADIO_B_DIO_TEST_DIR 813
  856. #define SX1302_REG_RADIO_FE_RADIO_DIO_DIR_RADIO_B_DIO_DIR 814
  857. #define SX1302_REG_RADIO_FE_SIG_ANA_CFG_VALID 815
  858. #define SX1302_REG_RADIO_FE_SIG_ANA_CFG_BUSY 816
  859. #define SX1302_REG_RADIO_FE_SIG_ANA_CFG_DURATION 817
  860. #define SX1302_REG_RADIO_FE_SIG_ANA_CFG_FORCE_HAL_CTRL 818
  861. #define SX1302_REG_RADIO_FE_SIG_ANA_CFG_START 819
  862. #define SX1302_REG_RADIO_FE_SIG_ANA_CFG_RADIO_SEL 820
  863. #define SX1302_REG_RADIO_FE_SIG_ANA_CFG_EN 821
  864. #define SX1302_REG_RADIO_FE_SIG_ANA_FREQ_FREQ 822
  865. #define SX1302_REG_RADIO_FE_SIG_ANA_ABS_MSB_CORR_ABS_OUT 823
  866. #define SX1302_REG_RADIO_FE_SIG_ANA_ABS_LSB_CORR_ABS_OUT 824
  867. #define SX1302_REG_RADIO_FE_DUMMY_DUMMY 825
  868. #define SX1302_REG_OTP_BYTE_ADDR_ADDR 826
  869. #define SX1302_REG_OTP_RD_DATA_RD_DATA 827
  870. #define SX1302_REG_OTP_STATUS_CHECKSUM_STATUS 828
  871. #define SX1302_REG_OTP_STATUS_FSM_READY 829
  872. #define SX1302_REG_OTP_CFG_ACCESS_MODE 830
  873. #define SX1302_REG_OTP_BIT_POS_POS 831
  874. #define SX1302_REG_OTP_PIN_CTRL_0_TM 832
  875. #define SX1302_REG_OTP_PIN_CTRL_0_STROBE 833
  876. #define SX1302_REG_OTP_PIN_CTRL_0_PGENB 834
  877. #define SX1302_REG_OTP_PIN_CTRL_0_LOAD 835
  878. #define SX1302_REG_OTP_PIN_CTRL_0_CSB 836
  879. #define SX1302_REG_OTP_PIN_CTRL_1_FSCK 837
  880. #define SX1302_REG_OTP_PIN_CTRL_1_FSI 838
  881. #define SX1302_REG_OTP_PIN_CTRL_1_FRST 839
  882. #define SX1302_REG_OTP_PIN_STATUS_FSO 840
  883. #define SX1302_REG_OTP_MODEM_EN_0_MODEM_EN 841
  884. #define SX1302_REG_OTP_MODEM_EN_1_MODEM_EN 842
  885. #define SX1302_REG_OTP_MODEM_SF_EN_SF_EN 843
  886. #define SX1302_REG_OTP_TIMESTAMP_EN_TIMESTAMP_EN 844
  887. #define SX1302_REG_OTP_DUMMY_DUMMY 845
  888. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_LORA_SERVICE_FREQ_MSB_IF_FREQ_0 846
  889. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_LORA_SERVICE_FREQ_LSB_IF_FREQ_0 847
  890. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_LORA_SERVICE_RADIO_SEL_RADIO_SELECT 848
  891. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DC_NOTCH_CFG1_BW_START 849
  892. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DC_NOTCH_CFG1_AUTO_BW_RED 850
  893. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DC_NOTCH_CFG1_NO_FAST_START 851
  894. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DC_NOTCH_CFG1_BYPASS 852
  895. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DC_NOTCH_CFG1_ENABLE 853
  896. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DC_NOTCH_CFG2_BW_LOCKED 854
  897. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DC_NOTCH_CFG2_BW 855
  898. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DC_NOTCH_CFG3_BW_RED 856
  899. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DC_NOTCH_CFG4_IIR_DCC_TIME 857
  900. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR1_0_FIR1_COEFF_0 858
  901. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR1_1_FIR1_COEFF_1 859
  902. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR1_2_FIR1_COEFF_2 860
  903. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR1_3_FIR1_COEFF_3 861
  904. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR1_4_FIR1_COEFF_4 862
  905. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR1_5_FIR1_COEFF_5 863
  906. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR1_6_FIR1_COEFF_6 864
  907. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR1_7_FIR1_COEFF_7 865
  908. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR2_0_FIR2_COEFF_0 866
  909. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR2_1_FIR2_COEFF_1 867
  910. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR2_2_FIR2_COEFF_2 868
  911. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR2_3_FIR2_COEFF_3 869
  912. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR2_4_FIR2_COEFF_4 870
  913. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR2_5_FIR2_COEFF_5 871
  914. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR2_6_FIR2_COEFF_6 872
  915. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_FIR2_7_FIR2_COEFF_7 873
  916. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_AGC0_RADIO_GAIN_RED_SEL 874
  917. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_AGC0_RADIO_GAIN_RED_DB 875
  918. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_AGC1_DC_COMP_EN 876
  919. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_AGC1_FORCE_DEFAULT_FIR 877
  920. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_AGC1_RSSI_EARLY_LATCH 878
  921. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_AGC1_FREEZE_ON_SYNC 879
  922. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_AGC2_DAGC_IN_COMP 880
  923. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_AGC2_DAGC_FIR_HYST 881
  924. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_AGC2_RSSI_MAX_SAMPLE 882
  925. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_AGC2_RSSI_MIN_SAMPLE 883
  926. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_GAIN0_DAGC_FIR_FAST 884
  927. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_GAIN0_FORCE_GAIN_FIR 885
  928. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_GAIN0_GAIN_FIR1 886
  929. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_DFE_GAIN0_GAIN_FIR2 887
  930. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CFG_TARGET_LVL 888
  931. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CFG_GAIN_INCR_STEP 889
  932. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CFG_GAIN_DROP_COMP 890
  933. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CFG_COMB_FILTER_EN 891
  934. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CFG_NO_FREEZE_START 892
  935. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CFG_FREEZE_ON_SYNC 893
  936. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CNT0_SAMPLE 894
  937. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CNT1_THR_M6 895
  938. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CNT2_THR_M12 896
  939. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CNT3_THR_M18 897
  940. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CNT4_GAIN 898
  941. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DAGC_CNT4_FORCE_GAIN 899
  942. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG0_MODEM_BW 900
  943. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG0_MODEM_SF 901
  944. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG1_PPM_OFFSET_HDR_CTRL 902
  945. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG1_PPM_OFFSET 903
  946. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG1_MODEM_EN 904
  947. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG1_CODING_RATE 905
  948. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG2_FINE_SYNCH_EN 906
  949. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG2_MODEM_START 907
  950. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG2_CADRXTX 908
  951. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG2_IMPLICIT_HEADER 909
  952. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG2_CRC_EN 910
  953. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG3_PAYLOAD_LENGTH 911
  954. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG4_INT_STEP_ORIDE_EN 912
  955. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG4_INT_STEP_ORIDE 913
  956. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG5_HEADER_DIFF_MODE 914
  957. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG5_ZERO_PAD 915
  958. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG6_PREAMBLE_SYMB_NB 916
  959. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG7_PREAMBLE_SYMB_NB 917
  960. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG8_AUTO_ACK_INT_DELAY 918
  961. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG8_AUTO_ACK_RX 919
  962. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG8_AUTO_ACK_TX 920
  963. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TXRX_CFG8_POST_PREAMBLE_GAP_LONG 921
  964. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_CFG0_DFT_PEAK_EN 922
  965. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_CFG0_CHIRP_INVERT 923
  966. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_CFG0_SWAP_IQ 924
  967. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_CFG0_CONTINUOUS 925
  968. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_CFG1_DETECT_TIMEOUT 926
  969. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_CFG2_AUTO_ACK_RANGE 927
  970. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_CFG2_AUTO_ACK_DELAY 928
  971. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_CFG3_RESTART_ON_HDR_ERR 929
  972. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_CFG3_CLK_EN_RESYNC_DIN 930
  973. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_RX_CFG3_LLR_SCALE 931
  974. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FRAME_SYNCH0_PEAK1_POS 932
  975. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FRAME_SYNCH1_PEAK2_POS 933
  976. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FRAME_SYNCH2_FINETIME_ON_LAST 934
  977. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FRAME_SYNCH2_AUTO_SCALE 935
  978. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FRAME_SYNCH2_DROP_ON_SYNCH 936
  979. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FRAME_SYNCH2_GAIN 937
  980. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FRAME_SYNCH2_TIMEOUT_OPT 938
  981. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING0_GAIN_P_HDR_RED 939
  982. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING0_ROUNDING 940
  983. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING0_POS_LIMIT 941
  984. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING0_SUM_SIZE 942
  985. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING0_MODE 943
  986. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING1_GAIN_P_AUTO 944
  987. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING1_GAIN_P_PAYLOAD 945
  988. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING1_GAIN_P_PREAMB 946
  989. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING2_GAIN_I_EN 947
  990. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING2_GAIN_I_PAYLOAD 948
  991. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING2_GAIN_I_PREAMB 949
  992. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING3_FINESYNCH_SUM 950
  993. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING3_FINESYNCH_GAIN 951
  994. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING3_GAIN_I_AUTO 952
  995. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING4_GAIN_I_AUTO_MAX 953
  996. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FINE_TIMING4_GAIN_P_AUTO_MAX 954
  997. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TO_TIME0_FREQ_TO_TIME_DRIFT_MANT 955
  998. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TO_TIME1_FREQ_TO_TIME_DRIFT_MANT 956
  999. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TO_TIME2_FREQ_TO_TIME_DRIFT_EXP 957
  1000. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_FREQ_DELTA 958
  1001. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_FINE_DELTA 959
  1002. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_FREQ_ERROR 960
  1003. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_TIME_SYMB 961
  1004. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_TIME_OFFSET 962
  1005. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TO_TIME3_FREQ_TO_TIME_INVERT_DETECT 963
  1006. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TO_TIME4_FREQ_TO_TIME_INVERT_RNG 964
  1007. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TRACK0_FREQ_TRACK_FINE 965
  1008. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TRACK0_FREQ_TRACK_HDR_SKIP 966
  1009. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TRACK0_FREQ_TRACK_EN 967
  1010. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TRACK1_FREQ_SYNCH_GAIN 968
  1011. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TRACK1_FREQ_TRACK_AUTO_THR 969
  1012. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TRACK2_SNR_MIN_WINDOW 970
  1013. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TRACK2_GAIN_AUTO_SNR_MIN 971
  1014. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FREQ_TRACK2_FREQ_SYNCH_THR 972
  1015. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_MSP0_MSP_PNR 973
  1016. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_MSP1_MSP2_PNR 974
  1017. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_MSP2_MSP2_PEAK_NB 975
  1018. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_MSP2_MSP_PEAK_NB 976
  1019. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_MSP3_ACC_MIN2 977
  1020. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_MSP3_ACC_WIN_LEN 978
  1021. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_MSP3_MSP_POS_SEL 979
  1022. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_MSP3_MSP_CNT_MODE 980
  1023. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_ACC1_USE_GAIN_SYMB 981
  1024. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_ACC1_ACC_PNR 982
  1025. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_ACC2_NOISE_COEFF 983
  1026. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_ACC2_ACC_COEFF 984
  1027. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_ACC2_ACC_2_SAME_PEAKS 985
  1028. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_ACC2_ACC_AUTO_RESCALE 986
  1029. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_ACC2_ACC_PEAK_POS_SEL 987
  1030. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_ACC2_ACC_PEAK_SUM_EN 988
  1031. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DETECT_ACC3_MIN_SINGLE_PEAK 989
  1032. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TIMESTAMP_SEL_SNR_MIN 990
  1033. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TIMESTAMP_ENABLE 991
  1034. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_TIMESTAMP_NB_SYMB 992
  1035. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_CLOCK_GATE_OVERRIDE_FSK_TRANSPOSE_CLK_OVERRIDE 993
  1036. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_CLOCK_GATE_OVERRIDE_FSK_MODEM_CLK_OVERRIDE 994
  1037. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_CLOCK_GATE_OVERRIDE_TRANSPOSE_CLK_OVERRIDE 995
  1038. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_CLOCK_GATE_OVERRIDE_MODEM_CLK_OVERRIDE 996
  1039. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DUMMY0_DUMMY0 997
  1040. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_FREQ_MSB_IF_FREQ_0 998
  1041. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_FREQ_LSB_IF_FREQ_0 999
  1042. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_0_CRC_IBM 1000
  1043. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_0_DCFREE_ENC 1001
  1044. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_0_CRC_EN 1002
  1045. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_0_PKT_MODE 1003
  1046. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_1_ADRS_COMP 1004
  1047. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_1_PSIZE 1005
  1048. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_1_CH_BW_EXPO 1006
  1049. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_3_MODEM_INVERT_IQ 1007
  1050. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_3_AUTO_AFC 1008
  1051. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_3_RADIO_SELECT 1009
  1052. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_3_RX_INVERT 1010
  1053. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_4_RSSI_LENGTH 1011
  1054. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_CFG_4_ERROR_OSR_TOL 1012
  1055. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_NODE_ADRS_NODE_ADRS 1013
  1056. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_BROADCAST_BROADCAST 1014
  1057. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_PKT_LENGTH_PKT_LENGTH 1015
  1058. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_TIMEOUT_MSB_TIMEOUT 1016
  1059. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_TIMEOUT_LSB_TIMEOUT 1017
  1060. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_BIT_RATE_MSB_BIT_RATE 1018
  1061. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_BIT_RATE_LSB_BIT_RATE 1019
  1062. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_REF_PATTERN_BYTE7_FSK_REF_PATTERN 1020
  1063. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_REF_PATTERN_BYTE6_FSK_REF_PATTERN 1021
  1064. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_REF_PATTERN_BYTE5_FSK_REF_PATTERN 1022
  1065. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_REF_PATTERN_BYTE4_FSK_REF_PATTERN 1023
  1066. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_REF_PATTERN_BYTE3_FSK_REF_PATTERN 1024
  1067. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_REF_PATTERN_BYTE2_FSK_REF_PATTERN 1025
  1068. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_REF_PATTERN_BYTE1_FSK_REF_PATTERN 1026
  1069. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_REF_PATTERN_BYTE0_FSK_REF_PATTERN 1027
  1070. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_FSK_RSSI_FILTER_ALPHA_FSK_RSSI_FILTER_ALPHA 1028
  1071. #define SX1302_REG_RX_TOP_LORA_SERVICE_FSK_DUMMY1_DUMMY1 1029
  1072. #define SX1302_REG_CAPTURE_RAM_CAPTURE_CFG_ENABLE 1030
  1073. #define SX1302_REG_CAPTURE_RAM_CAPTURE_CFG_CAPTUREWRAP 1031
  1074. #define SX1302_REG_CAPTURE_RAM_CAPTURE_CFG_CAPTUREFORCETRIGGER 1032
  1075. #define SX1302_REG_CAPTURE_RAM_CAPTURE_CFG_CAPTURESTART 1033
  1076. #define SX1302_REG_CAPTURE_RAM_CAPTURE_CFG_RAMCONFIG 1034
  1077. #define SX1302_REG_CAPTURE_RAM_CAPTURE_SOURCE_A_SOURCEMUX 1035
  1078. #define SX1302_REG_CAPTURE_RAM_CAPTURE_SOURCE_B_SOURCEMUX 1036
  1079. #define SX1302_REG_CAPTURE_RAM_CAPTURE_PERIOD_0_CAPTUREPERIOD 1037
  1080. #define SX1302_REG_CAPTURE_RAM_CAPTURE_PERIOD_1_CAPTUREPERIOD 1038
  1081. #define SX1302_REG_CAPTURE_RAM_STATUS_CAPCOMPLETE 1039
  1082. #define SX1302_REG_CAPTURE_RAM_LAST_RAM_ADDR_0_LASTRAMADDR 1040
  1083. #define SX1302_REG_CAPTURE_RAM_LAST_RAM_ADDR_1_LASTRAMADDR 1041
  1084. #define SX1302_REG_CAPTURE_RAM_CLOCK_GATE_OVERRIDE_CLK_OVERRIDE 1042
  1085. #define SX1302_REG_CAPTURE_RAM_DUMMY0_DUMMY0 1043
  1086. #define LGW_TOTALREGS 1044
  1087. /* -------------------------------------------------------------------------- */
  1088. /* --- PUBLIC MACROS -------------------------------------------------------- */
  1089. #define SX1302_REG_TX_TOP_TX_TRIG_TX_FSM_CLR(rf_chain) ((rf_chain == 0) ? \
  1090. SX1302_REG_TX_TOP_A_TX_TRIG_TX_FSM_CLR : \
  1091. SX1302_REG_TX_TOP_B_TX_TRIG_TX_FSM_CLR)
  1092. #define SX1302_REG_TX_TOP_TX_TRIG_TX_TRIG_GPS(rf_chain) ((rf_chain == 0) ? \
  1093. SX1302_REG_TX_TOP_A_TX_TRIG_TX_TRIG_GPS : \
  1094. SX1302_REG_TX_TOP_B_TX_TRIG_TX_TRIG_GPS)
  1095. #define SX1302_REG_TX_TOP_TX_TRIG_TX_TRIG_DELAYED(rf_chain) ((rf_chain == 0) ? \
  1096. SX1302_REG_TX_TOP_A_TX_TRIG_TX_TRIG_DELAYED : \
  1097. SX1302_REG_TX_TOP_B_TX_TRIG_TX_TRIG_DELAYED)
  1098. #define SX1302_REG_TX_TOP_TX_TRIG_TX_TRIG_IMMEDIATE(rf_chain) ((rf_chain == 0) ? \
  1099. SX1302_REG_TX_TOP_A_TX_TRIG_TX_TRIG_IMMEDIATE : \
  1100. SX1302_REG_TX_TOP_B_TX_TRIG_TX_TRIG_IMMEDIATE)
  1101. #define SX1302_REG_TX_TOP_TIMER_TRIG_BYTE3_TIMER_DELAYED_TRIG(rf_chain) ((rf_chain == 0) ? \
  1102. SX1302_REG_TX_TOP_A_TIMER_TRIG_BYTE3_TIMER_DELAYED_TRIG : \
  1103. SX1302_REG_TX_TOP_B_TIMER_TRIG_BYTE3_TIMER_DELAYED_TRIG)
  1104. #define SX1302_REG_TX_TOP_TIMER_TRIG_BYTE2_TIMER_DELAYED_TRIG(rf_chain) ((rf_chain == 0) ? \
  1105. SX1302_REG_TX_TOP_A_TIMER_TRIG_BYTE2_TIMER_DELAYED_TRIG : \
  1106. SX1302_REG_TX_TOP_B_TIMER_TRIG_BYTE2_TIMER_DELAYED_TRIG)
  1107. #define SX1302_REG_TX_TOP_TIMER_TRIG_BYTE1_TIMER_DELAYED_TRIG(rf_chain) ((rf_chain == 0) ? \
  1108. SX1302_REG_TX_TOP_A_TIMER_TRIG_BYTE1_TIMER_DELAYED_TRIG : \
  1109. SX1302_REG_TX_TOP_B_TIMER_TRIG_BYTE1_TIMER_DELAYED_TRIG)
  1110. #define SX1302_REG_TX_TOP_TIMER_TRIG_BYTE0_TIMER_DELAYED_TRIG(rf_chain) ((rf_chain == 0) ? \
  1111. SX1302_REG_TX_TOP_A_TIMER_TRIG_BYTE0_TIMER_DELAYED_TRIG : \
  1112. SX1302_REG_TX_TOP_B_TIMER_TRIG_BYTE0_TIMER_DELAYED_TRIG)
  1113. #define SX1302_REG_TX_TOP_TX_START_DELAY_MSB_TX_START_DELAY(rf_chain) ((rf_chain == 0) ? \
  1114. SX1302_REG_TX_TOP_A_TX_START_DELAY_MSB_TX_START_DELAY : \
  1115. SX1302_REG_TX_TOP_B_TX_START_DELAY_MSB_TX_START_DELAY)
  1116. #define SX1302_REG_TX_TOP_TX_START_DELAY_LSB_TX_START_DELAY(rf_chain) ((rf_chain == 0) ? \
  1117. SX1302_REG_TX_TOP_A_TX_START_DELAY_LSB_TX_START_DELAY : \
  1118. SX1302_REG_TX_TOP_B_TX_START_DELAY_LSB_TX_START_DELAY)
  1119. #define SX1302_REG_TX_TOP_TX_CTRL_WRITE_BUFFER(rf_chain) ((rf_chain == 0) ? \
  1120. SX1302_REG_TX_TOP_A_TX_CTRL_WRITE_BUFFER : \
  1121. SX1302_REG_TX_TOP_B_TX_CTRL_WRITE_BUFFER)
  1122. #define SX1302_REG_TX_TOP_TX_RAMP_DURATION_TX_RAMP_DURATION(rf_chain) ((rf_chain == 0) ? \
  1123. SX1302_REG_TX_TOP_A_TX_RAMP_DURATION_TX_RAMP_DURATION : \
  1124. SX1302_REG_TX_TOP_B_TX_RAMP_DURATION_TX_RAMP_DURATION)
  1125. #define SX1302_REG_TX_TOP_GEN_CFG_0_MODULATION_TYPE(rf_chain) ((rf_chain == 0) ? \
  1126. SX1302_REG_TX_TOP_A_GEN_CFG_0_MODULATION_TYPE : \
  1127. SX1302_REG_TX_TOP_B_GEN_CFG_0_MODULATION_TYPE)
  1128. #define SX1302_REG_TX_TOP_TEST_0_TX_ACTIVE_CTRL(rf_chain) ((rf_chain == 0) ? \
  1129. SX1302_REG_TX_TOP_A_TEST_0_TX_ACTIVE_CTRL : \
  1130. SX1302_REG_TX_TOP_B_TEST_0_TX_ACTIVE_CTRL)
  1131. #define SX1302_REG_TX_TOP_TEST_0_TX_ACTIVE_SEL(rf_chain) ((rf_chain == 0) ? \
  1132. SX1302_REG_TX_TOP_A_TEST_0_TX_ACTIVE_SEL : \
  1133. SX1302_REG_TX_TOP_B_TEST_0_TX_ACTIVE_SEL)
  1134. #define SX1302_REG_TX_TOP_TX_FLAG_TX_TIMEOUT(rf_chain) ((rf_chain == 0) ? \
  1135. SX1302_REG_TX_TOP_A_TX_FLAG_TX_TIMEOUT : \
  1136. SX1302_REG_TX_TOP_B_TX_FLAG_TX_TIMEOUT)
  1137. #define SX1302_REG_TX_TOP_TX_FLAG_PKT_DONE(rf_chain) ((rf_chain == 0) ? \
  1138. SX1302_REG_TX_TOP_A_TX_FLAG_PKT_DONE : \
  1139. SX1302_REG_TX_TOP_B_TX_FLAG_PKT_DONE)
  1140. #define SX1302_REG_TX_TOP_AGC_TX_BW_AGC_TX_BW(rf_chain) ((rf_chain == 0) ? \
  1141. SX1302_REG_TX_TOP_A_AGC_TX_BW_AGC_TX_BW : \
  1142. SX1302_REG_TX_TOP_B_AGC_TX_BW_AGC_TX_BW)
  1143. #define SX1302_REG_TX_TOP_AGC_TX_PWR_AGC_TX_PWR(rf_chain) ((rf_chain == 0) ? \
  1144. SX1302_REG_TX_TOP_A_AGC_TX_PWR_AGC_TX_PWR : \
  1145. SX1302_REG_TX_TOP_B_AGC_TX_PWR_AGC_TX_PWR)
  1146. #define SX1302_REG_TX_TOP_TIMEOUT_CNT_BYTE_2_TIMEOUT_CNT(rf_chain) ((rf_chain == 0) ? \
  1147. SX1302_REG_TX_TOP_A_TIMEOUT_CNT_BYTE_2_TIMEOUT_CNT : \
  1148. SX1302_REG_TX_TOP_B_TIMEOUT_CNT_BYTE_2_TIMEOUT_CNT)
  1149. #define SX1302_REG_TX_TOP_TIMEOUT_CNT_BYTE_1_TIMEOUT_CNT(rf_chain) ((rf_chain == 0) ? \
  1150. SX1302_REG_TX_TOP_A_TIMEOUT_CNT_BYTE_1_TIMEOUT_CNT : \
  1151. SX1302_REG_TX_TOP_B_TIMEOUT_CNT_BYTE_1_TIMEOUT_CNT)
  1152. #define SX1302_REG_TX_TOP_TIMEOUT_CNT_BYTE_0_TIMEOUT_CNT(rf_chain) ((rf_chain == 0) ? \
  1153. SX1302_REG_TX_TOP_A_TIMEOUT_CNT_BYTE_0_TIMEOUT_CNT : \
  1154. SX1302_REG_TX_TOP_B_TIMEOUT_CNT_BYTE_0_TIMEOUT_CNT)
  1155. #define SX1302_REG_TX_TOP_TX_FSM_STATUS_TX_STATUS(rf_chain) ((rf_chain == 0) ? \
  1156. SX1302_REG_TX_TOP_A_TX_FSM_STATUS_TX_STATUS : \
  1157. SX1302_REG_TX_TOP_B_TX_FSM_STATUS_TX_STATUS)
  1158. #define SX1302_REG_TX_TOP_DUMMY_CONTROL_DUMMY(rf_chain) ((rf_chain == 0) ? \
  1159. SX1302_REG_TX_TOP_A_DUMMY_CONTROL_DUMMY : \
  1160. SX1302_REG_TX_TOP_B_DUMMY_CONTROL_DUMMY)
  1161. #define SX1302_REG_TX_TOP_TX_RFFE_IF_CTRL_PLL_DIV_CTRL(rf_chain) ((rf_chain == 0) ? \
  1162. SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL_PLL_DIV_CTRL : \
  1163. SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL_PLL_DIV_CTRL)
  1164. #define SX1302_REG_TX_TOP_TX_RFFE_IF_CTRL_TX_CLK_EDGE(rf_chain) ((rf_chain == 0) ? \
  1165. SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL_TX_CLK_EDGE : \
  1166. SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL_TX_CLK_EDGE)
  1167. #define SX1302_REG_TX_TOP_TX_RFFE_IF_CTRL_TX_MODE(rf_chain) ((rf_chain == 0) ? \
  1168. SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL_TX_MODE : \
  1169. SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL_TX_MODE)
  1170. #define SX1302_REG_TX_TOP_TX_RFFE_IF_CTRL_TX_IF_DST(rf_chain) ((rf_chain == 0) ? \
  1171. SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL_TX_IF_DST : \
  1172. SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL_TX_IF_DST)
  1173. #define SX1302_REG_TX_TOP_TX_RFFE_IF_CTRL_TX_IF_SRC(rf_chain) ((rf_chain == 0) ? \
  1174. SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL_TX_IF_SRC : \
  1175. SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL_TX_IF_SRC)
  1176. #define SX1302_REG_TX_TOP_TX_RFFE_IF_CTRL2_SX125X_IQ_INVERT(rf_chain) ((rf_chain == 0) ? \
  1177. SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL2_SX125X_IQ_INVERT : \
  1178. SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL2_SX125X_IQ_INVERT)
  1179. #define SX1302_REG_TX_TOP_TX_RFFE_IF_CTRL2_PLL_DIV_CTRL_AGC(rf_chain) ((rf_chain == 0) ? \
  1180. SX1302_REG_TX_TOP_A_TX_RFFE_IF_CTRL2_PLL_DIV_CTRL_AGC : \
  1181. SX1302_REG_TX_TOP_B_TX_RFFE_IF_CTRL2_PLL_DIV_CTRL_AGC)
  1182. #define SX1302_REG_TX_TOP_TX_RFFE_IF_IQ_GAIN_IQ_GAIN(rf_chain) ((rf_chain == 0) ? \
  1183. SX1302_REG_TX_TOP_A_TX_RFFE_IF_IQ_GAIN_IQ_GAIN : \
  1184. SX1302_REG_TX_TOP_B_TX_RFFE_IF_IQ_GAIN_IQ_GAIN)
  1185. #define SX1302_REG_TX_TOP_TX_RFFE_IF_I_OFFSET_I_OFFSET(rf_chain) ((rf_chain == 0) ? \
  1186. SX1302_REG_TX_TOP_A_TX_RFFE_IF_I_OFFSET_I_OFFSET : \
  1187. SX1302_REG_TX_TOP_B_TX_RFFE_IF_I_OFFSET_I_OFFSET)
  1188. #define SX1302_REG_TX_TOP_TX_RFFE_IF_Q_OFFSET_Q_OFFSET(rf_chain) ((rf_chain == 0) ? \
  1189. SX1302_REG_TX_TOP_A_TX_RFFE_IF_Q_OFFSET_Q_OFFSET : \
  1190. SX1302_REG_TX_TOP_B_TX_RFFE_IF_Q_OFFSET_Q_OFFSET)
  1191. #define SX1302_REG_TX_TOP_TX_RFFE_IF_FREQ_RF_H_FREQ_RF(rf_chain) ((rf_chain == 0) ? \
  1192. SX1302_REG_TX_TOP_A_TX_RFFE_IF_FREQ_RF_H_FREQ_RF : \
  1193. SX1302_REG_TX_TOP_B_TX_RFFE_IF_FREQ_RF_H_FREQ_RF)
  1194. #define SX1302_REG_TX_TOP_TX_RFFE_IF_FREQ_RF_M_FREQ_RF(rf_chain) ((rf_chain == 0) ? \
  1195. SX1302_REG_TX_TOP_A_TX_RFFE_IF_FREQ_RF_M_FREQ_RF : \
  1196. SX1302_REG_TX_TOP_B_TX_RFFE_IF_FREQ_RF_M_FREQ_RF)
  1197. #define SX1302_REG_TX_TOP_TX_RFFE_IF_FREQ_RF_L_FREQ_RF(rf_chain) ((rf_chain == 0) ? \
  1198. SX1302_REG_TX_TOP_A_TX_RFFE_IF_FREQ_RF_L_FREQ_RF : \
  1199. SX1302_REG_TX_TOP_B_TX_RFFE_IF_FREQ_RF_L_FREQ_RF)
  1200. #define SX1302_REG_TX_TOP_TX_RFFE_IF_FREQ_DEV_H_FREQ_DEV(rf_chain) ((rf_chain == 0) ? \
  1201. SX1302_REG_TX_TOP_A_TX_RFFE_IF_FREQ_DEV_H_FREQ_DEV : \
  1202. SX1302_REG_TX_TOP_B_TX_RFFE_IF_FREQ_DEV_H_FREQ_DEV)
  1203. #define SX1302_REG_TX_TOP_TX_RFFE_IF_FREQ_DEV_L_FREQ_DEV(rf_chain) ((rf_chain == 0) ? \
  1204. SX1302_REG_TX_TOP_A_TX_RFFE_IF_FREQ_DEV_L_FREQ_DEV : \
  1205. SX1302_REG_TX_TOP_B_TX_RFFE_IF_FREQ_DEV_L_FREQ_DEV)
  1206. #define SX1302_REG_TX_TOP_TX_RFFE_IF_TEST_MOD_FREQ(rf_chain) ((rf_chain == 0) ? \
  1207. SX1302_REG_TX_TOP_A_TX_RFFE_IF_TEST_MOD_FREQ : \
  1208. SX1302_REG_TX_TOP_B_TX_RFFE_IF_TEST_MOD_FREQ)
  1209. #define SX1302_REG_TX_TOP_DUMMY_MODULATOR_DUMMY(rf_chain) ((rf_chain == 0) ? \
  1210. SX1302_REG_TX_TOP_A_DUMMY_MODULATOR_DUMMY : \
  1211. SX1302_REG_TX_TOP_B_DUMMY_MODULATOR_DUMMY)
  1212. #define SX1302_REG_TX_TOP_FSK_PKT_LEN_PKT_LENGTH(rf_chain) ((rf_chain == 0) ? \
  1213. SX1302_REG_TX_TOP_A_FSK_PKT_LEN_PKT_LENGTH : \
  1214. SX1302_REG_TX_TOP_B_FSK_PKT_LEN_PKT_LENGTH)
  1215. #define SX1302_REG_TX_TOP_FSK_CFG_0_TX_CONT(rf_chain) ((rf_chain == 0) ? \
  1216. SX1302_REG_TX_TOP_A_FSK_CFG_0_TX_CONT : \
  1217. SX1302_REG_TX_TOP_B_FSK_CFG_0_TX_CONT)
  1218. #define SX1302_REG_TX_TOP_FSK_CFG_0_CRC_IBM(rf_chain) ((rf_chain == 0) ? \
  1219. SX1302_REG_TX_TOP_A_FSK_CFG_0_CRC_IBM : \
  1220. SX1302_REG_TX_TOP_B_FSK_CFG_0_CRC_IBM)
  1221. #define SX1302_REG_TX_TOP_FSK_CFG_0_DCFREE_ENC(rf_chain) ((rf_chain == 0) ? \
  1222. SX1302_REG_TX_TOP_A_FSK_CFG_0_DCFREE_ENC : \
  1223. SX1302_REG_TX_TOP_B_FSK_CFG_0_DCFREE_ENC)
  1224. #define SX1302_REG_TX_TOP_FSK_CFG_0_CRC_EN(rf_chain) ((rf_chain == 0) ? \
  1225. SX1302_REG_TX_TOP_A_FSK_CFG_0_CRC_EN : \
  1226. SX1302_REG_TX_TOP_B_FSK_CFG_0_CRC_EN)
  1227. #define SX1302_REG_TX_TOP_FSK_CFG_0_PKT_MODE(rf_chain) ((rf_chain == 0) ? \
  1228. SX1302_REG_TX_TOP_A_FSK_CFG_0_PKT_MODE : \
  1229. SX1302_REG_TX_TOP_B_FSK_CFG_0_PKT_MODE)
  1230. #define SX1302_REG_TX_TOP_FSK_PREAMBLE_SIZE_MSB_PREAMBLE_SIZE(rf_chain) ((rf_chain == 0) ? \
  1231. SX1302_REG_TX_TOP_A_FSK_PREAMBLE_SIZE_MSB_PREAMBLE_SIZE : \
  1232. SX1302_REG_TX_TOP_B_FSK_PREAMBLE_SIZE_MSB_PREAMBLE_SIZE)
  1233. #define SX1302_REG_TX_TOP_FSK_PREAMBLE_SIZE_LSB_PREAMBLE_SIZE(rf_chain) ((rf_chain == 0) ? \
  1234. SX1302_REG_TX_TOP_A_FSK_PREAMBLE_SIZE_LSB_PREAMBLE_SIZE : \
  1235. SX1302_REG_TX_TOP_B_FSK_PREAMBLE_SIZE_LSB_PREAMBLE_SIZE)
  1236. #define SX1302_REG_TX_TOP_FSK_BIT_RATE_MSB_BIT_RATE(rf_chain) ((rf_chain == 0) ? \
  1237. SX1302_REG_TX_TOP_A_FSK_BIT_RATE_MSB_BIT_RATE : \
  1238. SX1302_REG_TX_TOP_B_FSK_BIT_RATE_MSB_BIT_RATE)
  1239. #define SX1302_REG_TX_TOP_FSK_BIT_RATE_LSB_BIT_RATE(rf_chain) ((rf_chain == 0) ? \
  1240. SX1302_REG_TX_TOP_A_FSK_BIT_RATE_LSB_BIT_RATE : \
  1241. SX1302_REG_TX_TOP_B_FSK_BIT_RATE_LSB_BIT_RATE)
  1242. #define SX1302_REG_TX_TOP_FSK_MOD_FSK_REF_PATTERN_SIZE(rf_chain) ((rf_chain == 0) ? \
  1243. SX1302_REG_TX_TOP_A_FSK_MOD_FSK_REF_PATTERN_SIZE : \
  1244. SX1302_REG_TX_TOP_B_FSK_MOD_FSK_REF_PATTERN_SIZE)
  1245. #define SX1302_REG_TX_TOP_FSK_MOD_FSK_PREAMBLE_SEQ(rf_chain) ((rf_chain == 0) ? \
  1246. SX1302_REG_TX_TOP_A_FSK_MOD_FSK_PREAMBLE_SEQ : \
  1247. SX1302_REG_TX_TOP_B_FSK_MOD_FSK_PREAMBLE_SEQ)
  1248. #define SX1302_REG_TX_TOP_FSK_MOD_FSK_REF_PATTERN_EN(rf_chain) ((rf_chain == 0) ? \
  1249. SX1302_REG_TX_TOP_A_FSK_MOD_FSK_REF_PATTERN_EN : \
  1250. SX1302_REG_TX_TOP_B_FSK_MOD_FSK_REF_PATTERN_EN)
  1251. #define SX1302_REG_TX_TOP_FSK_MOD_FSK_GAUSSIAN_SELECT_BT(rf_chain) ((rf_chain == 0) ? \
  1252. SX1302_REG_TX_TOP_A_FSK_MOD_FSK_GAUSSIAN_SELECT_BT : \
  1253. SX1302_REG_TX_TOP_B_FSK_MOD_FSK_GAUSSIAN_SELECT_BT)
  1254. #define SX1302_REG_TX_TOP_FSK_MOD_FSK_GAUSSIAN_EN(rf_chain) ((rf_chain == 0) ? \
  1255. SX1302_REG_TX_TOP_A_FSK_MOD_FSK_GAUSSIAN_EN : \
  1256. SX1302_REG_TX_TOP_B_FSK_MOD_FSK_GAUSSIAN_EN)
  1257. #define SX1302_REG_TX_TOP_FSK_REF_PATTERN_BYTE7_FSK_REF_PATTERN(rf_chain) ((rf_chain == 0) ? \
  1258. SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE7_FSK_REF_PATTERN : \
  1259. SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE7_FSK_REF_PATTERN)
  1260. #define SX1302_REG_TX_TOP_FSK_REF_PATTERN_BYTE6_FSK_REF_PATTERN(rf_chain) ((rf_chain == 0) ? \
  1261. SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE6_FSK_REF_PATTERN : \
  1262. SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE6_FSK_REF_PATTERN)
  1263. #define SX1302_REG_TX_TOP_FSK_REF_PATTERN_BYTE5_FSK_REF_PATTERN(rf_chain) ((rf_chain == 0) ? \
  1264. SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE5_FSK_REF_PATTERN : \
  1265. SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE5_FSK_REF_PATTERN)
  1266. #define SX1302_REG_TX_TOP_FSK_REF_PATTERN_BYTE4_FSK_REF_PATTERN(rf_chain) ((rf_chain == 0) ? \
  1267. SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE4_FSK_REF_PATTERN : \
  1268. SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE4_FSK_REF_PATTERN)
  1269. #define SX1302_REG_TX_TOP_FSK_REF_PATTERN_BYTE3_FSK_REF_PATTERN(rf_chain) ((rf_chain == 0) ? \
  1270. SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE3_FSK_REF_PATTERN : \
  1271. SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE3_FSK_REF_PATTERN)
  1272. #define SX1302_REG_TX_TOP_FSK_REF_PATTERN_BYTE2_FSK_REF_PATTERN(rf_chain) ((rf_chain == 0) ? \
  1273. SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE2_FSK_REF_PATTERN : \
  1274. SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE2_FSK_REF_PATTERN)
  1275. #define SX1302_REG_TX_TOP_FSK_REF_PATTERN_BYTE1_FSK_REF_PATTERN(rf_chain) ((rf_chain == 0) ? \
  1276. SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE1_FSK_REF_PATTERN : \
  1277. SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE1_FSK_REF_PATTERN)
  1278. #define SX1302_REG_TX_TOP_FSK_REF_PATTERN_BYTE0_FSK_REF_PATTERN(rf_chain) ((rf_chain == 0) ? \
  1279. SX1302_REG_TX_TOP_A_FSK_REF_PATTERN_BYTE0_FSK_REF_PATTERN : \
  1280. SX1302_REG_TX_TOP_B_FSK_REF_PATTERN_BYTE0_FSK_REF_PATTERN)
  1281. #define SX1302_REG_TX_TOP_DUMMY_GSFK_DUMMY(rf_chain) ((rf_chain == 0) ? \
  1282. SX1302_REG_TX_TOP_A_DUMMY_GSFK_DUMMY : \
  1283. SX1302_REG_TX_TOP_B_DUMMY_GSFK_DUMMY)
  1284. #define SX1302_REG_TX_TOP_TXRX_CFG0_0_MODEM_BW(rf_chain) ((rf_chain == 0) ? \
  1285. SX1302_REG_TX_TOP_A_TXRX_CFG0_0_MODEM_BW : \
  1286. SX1302_REG_TX_TOP_B_TXRX_CFG0_0_MODEM_BW)
  1287. #define SX1302_REG_TX_TOP_TXRX_CFG0_0_MODEM_SF(rf_chain) ((rf_chain == 0) ? \
  1288. SX1302_REG_TX_TOP_A_TXRX_CFG0_0_MODEM_SF : \
  1289. SX1302_REG_TX_TOP_B_TXRX_CFG0_0_MODEM_SF)
  1290. #define SX1302_REG_TX_TOP_TXRX_CFG0_1_PPM_OFFSET_HDR_CTRL(rf_chain) ((rf_chain == 0) ? \
  1291. SX1302_REG_TX_TOP_A_TXRX_CFG0_1_PPM_OFFSET_HDR_CTRL : \
  1292. SX1302_REG_TX_TOP_B_TXRX_CFG0_1_PPM_OFFSET_HDR_CTRL)
  1293. #define SX1302_REG_TX_TOP_TXRX_CFG0_1_PPM_OFFSET(rf_chain) ((rf_chain == 0) ? \
  1294. SX1302_REG_TX_TOP_A_TXRX_CFG0_1_PPM_OFFSET : \
  1295. SX1302_REG_TX_TOP_B_TXRX_CFG0_1_PPM_OFFSET)
  1296. #define SX1302_REG_TX_TOP_TXRX_CFG0_1_POST_PREAMBLE_GAP_LONG(rf_chain) ((rf_chain == 0) ? \
  1297. SX1302_REG_TX_TOP_A_TXRX_CFG0_1_POST_PREAMBLE_GAP_LONG : \
  1298. SX1302_REG_TX_TOP_B_TXRX_CFG0_1_POST_PREAMBLE_GAP_LONG)
  1299. #define SX1302_REG_TX_TOP_TXRX_CFG0_1_CODING_RATE(rf_chain) ((rf_chain == 0) ? \
  1300. SX1302_REG_TX_TOP_A_TXRX_CFG0_1_CODING_RATE : \
  1301. SX1302_REG_TX_TOP_B_TXRX_CFG0_1_CODING_RATE)
  1302. #define SX1302_REG_TX_TOP_TXRX_CFG0_2_FINE_SYNCH_EN(rf_chain) ((rf_chain == 0) ? \
  1303. SX1302_REG_TX_TOP_A_TXRX_CFG0_2_FINE_SYNCH_EN : \
  1304. SX1302_REG_TX_TOP_B_TXRX_CFG0_2_FINE_SYNCH_EN)
  1305. #define SX1302_REG_TX_TOP_TXRX_CFG0_2_MODEM_EN(rf_chain) ((rf_chain == 0) ? \
  1306. SX1302_REG_TX_TOP_A_TXRX_CFG0_2_MODEM_EN : \
  1307. SX1302_REG_TX_TOP_B_TXRX_CFG0_2_MODEM_EN)
  1308. #define SX1302_REG_TX_TOP_TXRX_CFG0_2_CADRXTX(rf_chain) ((rf_chain == 0) ? \
  1309. SX1302_REG_TX_TOP_A_TXRX_CFG0_2_CADRXTX : \
  1310. SX1302_REG_TX_TOP_B_TXRX_CFG0_2_CADRXTX)
  1311. #define SX1302_REG_TX_TOP_TXRX_CFG0_2_IMPLICIT_HEADER(rf_chain) ((rf_chain == 0) ? \
  1312. SX1302_REG_TX_TOP_A_TXRX_CFG0_2_IMPLICIT_HEADER : \
  1313. SX1302_REG_TX_TOP_B_TXRX_CFG0_2_IMPLICIT_HEADER)
  1314. #define SX1302_REG_TX_TOP_TXRX_CFG0_2_CRC_EN(rf_chain) ((rf_chain == 0) ? \
  1315. SX1302_REG_TX_TOP_A_TXRX_CFG0_2_CRC_EN : \
  1316. SX1302_REG_TX_TOP_B_TXRX_CFG0_2_CRC_EN)
  1317. #define SX1302_REG_TX_TOP_TXRX_CFG0_3_PAYLOAD_LENGTH(rf_chain) ((rf_chain == 0) ? \
  1318. SX1302_REG_TX_TOP_A_TXRX_CFG0_3_PAYLOAD_LENGTH : \
  1319. SX1302_REG_TX_TOP_B_TXRX_CFG0_3_PAYLOAD_LENGTH)
  1320. #define SX1302_REG_TX_TOP_TXRX_CFG1_0_INT_STEP_ORIDE_EN(rf_chain) ((rf_chain == 0) ? \
  1321. SX1302_REG_TX_TOP_A_TXRX_CFG1_0_INT_STEP_ORIDE_EN : \
  1322. SX1302_REG_TX_TOP_B_TXRX_CFG1_0_INT_STEP_ORIDE_EN)
  1323. #define SX1302_REG_TX_TOP_TXRX_CFG1_0_INT_STEP_ORIDE(rf_chain) ((rf_chain == 0) ? \
  1324. SX1302_REG_TX_TOP_A_TXRX_CFG1_0_INT_STEP_ORIDE : \
  1325. SX1302_REG_TX_TOP_B_TXRX_CFG1_0_INT_STEP_ORIDE)
  1326. #define SX1302_REG_TX_TOP_TXRX_CFG1_1_MODEM_START(rf_chain) ((rf_chain == 0) ? \
  1327. SX1302_REG_TX_TOP_A_TXRX_CFG1_1_MODEM_START : \
  1328. SX1302_REG_TX_TOP_B_TXRX_CFG1_1_MODEM_START)
  1329. #define SX1302_REG_TX_TOP_TXRX_CFG1_1_HEADER_DIFF_MODE(rf_chain) ((rf_chain == 0) ? \
  1330. SX1302_REG_TX_TOP_A_TXRX_CFG1_1_HEADER_DIFF_MODE : \
  1331. SX1302_REG_TX_TOP_B_TXRX_CFG1_1_HEADER_DIFF_MODE)
  1332. #define SX1302_REG_TX_TOP_TXRX_CFG1_1_ZERO_PAD(rf_chain) ((rf_chain == 0) ? \
  1333. SX1302_REG_TX_TOP_A_TXRX_CFG1_1_ZERO_PAD : \
  1334. SX1302_REG_TX_TOP_B_TXRX_CFG1_1_ZERO_PAD)
  1335. #define SX1302_REG_TX_TOP_TXRX_CFG1_2_PREAMBLE_SYMB_NB(rf_chain) ((rf_chain == 0) ? \
  1336. SX1302_REG_TX_TOP_A_TXRX_CFG1_2_PREAMBLE_SYMB_NB : \
  1337. SX1302_REG_TX_TOP_B_TXRX_CFG1_2_PREAMBLE_SYMB_NB)
  1338. #define SX1302_REG_TX_TOP_TXRX_CFG1_3_PREAMBLE_SYMB_NB(rf_chain) ((rf_chain == 0) ? \
  1339. SX1302_REG_TX_TOP_A_TXRX_CFG1_3_PREAMBLE_SYMB_NB : \
  1340. SX1302_REG_TX_TOP_B_TXRX_CFG1_3_PREAMBLE_SYMB_NB)
  1341. #define SX1302_REG_TX_TOP_TXRX_CFG1_4_AUTO_ACK_INT_DELAY(rf_chain) ((rf_chain == 0) ? \
  1342. SX1302_REG_TX_TOP_A_TXRX_CFG1_4_AUTO_ACK_INT_DELAY : \
  1343. SX1302_REG_TX_TOP_B_TXRX_CFG1_4_AUTO_ACK_INT_DELAY)
  1344. #define SX1302_REG_TX_TOP_TXRX_CFG1_4_AUTO_ACK_RX(rf_chain) ((rf_chain == 0) ? \
  1345. SX1302_REG_TX_TOP_A_TXRX_CFG1_4_AUTO_ACK_RX : \
  1346. SX1302_REG_TX_TOP_B_TXRX_CFG1_4_AUTO_ACK_RX)
  1347. #define SX1302_REG_TX_TOP_TXRX_CFG1_4_AUTO_ACK_TX(rf_chain) ((rf_chain == 0) ? \
  1348. SX1302_REG_TX_TOP_A_TXRX_CFG1_4_AUTO_ACK_TX : \
  1349. SX1302_REG_TX_TOP_B_TXRX_CFG1_4_AUTO_ACK_TX)
  1350. #define SX1302_REG_TX_TOP_TX_CFG0_0_CHIRP_LOWPASS(rf_chain) ((rf_chain == 0) ? \
  1351. SX1302_REG_TX_TOP_A_TX_CFG0_0_CHIRP_LOWPASS : \
  1352. SX1302_REG_TX_TOP_B_TX_CFG0_0_CHIRP_LOWPASS)
  1353. #define SX1302_REG_TX_TOP_TX_CFG0_0_PPM_OFFSET_SIG(rf_chain) ((rf_chain == 0) ? \
  1354. SX1302_REG_TX_TOP_A_TX_CFG0_0_PPM_OFFSET_SIG : \
  1355. SX1302_REG_TX_TOP_B_TX_CFG0_0_PPM_OFFSET_SIG)
  1356. #define SX1302_REG_TX_TOP_TX_CFG0_0_CONTCHIRP(rf_chain) ((rf_chain == 0) ? \
  1357. SX1302_REG_TX_TOP_A_TX_CFG0_0_CONTCHIRP : \
  1358. SX1302_REG_TX_TOP_B_TX_CFG0_0_CONTCHIRP)
  1359. #define SX1302_REG_TX_TOP_TX_CFG0_0_CHIRP_INVERT(rf_chain) ((rf_chain == 0) ? \
  1360. SX1302_REG_TX_TOP_A_TX_CFG0_0_CHIRP_INVERT : \
  1361. SX1302_REG_TX_TOP_B_TX_CFG0_0_CHIRP_INVERT)
  1362. #define SX1302_REG_TX_TOP_TX_CFG0_0_CONTINUOUS(rf_chain) ((rf_chain == 0) ? \
  1363. SX1302_REG_TX_TOP_A_TX_CFG0_0_CONTINUOUS : \
  1364. SX1302_REG_TX_TOP_B_TX_CFG0_0_CONTINUOUS)
  1365. #define SX1302_REG_TX_TOP_TX_CFG0_1_POWER_RANGING(rf_chain) ((rf_chain == 0) ? \
  1366. SX1302_REG_TX_TOP_A_TX_CFG0_1_POWER_RANGING : \
  1367. SX1302_REG_TX_TOP_B_TX_CFG0_1_POWER_RANGING)
  1368. #define SX1302_REG_TX_TOP_TX_CFG1_0_FRAME_NB(rf_chain) ((rf_chain == 0) ? \
  1369. SX1302_REG_TX_TOP_A_TX_CFG1_0_FRAME_NB : \
  1370. SX1302_REG_TX_TOP_B_TX_CFG1_0_FRAME_NB)
  1371. #define SX1302_REG_TX_TOP_TX_CFG1_1_HOP_CTRL(rf_chain) ((rf_chain == 0) ? \
  1372. SX1302_REG_TX_TOP_A_TX_CFG1_1_HOP_CTRL : \
  1373. SX1302_REG_TX_TOP_B_TX_CFG1_1_HOP_CTRL)
  1374. #define SX1302_REG_TX_TOP_TX_CFG1_1_IFS(rf_chain) ((rf_chain == 0) ? \
  1375. SX1302_REG_TX_TOP_A_TX_CFG1_1_IFS : \
  1376. SX1302_REG_TX_TOP_B_TX_CFG1_1_IFS)
  1377. #define SX1302_REG_TX_TOP_FRAME_SYNCH_0_AUTO_SCALE(rf_chain) ((rf_chain == 0) ? \
  1378. SX1302_REG_TX_TOP_A_FRAME_SYNCH_0_AUTO_SCALE : \
  1379. SX1302_REG_TX_TOP_B_FRAME_SYNCH_0_AUTO_SCALE)
  1380. #define SX1302_REG_TX_TOP_FRAME_SYNCH_0_DROP_ON_SYNCH(rf_chain) ((rf_chain == 0) ? \
  1381. SX1302_REG_TX_TOP_A_FRAME_SYNCH_0_DROP_ON_SYNCH : \
  1382. SX1302_REG_TX_TOP_B_FRAME_SYNCH_0_DROP_ON_SYNCH)
  1383. #define SX1302_REG_TX_TOP_FRAME_SYNCH_0_GAIN(rf_chain) ((rf_chain == 0) ? \
  1384. SX1302_REG_TX_TOP_A_FRAME_SYNCH_0_GAIN : \
  1385. SX1302_REG_TX_TOP_B_FRAME_SYNCH_0_GAIN)
  1386. #define SX1302_REG_TX_TOP_FRAME_SYNCH_0_PEAK1_POS(rf_chain) ((rf_chain == 0) ? \
  1387. SX1302_REG_TX_TOP_A_FRAME_SYNCH_0_PEAK1_POS : \
  1388. SX1302_REG_TX_TOP_B_FRAME_SYNCH_0_PEAK1_POS)
  1389. #define SX1302_REG_TX_TOP_FRAME_SYNCH_1_FINETIME_ON_LAST(rf_chain) ((rf_chain == 0) ? \
  1390. SX1302_REG_TX_TOP_A_FRAME_SYNCH_1_FINETIME_ON_LAST : \
  1391. SX1302_REG_TX_TOP_B_FRAME_SYNCH_1_FINETIME_ON_LAST)
  1392. #define SX1302_REG_TX_TOP_FRAME_SYNCH_1_TIMEOUT_OPT(rf_chain) ((rf_chain == 0) ? \
  1393. SX1302_REG_TX_TOP_A_FRAME_SYNCH_1_TIMEOUT_OPT : \
  1394. SX1302_REG_TX_TOP_B_FRAME_SYNCH_1_TIMEOUT_OPT)
  1395. #define SX1302_REG_TX_TOP_FRAME_SYNCH_1_PEAK2_POS(rf_chain) ((rf_chain == 0) ? \
  1396. SX1302_REG_TX_TOP_A_FRAME_SYNCH_1_PEAK2_POS : \
  1397. SX1302_REG_TX_TOP_B_FRAME_SYNCH_1_PEAK2_POS)
  1398. #define SX1302_REG_TX_TOP_LORA_TX_STATE_STATUS(rf_chain) ((rf_chain == 0) ? \
  1399. SX1302_REG_TX_TOP_A_LORA_TX_STATE_STATUS : \
  1400. SX1302_REG_TX_TOP_B_LORA_TX_STATE_STATUS)
  1401. #define SX1302_REG_TX_TOP_LORA_TX_FLAG_FRAME_DONE(rf_chain) ((rf_chain == 0) ? \
  1402. SX1302_REG_TX_TOP_A_LORA_TX_FLAG_FRAME_DONE : \
  1403. SX1302_REG_TX_TOP_B_LORA_TX_FLAG_FRAME_DONE)
  1404. #define SX1302_REG_TX_TOP_LORA_TX_FLAG_CONT_DONE(rf_chain) ((rf_chain == 0) ? \
  1405. SX1302_REG_TX_TOP_A_LORA_TX_FLAG_CONT_DONE : \
  1406. SX1302_REG_TX_TOP_B_LORA_TX_FLAG_CONT_DONE)
  1407. #define SX1302_REG_TX_TOP_LORA_TX_FLAG_PLD_DONE(rf_chain) ((rf_chain == 0) ? \
  1408. SX1302_REG_TX_TOP_A_LORA_TX_FLAG_PLD_DONE : \
  1409. SX1302_REG_TX_TOP_B_LORA_TX_FLAG_PLD_DONE)
  1410. #define SX1302_REG_TX_TOP_DUMMY_LORA_DUMMY(rf_chain) ((rf_chain == 0) ? \
  1411. SX1302_REG_TX_TOP_A_DUMMY_LORA_DUMMY : \
  1412. SX1302_REG_TX_TOP_B_DUMMY_LORA_DUMMY)
  1413. /* -------------------------------------------------------------------------- */
  1414. /* --- PUBLIC FUNCTIONS PROTOTYPES ------------------------------------------ */
  1415. /**
  1416. @brief Connect LoRa concentrator by opening COM link
  1417. @param com_type type of COM interface to be used (SPI or USB)
  1418. @param com_path path to the COM device to be used to connect to the SX1302
  1419. @return status of register operation (LGW_REG_SUCCESS/LGW_REG_ERROR)
  1420. */
  1421. int lgw_connect(const lgw_com_type_t com_type, const char * com_path);
  1422. /**
  1423. @brief Disconnect LoRa concentrator by closing COM link
  1424. @return status of register operation (LGW_REG_SUCCESS/LGW_REG_ERROR)
  1425. */
  1426. int lgw_disconnect(void);
  1427. /**
  1428. @brief LoRa concentrator register write
  1429. @param register_id register number in the data structure describing registers
  1430. @param reg_value signed value to write to the register (for u32, use cast)
  1431. @return status of register operation (LGW_REG_SUCCESS/LGW_REG_ERROR)
  1432. */
  1433. int lgw_reg_w(uint16_t register_id, int32_t reg_value);
  1434. /**
  1435. @brief LoRa concentrator register read
  1436. @param register_id register number in the data structure describing registers
  1437. @param reg_value pointer to a variable where to write register read value
  1438. @return status of register operation (LGW_REG_SUCCESS/LGW_REG_ERROR)
  1439. */
  1440. int lgw_reg_r(uint16_t register_id, int32_t *reg_value);
  1441. /**
  1442. @brief LoRa concentrator register burst write
  1443. @param register_id register number in the data structure describing registers
  1444. @param data pointer to byte array that will be sent to the LoRa concentrator
  1445. @param size size of the transfer, in byte(s)
  1446. @return status of register operation (LGW_REG_SUCCESS/LGW_REG_ERROR)
  1447. */
  1448. int lgw_reg_wb(uint16_t register_id, uint8_t *data, uint16_t size);
  1449. /**
  1450. @brief LoRa concentrator register burst read
  1451. @param register_id register number in the data structure describing registers
  1452. @param data pointer to byte array to store the data read from the LoRa concentrator
  1453. @param size size of the transfer, in byte(s)
  1454. @return status of register operation (LGW_REG_SUCCESS/LGW_REG_ERROR)
  1455. */
  1456. int lgw_reg_rb(uint16_t register_id, uint8_t *data, uint16_t size);
  1457. /**
  1458. @brief LoRa concentrator memory burst write
  1459. @param mem_addr the address of the memory section to write to
  1460. @param data pointer to byte array that will be written from the LoRa concentrator
  1461. @param size size of the transfer, in byte(s)
  1462. @return status of register operation (LGW_REG_SUCCESS/LGW_REG_ERROR)
  1463. */
  1464. int lgw_mem_wb(uint16_t mem_addr, const uint8_t *data, uint16_t size);
  1465. /**
  1466. @brief LoRa concentrator memory burst read
  1467. @param mem_addr the address of the memory section to read from
  1468. @param data pointer to byte array to store the data read from the LoRa concentrator
  1469. @param size size of the transfer, in byte(s)
  1470. @param fifo_mode the type of memory to read from
  1471. @return status of register operation (LGW_REG_SUCCESS/LGW_REG_ERROR)
  1472. */
  1473. int lgw_mem_rb(uint16_t mem_addr, uint8_t *data, uint16_t size, bool fifo_mode);
  1474. #endif
  1475. /* --- EOF ------------------------------------------------------------------ */