no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
adf7023.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef __ADF7023_H__
34#define __ADF7023_H__
35
36#include <stdint.h>
37#include "no_os_spi.h"
38#include "no_os_gpio.h"
39
40/* Status Word */
41#define STATUS_SPI_READY (0x1 << 7)
42#define STATUS_IRQ_STATUS (0x1 << 6)
43#define STATUS_CMD_READY (0x1 << 5)
44#define STATUS_FW_STATE (0x1F << 0)
45
46/* FW_STATE Description */
47#define FW_STATE_INIT 0x0F
48#define FW_STATE_BUSY 0x00
49#define FW_STATE_PHY_OFF 0x11
50#define FW_STATE_PHY_ON 0x12
51#define FW_STATE_PHY_RX 0x13
52#define FW_STATE_PHY_TX 0x14
53#define FW_STATE_PHY_SLEEP 0x06
54#define FW_STATE_GET_RSSI 0x05
55#define FW_STATE_IR_CAL 0x07
56#define FW_STATE_AES_DECRYPT_INIT 0x08
57#define FW_STATE_AES_DECRYPT 0x09
58#define FW_STATE_AES_ENCRYPT 0x0A
59
60/* SPI Memory Access Commands */
61#define SPI_MEM_WR 0x18 // Write data to packet RAM sequentially.
62#define SPI_MEM_RD 0x38 // Read data from packet RAM sequentially.
63#define SPI_MEMR_WR 0x08 // Write data to packet RAM nonsequentially.
64#define SPI_MEMR_RD 0x28 // Read data from packet RAM nonsequentially.
65#define SPI_NOP 0xFF // No operation.
66
67/* Radio Controller Commands */
68#define CMD_SYNC 0xA2 // This is an optional command. It is not necessary to use it during device initialization
69#define CMD_PHY_OFF 0xB0 // Performs a transition of the device into the PHY_OFF state.
70#define CMD_PHY_ON 0xB1 // Performs a transition of the device into the PHY_ON state.
71#define CMD_PHY_RX 0xB2 // Performs a transition of the device into the PHY_RX state.
72#define CMD_PHY_TX 0xB5 // Performs a transition of the device into the PHY_TX state.
73#define CMD_PHY_SLEEP 0xBA // Performs a transition of the device into the PHY_SLEEP state.
74#define CMD_CONFIG_DEV 0xBB // Configures the radio parameters based on the BBRAM values.
75#define CMD_GET_RSSI 0xBC // Performs an RSSI measurement.
76#define CMD_BB_CAL 0xBE // Performs a calibration of the IF filter.
77#define CMD_HW_RESET 0xC8 // Performs a full hardware reset. The device enters the PHY_SLEEP state.
78#define CMD_RAM_LOAD_INIT 0xBF // Prepares the program RAM for a firmware module download.
79#define CMD_RAM_LOAD_DONE 0xC7 // Performs a reset of the communications processor after download of a firmware module to program RAM.
80#define CMD_IR_CAL 0xBD // Initiates an image rejection calibration routine.
81#define CMD_AES_ENCRYPT 0xD0 // Performs an AES encryption on the transmit payload data stored in packet RAM.
82#define CMD_AES_DECRYPT 0xD2 // Performs an AES decryption on the received payload data stored in packet RAM.
83#define CMD_AES_DECRYPT_INIT 0xD1 // Initializes the internal variables required for AES decryption.
84#define CMD_RS_ENCODE_INIT 0xD1 // Initializes the internal variables required for the Reed Solomon encoding.
85#define CMD_RS_ENCODE 0xD0 // Calculates and appends the Reed Solomon check bytes to the transmit payload data stored in packet RAM.
86#define CMD_RS_DECODE 0xD2 // Performs a Reed Solomon error correction on the received payload data stored in packet RAM.
87
88/* Battery Backup Memory (BBRAM) */
89#define BBRAM_REG_INTERRUPT_MASK_0 0x100
90#define BBRAM_REG_INTERRUPT_MASK_1 0x101
91#define BBRAM_REG_NUMBER_OF_WAKEUPS_0 0x102
92#define BBRAM_REG_NUMBER_OF_WAKEUPS_1 0x103
93#define BBRAM_REG_NUMBER_OF_WAKEUPS_IRQ_THRESHOLD_0 0x104
94#define BBRAM_REG_NUMBER_OF_WAKEUPS_IRQ_THRESHOLD_1 0x105
95#define BBRAM_REG_RX_DWELL_TIME 0x106
96#define BBRAM_REG_PARMTIME_DIVIDER 0x107
97#define BBRAM_REG_SWM_RSSI_THRESH 0x108
98#define BBRAM_REG_CHANNEL_FREQ_0 0x109
99#define BBRAM_REG_CHANNEL_FREQ_1 0x10A
100#define BBRAM_REG_CHANNEL_FREQ_2 0x10B
101#define BBRAM_REG_RADIO_CFG_0 0x10C
102#define BBRAM_REG_RADIO_CFG_1 0x10D
103#define BBRAM_REG_RADIO_CFG_2 0x10E
104#define BBRAM_REG_RADIO_CFG_3 0x10F
105#define BBRAM_REG_RADIO_CFG_4 0x110
106#define BBRAM_REG_RADIO_CFG_5 0x111
107#define BBRAM_REG_RADIO_CFG_6 0x112
108#define BBRAM_REG_RADIO_CFG_7 0x113
109#define BBRAM_REG_RADIO_CFG_8 0x114
110#define BBRAM_REG_RADIO_CFG_9 0x115
111#define BBRAM_REG_RADIO_CFG_10 0x116
112#define BBRAM_REG_RADIO_CFG_11 0x117
113#define BBRAM_REG_IMAGE_REJECT_CAL_PHASE 0x118
114#define BBRAM_REG_IMAGE_REJECT_CAL_AMPLITUDE 0x119
115#define BBRAM_REG_MODE_CONTROL 0x11A
116#define BBRAM_REG_PREAMBLE_MATCH 0x11B
117#define BBRAM_REG_SYMBOL_MODE 0x11C
118#define BBRAM_REG_PREAMBLE_LEN 0x11D
119#define BBRAM_REG_CRC_POLY_0 0x11E
120#define BBRAM_REG_CRC_POLY_1 0x11F
121#define BBRAM_REG_SYNC_CONTROL 0x120
122#define BBRAM_REG_SYNC_BYTE_0 0x121
123#define BBRAM_REG_SYNC_BYTE_1 0x122
124#define BBRAM_REG_SYNC_BYTE_2 0x123
125#define BBRAM_REG_TX_BASE_ADR 0x124
126#define BBRAM_REG_RX_BASE_ADR 0x125
127#define BBRAM_REG_PACKET_LENGTH_CONTROL 0x126
128#define BBRAM_REG_PACKET_LENGTH_MAX 0x127
129#define BBRAM_REG_STATIC_REG_FIX 0x128
130#define BBRAM_REG_ADDRESS_MATCH_OFFSET 0x129
131#define BBRAM_REG_ADDRESS_LENGTH 0x12A
132#define BBRAM_REG_ADDRESS_FILTERING_0 0x12B
133#define BBRAM_REG_ADDRESS_FILTERING_1 0x12C
134#define BBRAM_REG_ADDRESS_FILTERING_2 0x12D
135#define BBRAM_REG_ADDRESS_FILTERING_3 0x12E
136#define BBRAM_REG_ADDRESS_FILTERING_4 0x12F
137#define BBRAM_REG_ADDRESS_FILTERING_5 0x130
138#define BBRAM_REG_ADDRESS_FILTERING_6 0x131
139#define BBRAM_REG_ADDRESS_FILTERING_7 0x132
140#define BBRAM_REG_ADDRESS_FILTERING_8 0x133
141#define BBRAM_REG_ADDRESS_FILTERING_9 0x134
142#define BBRAM_REG_ADDRESS_FILTERING_10 0x135
143#define BBRAM_REG_ADDRESS_FILTERING_11 0x136
144#define BBRAM_REG_ADDRESS_FILTERING_12 0x137
145#define BBRAM_REG_RSSI_WAIT_TIME 0x138
146#define BBRAM_REG_TESTMODES 0x139
147#define BBRAM_REG_TRANSITION_CLOCK_DIV 0x13A
148#define BBRAM_REG_RESERVED_0 0x13B
149#define BBRAM_REG_RESERVED_1 0x13C
150#define BBRAM_REG_RESERVED_2 0x13D
151#define BBRAM_REG_RX_SYNTH_LOCK_TIME 0x13E
152#define BBRAM_REG_TX_SYNTH_LOCK_TIME 0x13F
153
154/* BBRAM_REG_INTERRUPT_MASK_0 - 0x100 */
155#define BBRAM_INTERRUPT_MASK_0_INTERRUPT_NUM_WAKEUPS (0x1 << 7)
156#define BBRAM_INTERRUPT_MASK_0_INTERRUPT_SWM_RSSI_DET (0x1 << 6)
157#define BBRAM_INTERRUPT_MASK_0_INTERRUPT_AES_DONE (0x1 << 5)
158#define BBRAM_INTERRUPT_MASK_0_INTERRUPT_TX_EOF (0x1 << 4)
159#define BBRAM_INTERRUPT_MASK_0_INTERRUPT_ADDRESS_MATCH (0x1 << 3)
160#define BBRAM_INTERRUPT_MASK_0_INTERRUPT_CRC_CORRECT (0x1 << 2)
161#define BBRAM_INTERRUPT_MASK_0_INTERRUPT_SYNC_DETECT (0x1 << 1)
162#define BBRAM_INTERRUPT_MASK_0_INTERRUPT_PREMABLE_DETECT (0x1 << 0)
163
164/* BBRAM_REG_INTERRUPT_MASK_1 - 0x101*/
165#define BBRAM_INTERRUPT_MASK_1_BATTERY_ALARM (0x1 << 7)
166#define BBRAM_INTERRUPT_MASK_1_CMD_READY (0x1 << 6)
167#define BBRAM_INTERRUPT_MASK_1_WUC_TIMEOUT (0x1 << 4)
168#define BBRAM_INTERRUPT_MASK_1_SPI_READY (0x1 << 1)
169#define BBRAM_INTERRUPT_MASK_1_CMD_FINISHED (0x1 << 0)
170
171/* BBRAM_REG_RADIO_CFG_0 - 0x10C */
172#define BBRAM_RADIO_CFG_0_DATA_RATE_7_0(x) ((x & 0xFF) << 0)
173
174/* BBRAM_REG_RADIO_CFG_1 - 0x10D */
175#define BBRAM_RADIO_CFG_1_FREQ_DEVIATION_11_8(x) ((x & 0xF) << 4)
176#define BBRAM_RADIO_CFG_1_DATA_RATE_11_8(x) ((x & 0xF) << 0)
177
178/* BBRAM_REG_RADIO_CFG_2 - 0x10E */
179#define BBRAM_RADIO_CFG_2_FREQ_DEVIATION_7_0(x) ((x & 0xFF) << 0)
180
181/* BBRAM_REG_RADIO_CFG_6 - 0x112 */
182#define BBRAM_RADIO_CFG_6_SYNTH_LUT_CONFIG_0(x) ((x & 0x3F) << 2)
183#define BBRAM_RADIO_CFG_6_DISCRIM_PHASE(x) ((x & 0x3) << 0)
184
185/* BBRAM_REG_RADIO_CFG_7 - 0x113 */
186#define BBRAM_RADIO_CFG_7_AGC_LOCK_MODE(x) ((x & 0x3) << 6)
187#define BBRAM_RADIO_CFG_7_SYNTH_LUT_CONTROL(x) ((x & 0x3) << 4)
188#define BBRAM_RADIO_CFG_7_SYNTH_LUT_CONFIG_1(x) ((x & 0xF) << 0)
189
190/* BBRAM_REG_RADIO_CFG_8 - 0x114 */
191#define BBRAM_RADIO_CFG_8_PA_SINGLE_DIFF_SEL (0x1 << 7)
192#define BBRAM_RADIO_CFG_8_PA_LEVEL(x) ((x & 0xF) << 3)
193#define BBRAM_RADIO_CFG_8_PA_RAMP(x) ((x & 0x7) << 0)
194
195/* BBRAM_REG_RADIO_CFG_9 - 0x115 */
196#define BBRAM_RADIO_CFG_9_IFBW(x) ((x & 0x3) << 6)
197#define BBRAM_RADIO_CFG_9_MOD_SCHEME(x) ((x & 0x7) << 3)
198#define BBRAM_RADIO_CFG_9_DEMOD_SCHEME(x) ((x & 0x7) << 0)
199
200/* BBRAM_REG_RADIO_CFG_10 - 0x116 */
201#define BBRAM_RADIO_CFG_10_AFC_POLARITY (0x0 << 4)
202#define BBRAM_RADIO_CFG_10_AFC_SCHEME(x) ((x & 0x3) << 2)
203#define BBRAM_RADIO_CFG_10_AFC_LOCK_MODE(x) ((x & 0x3) << 0)
204
205/* BBRAM_REG_RADIO_CFG_11 - 0x117 */
206#define BBRAM_RADIO_CFG_11_AFC_KP(x) ((x & 0xF) << 4)
207#define BBRAM_RADIO_CFG_11_AFC_KI(x) ((x & 0xF) << 0)
208
209/* BBRAM_REG_MODE_CONTROL - 0x11A */
210#define BBRAM_MODE_CONTROL_SWM_EN (0x1 << 7)
211#define BBRAM_MODE_CONTROL_BB_CAL (0x1 << 6)
212#define BBRAM_MODE_CONTROL_SWM_RSSI_QUAL (0x1 << 5)
213#define BBRAM_MODE_CONTROL_TX_TO_RX_AUTO_TURNAROUND (0x1 << 4)
214#define BBRAM_MODE_CONTROL_RX_TO_TX_AUTO_TURNAROUND (0x1 << 3)
215#define BBRAM_MODE_CONTROL_CUSTOM_TRX_SYNTH_LOCK_TIME_EN (0x1 << 2)
216#define BBRAM_MODE_CONTROL_EXT_LNA_EN (0x1 << 1)
217#define BBRAM_MODE_CONTROL_EXT_PA_EN (0x1 << 0)
218
219/* BBRAM_REG_SYMBOL_MODE - 0x11C */
220#define BBRAM_SYMBOL_MODE_MANCHESTER_ENC (0x1 << 6)
221#define BBRAM_SYMBOL_MODE_PROG_CRC_EN (0x1 << 5)
222#define BBRAM_SYMBOL_MODE_EIGHT_TEN_ENC (0x1 << 4)
223#define BBRAM_SYMBOL_MODE_DATA_WHITENING (0x1 << 3)
224#define BBRAM_SYMBOL_MODE_SYMBOL_LENGTH(x) ((x & 0x7) << 0)
225
226/* BBRAM_REG_SYNC_CONTROL - 0x120 */
227#define BBRAM_SYNC_CONTROL_SYNC_ERROR_TOL(x) ((x & 0x3) << 6)
228#define BBRAM_SYNC_CONTROL_SYNC_WORD_LENGTH(x) ((x & 0x1F) << 0)
229
230/* BBRAM_REG_PACKET_LENGTH_CONTROL - 0x126 */
231#define BBRAM_PACKET_LENGTH_CONTROL_DATA_BYTE (0x1 << 7)
232#define BBRAM_PACKET_LENGTH_CONTROL_PACKET_LEN (0x1 << 6)
233#define BBRAM_PACKET_LENGTH_CONTROL_CRC_EN (0x1 << 5)
234#define BBRAM_PACKET_LENGTH_CONTROL_DATA_MODE(x) ((x & 0x3) << 3)
235#define BBRAM_PACKET_LENGTH_CONTROL_LENGTH_OFFSET(x) ((x & 0x7) << 0)
236
237/* BBRAM_REG_TESTMODES - 0x139 */
238#define BBRAM_TESTMODES_EXT_PA_LNA_ATB_CONFIG (0x1 << 7)
239#define BBRAM_TESTMODES_PER_IRQ_SELF_CLEAR (0x1 << 3)
240#define BBRAM_TESTMODES_PER_ENABLE (0x1 << 2)
241#define BBRAM_TESTMODES_CONTINUOUS_TX (0x1 << 1)
242#define BBRAM_TESTMODES_CONTINUOUS_RX (0x1 << 0)
243
244/* Modem Configuration Memory (MCR) */
245#define MCR_REG_PA_LEVEL_MCR 0x307
246#define MCR_REG_WUC_CONFIG_HIGH 0x30C
247#define MCR_REG_WUC_CONFIG_LOW 0x30D
248#define MCR_REG_WUC_VALUE_HIGH 0x30E
249#define MCR_REG_WUC_VALUE_LOW 0x30F
250#define MCR_REG_WUC_FLAG_RESET 0x310
251#define MCR_REG_WUC_STATUS 0x311
252#define MCR_REG_RSSI_READBACK 0x312
253#define MCR_REG_MAX_AFC_RANGE 0x315
254#define MCR_REG_IMAGE_REJECT_CAL_CONFIG 0x319
255#define MCR_REG_CHIP_SHUTDOWN 0x322
256#define MCR_REG_POWERDOWN_RX 0x324
257#define MCR_REG_POWERDOWN_AUX 0x325
258#define MCR_REG_ADC_READBACK_HIGH 0x327
259#define MCR_REG_ADC_READBACK_LOW 0x328
260#define MCR_REG_BATTERY_MONITOR_THRESHOLD_VOLTAGE 0x32D
261#define MCR_REG_EXT_UC_CLK_DIVIDE 0x32E
262#define MCR_REG_AGC_CLK_DIVIDE 0x32F
263#define MCR_REG_INTERRUPT_SOURCE_0 0x336
264#define MCR_REG_INTERRUPT_SOURCE_1 0x337
265#define MCR_REG_CALIBRATION_CONTROL 0x338
266#define MCR_REG_CALIBRATION_STATUS 0x339
267#define MCR_REG_RXBB_CAL_CALWRD_READBACK 0x345
268#define MCR_REG_RXBB_CAL_CALWRD_OVERWRITE 0x346
269#define MCR_REG_RCOSC_CAL_READBACK_HIGH 0x34F
270#define MCR_REG_RCOSC_CAL_READBACK_LOW 0x350
271#define MCR_REG_ADC_CONFIG_LOW 0x359
272#define MCR_REG_ADC_CONFIG_HIGH 0x35A
273#define MCR_REG_AGC_OOK_CONTROL 0x35B
274#define MCR_REG_AGC_CONFIG 0x35C
275#define MCR_REG_AGC_MODE 0x35D
276#define MCR_REG_AGC_LOW_THRESHOLD 0x35E
277#define MCR_REG_AGC_HIGH_THRESHOLD 0x35F
278#define MCR_REG_AGC_GAIN_STATUS 0x360
279#define MCR_REG_AGC_ADC_WORD 0x361
280#define MCR_REG_FREQUENCY_ERROR_READBACK 0x372
281#define MCR_REG_VCO_BAND_OVRW_VAL 0x3CB
282#define MCR_REG_VCO_AMPL_OVRW_VAL 0x3CC
283#define MCR_REG_VCO_OVRW_EN 0x3CD
284#define MCR_REG_VCO_CAL_CFG 0x3D0
285#define MCR_REG_OSC_CONFIG 0x3D2
286#define MCR_REG_VCO_BAND_READBACK 0x3DA
287#define MCR_REG_VCO_AMPL_READBACK 0x3DB
288#define MCR_REG_ANALOG_TEST_BUS 0x3F8
289#define MCR_REG_RSSI_TSTMUX_SEL 0x3F9
290#define MCR_REG_GPIO_CONFIGURE 0x3FA
291#define MCR_REG_TEST_DAC_GAIN 0x3FD
292
294 uint8_t interrupt_mask0; // 0x100
295 uint8_t interrupt_mask1; // 0x101
296 uint8_t number_of_wakeups0; // 0x102
297 uint8_t number_of_wakeups1; // 0x103
300 uint8_t rx_dwell_time; // 0x106
301 uint8_t parmtime_divider; // 0x107
302 uint8_t swm_rssi_thresh; // 0x108
303 uint8_t channel_freq0; // 0x109
304 uint8_t channel_freq1; // 0x10A
305 uint8_t channel_freq2; // 0x10B
306 uint8_t radio_cfg0; // 0x10C
307 uint8_t radio_cfg1; // 0x10D
308 uint8_t radio_cfg2; // 0x10E
309 uint8_t radio_cfg3; // 0x10F
310 uint8_t radio_cfg4; // 0x110
311 uint8_t radio_cfg5; // 0x111
312 uint8_t radio_cfg6; // 0x112
313 uint8_t radio_cfg7; // 0x113
314 uint8_t radio_cfg8; // 0x114
315 uint8_t radio_cfg9; // 0x115
316 uint8_t radio_cfg10; // 0x116
317 uint8_t radio_cfg11; // 0x117
318 uint8_t image_reject_cal_phase; // 0x118
320 uint8_t mode_control; // 0x11A
321 uint8_t preamble_match; // 0x11B
322 uint8_t symbol_mode; // 0x11C
323 uint8_t preamble_len; // 0x11D
324 uint8_t crc_poly0; // 0x11E
325 uint8_t crc_poly1; // 0x11F
326 uint8_t syncControl; // 0x120
327 uint8_t sync_byte0; // 0x121
328 uint8_t sync_byte1; // 0x122
329 uint8_t sync_byte2; // 0x123
330 uint8_t tx_base_adr; // 0x124
331 uint8_t rx_base_adr; // 0x125
332 uint8_t packet_length_control; // 0x126
333 uint8_t packet_length_max; // 0x127
334 uint8_t static_reg_fix; // 0x128
335 uint8_t address_match_offset; // 0x129
336 uint8_t address_length; // 0x12A
337 uint8_t address_filtering0; // 0x12B
338 uint8_t address_filtering1; // 0x12C
339 uint8_t address_filtering2; // 0x12D
340 uint8_t address_filtering3; // 0x12E
341 uint8_t address_filtering4; // 0x12F
342 uint8_t address_filtering5; // 0x130
343 uint8_t address_filtering6; // 0x131
344 uint8_t address_filtering7; // 0x132
345 uint8_t address_filtering8; // 0x133
346 uint8_t address_filtering9; // 0x134
347 uint8_t address_filtering10; // 0x135
348 uint8_t address_filtering11; // 0x136
349 uint8_t address_filtering12; // 0x137
350 uint8_t rssi_wait_time; // 0x138
351 uint8_t testmodes; // 0x139
352 uint8_t transition_clock_div; // 0x13A
353 uint8_t reserved0; // 0x13B
354 uint8_t reserved1; // 0x13C
355 uint8_t reserved2; // 0x13D
356 uint8_t rx_synth_lock_time; // 0x13E
357 uint8_t tx_synth_lock_time; // 0x13F
358};
359
360#define ADF7023_TX_BASE_ADR 0x10
361#define ADF7023_RX_BASE_ADR 0x10
362
364 /* SPI */
366 /* GPIO */
369 /* Device Settings */
371};
372
380
381/* Initializes the ADF7023. */
382int32_t adf7023_init(struct adf7023_dev **device,
384
385/* Free the resources allocated by adf7023_init(). */
386int32_t adf7023_remove(struct adf7023_dev *dev);
387
388/* Reads the status word of the ADF7023. */
389void adf7023_get_status(struct adf7023_dev *dev,
390 uint8_t* status);
391
392/* Initiates a command. */
393void adf7023_set_command(struct adf7023_dev *dev,
394 uint8_t command);
395
396/* Sets a FW state and waits until the device enters in that state. */
397void adf7023_set_fw_state(struct adf7023_dev *dev,
398 uint8_t fw_state);
399
400/* Reads data from the RAM. */
401void adf7023_get_ram(struct adf7023_dev *dev,
402 uint32_t address,
403 uint32_t length,
404 uint8_t* data);
405
406/* Writes data to RAM. */
407void adf7023_set_ram(struct adf7023_dev *dev,
408 uint32_t address,
409 uint32_t length,
410 uint8_t* data);
411
412/* Receives one packet. */
413void adf7023_receive_packet(struct adf7023_dev *dev,
414 uint8_t* packet,
415 uint8_t* length);
416
417/* Transmits one packet. */
418void adf7023_transmit_packet(struct adf7023_dev *dev,
419 uint8_t* packet,
420 uint8_t length);
421
422/* Sets the channel frequency. */
424 uint32_t ch_freq);
425
426/* Sets the data rate. */
427void adf7023_set_data_rate(struct adf7023_dev *dev,
428 uint32_t data_rate);
429
430/* Sets the frequency deviation. */
432 uint32_t freq_dev);
433
434#endif // __ADF7023_H__
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
void adf7023_set_fw_state(struct adf7023_dev *dev, uint8_t fw_state)
Sets a FW state and waits until the device enters in that state.
Definition adf7023.c:176
void adf7023_set_data_rate(struct adf7023_dev *dev, uint32_t data_rate)
Sets the data rate.
Definition adf7023.c:323
void adf7023_get_ram(struct adf7023_dev *dev, uint32_t address, uint32_t length, uint8_t *data)
Reads data from the RAM.
Definition adf7023.c:210
void adf7023_set_command(struct adf7023_dev *dev, uint8_t command)
Initiates a command.
Definition adf7023.c:162
int32_t adf7023_remove(struct adf7023_dev *dev)
Free the resources allocated by adf7023_init().
Definition adf7023.c:127
void adf7023_transmit_packet(struct adf7023_dev *dev, uint8_t *packet, uint8_t length)
Transmits one packet.
Definition adf7023.c:281
void adf7023_set_frequency_deviation(struct adf7023_dev *dev, uint32_t freq_dev)
Sets the frequency deviation.
Definition adf7023.c:343
int32_t adf7023_init(struct adf7023_dev **device, struct adf7023_init_param init_param)
Initializes the ADF7023.
Definition adf7023.c:76
void adf7023_set_channel_frequency(struct adf7023_dev *dev, uint32_t ch_freq)
Sets the channel frequency.
Definition adf7023.c:307
void adf7023_set_ram(struct adf7023_dev *dev, uint32_t address, uint32_t length, uint8_t *data)
Writes data to RAM.
Definition adf7023.c:233
void adf7023_get_status(struct adf7023_dev *dev, uint8_t *status)
Reads the status word of the ADF7023.
Definition adf7023.c:147
void adf7023_receive_packet(struct adf7023_dev *dev, uint8_t *packet, uint8_t *length)
Receives one packet.
Definition adf7023.c:254
Header file of GPIO Interface.
Header file of SPI Interface.
Definition adf7023.h:293
uint8_t radio_cfg3
Definition adf7023.h:309
uint8_t rx_base_adr
Definition adf7023.h:331
uint8_t image_reject_cal_amplitude
Definition adf7023.h:319
uint8_t radio_cfg5
Definition adf7023.h:311
uint8_t preamble_match
Definition adf7023.h:321
uint8_t swm_rssi_thresh
Definition adf7023.h:302
uint8_t channel_freq1
Definition adf7023.h:304
uint8_t crc_poly1
Definition adf7023.h:325
uint8_t rx_synth_lock_time
Definition adf7023.h:356
uint8_t radio_cfg0
Definition adf7023.h:306
uint8_t tx_base_adr
Definition adf7023.h:330
uint8_t address_filtering11
Definition adf7023.h:348
uint8_t address_filtering8
Definition adf7023.h:345
uint8_t sync_byte2
Definition adf7023.h:329
uint8_t address_filtering6
Definition adf7023.h:343
uint8_t address_filtering2
Definition adf7023.h:339
uint8_t radio_cfg2
Definition adf7023.h:308
uint8_t number_of_wakeups0
Definition adf7023.h:296
uint8_t image_reject_cal_phase
Definition adf7023.h:318
uint8_t rx_dwell_time
Definition adf7023.h:300
uint8_t radio_cfg11
Definition adf7023.h:317
uint8_t address_length
Definition adf7023.h:336
uint8_t address_filtering7
Definition adf7023.h:344
uint8_t transition_clock_div
Definition adf7023.h:352
uint8_t address_filtering9
Definition adf7023.h:346
uint8_t packet_length_control
Definition adf7023.h:332
uint8_t address_filtering10
Definition adf7023.h:347
uint8_t address_filtering5
Definition adf7023.h:342
uint8_t crc_poly0
Definition adf7023.h:324
uint8_t address_filtering1
Definition adf7023.h:338
uint8_t syncControl
Definition adf7023.h:326
uint8_t radio_cfg10
Definition adf7023.h:316
uint8_t interrupt_mask1
Definition adf7023.h:295
uint8_t preamble_len
Definition adf7023.h:323
uint8_t static_reg_fix
Definition adf7023.h:334
uint8_t channel_freq2
Definition adf7023.h:305
uint8_t sync_byte1
Definition adf7023.h:328
uint8_t address_filtering4
Definition adf7023.h:341
uint8_t number_of_wakeups1
Definition adf7023.h:297
uint8_t channel_freq0
Definition adf7023.h:303
uint8_t mode_control
Definition adf7023.h:320
uint8_t number_of_wakeups_irq_threshold1
Definition adf7023.h:299
uint8_t radio_cfg7
Definition adf7023.h:313
uint8_t address_filtering0
Definition adf7023.h:337
uint8_t testmodes
Definition adf7023.h:351
uint8_t address_match_offset
Definition adf7023.h:335
uint8_t radio_cfg1
Definition adf7023.h:307
uint8_t interrupt_mask0
Definition adf7023.h:294
uint8_t number_of_wakeups_irq_threshold0
Definition adf7023.h:298
uint8_t address_filtering3
Definition adf7023.h:340
uint8_t parmtime_divider
Definition adf7023.h:301
uint8_t reserved1
Definition adf7023.h:354
uint8_t reserved2
Definition adf7023.h:355
uint8_t reserved0
Definition adf7023.h:353
uint8_t packet_length_max
Definition adf7023.h:333
uint8_t radio_cfg6
Definition adf7023.h:312
uint8_t sync_byte0
Definition adf7023.h:327
uint8_t rssi_wait_time
Definition adf7023.h:350
uint8_t tx_synth_lock_time
Definition adf7023.h:357
uint8_t address_filtering12
Definition adf7023.h:349
uint8_t radio_cfg9
Definition adf7023.h:315
uint8_t radio_cfg4
Definition adf7023.h:310
uint8_t symbol_mode
Definition adf7023.h:322
uint8_t radio_cfg8
Definition adf7023.h:314
Definition adf7023.h:363
struct no_os_spi_desc * spi_desc
Definition adf7023.h:365
struct no_os_gpio_desc * gpio_cs
Definition adf7023.h:367
struct adf7023_bbram adf7023_bbram_current
Definition adf7023.h:370
struct no_os_gpio_desc * gpio_miso
Definition adf7023.h:368
Definition adf7023.h:373
struct no_os_spi_init_param spi_init
Definition adf7023.h:375
struct no_os_gpio_init_param gpio_cs
Definition adf7023.h:377
struct no_os_gpio_init_param gpio_miso
Definition adf7023.h:378
Definition ad9361_util.h:63
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128