| LibDriver LLCC68 1.0.0 LLCC68 full function driver

driver_llcc68_register_test.c
Go to the documentation of this file.
1
37 #include "driver_llcc68_register_test.h"
38 #include <stdlib.h>
39
40 static llcc68_handle_t gs_handle;
49 uint8_t llcc68_register_test(void)
50 {
51 uint8_t res;
52 uint8_t addr, addr_check;
53 uint8_t i;
54 uint16_t value, value_check;
55 uint8_t sync_word[8];
56 uint8_t sync_word_check[8];
57 uint8_t setup, setup_check;
58 uint32_t rand_number;
59 uint8_t modulation, modulation_check;
60 uint8_t gain, gain_check;
61 uint8_t config, config_check;
62 uint8_t ocp, ocp_check;
63 uint8_t control, control_check;
64 uint8_t trim, trim_check;
65 uint8_t mask, mask_check;
66 uint8_t enable, enable_check;
67 double us, us_check;
68 uint32_t freq, freq_check;
69 uint32_t br, br_check;
70 uint32_t reg;
71 llcc68_packet_type_t type;
72 llcc68_info_t info;
73
74 /* link interface function */
75 DRIVER_LLCC68_LINK_INIT(&gs_handle, llcc68_handle_t);
76 DRIVER_LLCC68_LINK_SPI_INIT(&gs_handle, llcc68_interface_spi_init);
77 DRIVER_LLCC68_LINK_SPI_DEINIT(&gs_handle, llcc68_interface_spi_deinit);
78 DRIVER_LLCC68_LINK_SPI_WRITE_READ(&gs_handle, llcc68_interface_spi_write_read);
79 DRIVER_LLCC68_LINK_RESET_GPIO_INIT(&gs_handle, llcc68_interface_reset_gpio_init);
80 DRIVER_LLCC68_LINK_RESET_GPIO_DEINIT(&gs_handle, llcc68_interface_reset_gpio_deinit);
81 DRIVER_LLCC68_LINK_RESET_GPIO_WRITE(&gs_handle, llcc68_interface_reset_gpio_write);
82 DRIVER_LLCC68_LINK_BUSY_GPIO_INIT(&gs_handle, llcc68_interface_busy_gpio_init);
83 DRIVER_LLCC68_LINK_BUSY_GPIO_DEINIT(&gs_handle, llcc68_interface_busy_gpio_deinit);
84 DRIVER_LLCC68_LINK_BUSY_GPIO_READ(&gs_handle, llcc68_interface_busy_gpio_read);
85 DRIVER_LLCC68_LINK_DELAY_MS(&gs_handle, llcc68_interface_delay_ms);
86 DRIVER_LLCC68_LINK_DEBUG_PRINT(&gs_handle, llcc68_interface_debug_print);
87 DRIVER_LLCC68_LINK_RECEIVE_CALLBACK(&gs_handle, llcc68_interface_receive_callback);
88
89 /* get information */
90 res = llcc68_info(&info);
91 if (res != 0)
92 {
93 llcc68_interface_debug_print("llcc68: get info failed.\n");
94
95 return 1;
96 }
97 else
98 {
99 /* print chip info */
100 llcc68_interface_debug_print("llcc68: chip is %s.\n", info.chip_name);
101 llcc68_interface_debug_print("llcc68: manufacturer is %s.\n", info.manufacturer_name);
102 llcc68_interface_debug_print("llcc68: interface is %s.\n", info.interface);
103 llcc68_interface_debug_print("llcc68: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
104 llcc68_interface_debug_print("llcc68: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
105 llcc68_interface_debug_print("llcc68: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
106 llcc68_interface_debug_print("llcc68: max current is %0.2fmA.\n", info.max_current_ma);
107 llcc68_interface_debug_print("llcc68: max temperature is %0.1fC.\n", info.temperature_max);
108 llcc68_interface_debug_print("llcc68: min temperature is %0.1fC.\n", info.temperature_min);
109 }
110
111 /* start register test */
112 llcc68_interface_debug_print("llcc68: start register test.\n");
113
114 /* init the llcc68 */
115 res = llcc68_init(&gs_handle);
116 if (res != 0)
117 {
118 llcc68_interface_debug_print("llcc68: init failed.\n");
119
120 return 1;
121 }
122
123 /* set standby mode */
124 res = llcc68_set_standby(&gs_handle, LLCC68_CLOCK_SOURCE_XTAL_32MHZ);
125 if (res != 0)
126 {
127 llcc68_interface_debug_print("llcc68: set standby failed.\n");
128 (void)llcc68_deinit(&gs_handle);
129
130 return 1;
131 }
132
133 /* llcc68_write_register/llcc68_read_register test */
134 llcc68_interface_debug_print("llcc68: llcc68_write_register/llcc68_read_register test.\n");
135
136 control = rand() % 256;
137 res = llcc68_write_register(&gs_handle, 0x06BC, (uint8_t *)&control, 1);
138 if (res != 0)
139 {
140 llcc68_interface_debug_print("llcc68: write register failed.\n");
141 (void)llcc68_deinit(&gs_handle);
142
143 return 1;
144 }
145 llcc68_interface_debug_print("llcc68: set register 0x%02X.\n", control);
146 res = llcc68_read_register(&gs_handle, 0x06BC, (uint8_t *)&control_check, 1);
147 if (res != 0)
148 {
149 llcc68_interface_debug_print("llcc68: read register failed.\n");
150 (void)llcc68_deinit(&gs_handle);
151
152 return 1;
153 }
154 llcc68_interface_debug_print("llcc68: check register %s.\n", control_check == control ? "ok" : "error");
155
156 /* llcc68_write_buffer/llcc68_read_buffer test */
157 llcc68_interface_debug_print("llcc68: llcc68_write_buffer/llcc68_read_buffer test.\n");
158
159 control = rand() % 256;
160 res = llcc68_write_buffer(&gs_handle , 0, (uint8_t *)&control, 1);
161 if (res != 0)
162 {
163 llcc68_interface_debug_print("llcc68: write buffer failed.\n");
164 (void)llcc68_deinit(&gs_handle);
165
166 return 1;
167 }
168 llcc68_interface_debug_print("llcc68: set buffer 0x%02X.\n", control);
169 res = llcc68_read_buffer(&gs_handle, 0, (uint8_t *)&control_check, 1);
170 if (res != 0)
171 {
172 llcc68_interface_debug_print("llcc68: read buffer failed.\n");
173 (void)llcc68_deinit(&gs_handle);
174
175 return 1;
176 }
177 llcc68_interface_debug_print("llcc68: check buffer %s.\n", control_check == control ? "ok" : "error");
178
179 /* llcc68_timeout_convert_to_register/llcc68_timeout_convert_to_data test */
180 llcc68_interface_debug_print("llcc68: llcc68_timeout_convert_to_register/llcc68_timeout_convert_to_data test.\n");
181
182 us = (rand() % 10000) / 10.0;
183 res = llcc68_timeout_convert_to_register(&gs_handle, us, (uint32_t *)&reg);
184 if (res != 0)
185 {
186 llcc68_interface_debug_print("llcc68: timeout convert to register failed.\n");
187 (void)llcc68_deinit(&gs_handle);
188
189 return 1;
190 }
191 llcc68_interface_debug_print("llcc68: set timeout %f us.\n", us);
192 res = llcc68_timeout_convert_to_data(&gs_handle, reg, (double *)&us_check);
193 if (res != 0)
194 {
195 llcc68_interface_debug_print("llcc68: timeout convert to data failed.\n");
196 (void)llcc68_deinit(&gs_handle);
197
198 return 1;
199 }
200 llcc68_interface_debug_print("llcc68: check timeout %f us.\n", us_check);
201
202 /* llcc68_frequency_convert_to_register/llcc68_frequency_convert_to_data test */
203 llcc68_interface_debug_print("llcc68: llcc68_frequency_convert_to_register/llcc68_frequency_convert_to_data test.\n");
204
205 freq = 47000000;
206 res = llcc68_frequency_convert_to_register(&gs_handle, freq, (uint32_t *)&reg);
207 if (res != 0)
208 {
209 llcc68_interface_debug_print("llcc68: frequency convert to register failed.\n");
210 (void)llcc68_deinit(&gs_handle);
211
212 return 1;
213 }
214 llcc68_interface_debug_print("llcc68: set frequency %d Hz.\n", freq);
215 res = llcc68_frequency_convert_to_data(&gs_handle, reg, (uint32_t *)&freq_check);
216 if (res != 0)
217 {
218 llcc68_interface_debug_print("llcc68: frequency convert to data failed.\n");
219 (void)llcc68_deinit(&gs_handle);
220
221 return 1;
222 }
223 llcc68_interface_debug_print("llcc68: check frequency %d Hz.\n", freq_check);
224
225 /* llcc68_gfsk_bit_rate_convert_to_register/llcc68_gfsk_bit_rate_convert_to_data test */
226 llcc68_interface_debug_print("llcc68: llcc68_gfsk_bit_rate_convert_to_register/llcc68_gfsk_bit_rate_convert_to_data test.\n");
227
228 br = 470000;
229 res = llcc68_gfsk_bit_rate_convert_to_register(&gs_handle, br, (uint32_t *)&reg);
230 if (res != 0)
231 {
232 llcc68_interface_debug_print("llcc68: gfsk bit rate convert to register failed.\n");
233 (void)llcc68_deinit(&gs_handle);
234
235 return 1;
236 }
237 llcc68_interface_debug_print("llcc68: set bit rate %d Hz.\n", br);
238 res = llcc68_gfsk_bit_rate_convert_to_data(&gs_handle, reg, (uint32_t *)&br_check);
239 if (res != 0)
240 {
241 llcc68_interface_debug_print("llcc68: gfsk bit rate convert to data failed.\n");
242 (void)llcc68_deinit(&gs_handle);
243
244 return 1;
245 }
246 llcc68_interface_debug_print("llcc68: check bit rate %d Hz.\n", br_check);
247
248 /* llcc68_gfsk_frequency_deviation_convert_to_register/llcc68_gfsk_frequency_deviation_convert_to_data test */
249 llcc68_interface_debug_print("llcc68: llcc68_gfsk_frequency_deviation_convert_to_register/llcc68_gfsk_frequency_deviation_convert_to_data test.\n");
250
251 freq = 10000;
252 res = llcc68_gfsk_frequency_deviation_convert_to_register(&gs_handle, freq, (uint32_t *)&reg);
253 if (res != 0)
254 {
255 llcc68_interface_debug_print("llcc68: gfsk frequency deviation convert to register failed.\n");
256 (void)llcc68_deinit(&gs_handle);
257
258 return 1;
259 }
260 llcc68_interface_debug_print("llcc68: gfsk frequency deviation %d Hz.\n", freq);
261 res = llcc68_gfsk_frequency_deviation_convert_to_data(&gs_handle, reg, (uint32_t *)&freq_check);
262 if (res != 0)
263 {
264 llcc68_interface_debug_print("llcc68: gfsk frequency deviation convert to data failed.\n");
265 (void)llcc68_deinit(&gs_handle);
266
267 return 1;
268 }
269 llcc68_interface_debug_print("llcc68: check gfsk frequency deviation %d Hz.\n", freq_check);
270
271 /* llcc68_set_packet_type/llcc68_get_packet_type test */
272 llcc68_interface_debug_print("llcc68: llcc68_set_packet_type/llcc68_get_packet_type test.\n");
273
274 /* set gfsk type */
275 res = llcc68_set_packet_type(&gs_handle, LLCC68_PACKET_TYPE_GFSK);
276 if (res != 0)
277 {
278 llcc68_interface_debug_print("llcc68: set packet type failed.\n");
279 (void)llcc68_deinit(&gs_handle);
280
281 return 1;
282 }
283 llcc68_interface_debug_print("llcc68: set gfsk type.\n");
284 res = llcc68_get_packet_type(&gs_handle, &type);
285 if (res != 0)
286 {
287 llcc68_interface_debug_print("llcc68: get packet type failed.\n");
288 (void)llcc68_deinit(&gs_handle);
289
290 return 1;
291 }
292 llcc68_interface_debug_print("llcc68: check packet type %s.\n", type == LLCC68_PACKET_TYPE_GFSK ? "ok" : "error");
293
294 /* set lora type */
295 res = llcc68_set_packet_type(&gs_handle, LLCC68_PACKET_TYPE_LORA);
296 if (res != 0)
297 {
298 llcc68_interface_debug_print("llcc68: set packet type failed.\n");
299 (void)llcc68_deinit(&gs_handle);
300
301 return 1;
302 }
303 llcc68_interface_debug_print("llcc68: set lora type.\n");
304 res = llcc68_get_packet_type(&gs_handle, &type);
305 if (res != 0)
306 {
307 llcc68_interface_debug_print("llcc68: get packet type failed.\n");
308 (void)llcc68_deinit(&gs_handle);
309
310 return 1;
311 }
312 llcc68_interface_debug_print("llcc68: check packet type %s.\n", type == LLCC68_PACKET_TYPE_LORA ? "ok" : "error");
313
314 /* llcc68_set_fsk_whitening_initial_value/llcc68_get_fsk_whitening_initial_value test */
315 llcc68_interface_debug_print("llcc68: llcc68_set_fsk_whitening_initial_value/llcc68_get_fsk_whitening_initial_value test.\n");
316
317 value = 0x0100;
318 res = llcc68_set_fsk_whitening_initial_value(&gs_handle, value);
319 if (res != 0)
320 {
321 llcc68_interface_debug_print("llcc68: set fsk whitening initial value failed.\n");
322 (void)llcc68_deinit(&gs_handle);
323
324 return 1;
325 }
326 llcc68_interface_debug_print("llcc68: set fsk whitening initial value 0x%04X.\n", value);
327 res = llcc68_get_fsk_whitening_initial_value(&gs_handle, (uint16_t *)&value_check);
328 if (res != 0)
329 {
330 llcc68_interface_debug_print("llcc68: get fsk whitening initial value failed.\n");
331 (void)llcc68_deinit(&gs_handle);
332
333 return 1;
334 }
335 llcc68_interface_debug_print("llcc68: check fsk whitening initial value %s.\n", value_check == value ? "ok" : "error");
336
337 /* llcc68_set_fsk_crc_initical_value/llcc68_get_fsk_crc_initical_value test */
338 llcc68_interface_debug_print("llcc68: llcc68_set_fsk_crc_initical_value/llcc68_get_fsk_crc_initical_value test.\n");
339
340 value = rand() % 65536;
341 res = llcc68_set_fsk_crc_initical_value(&gs_handle, value);
342 if (res != 0)
343 {
344 llcc68_interface_debug_print("llcc68: set fsk crc initical value failed.\n");
345 (void)llcc68_deinit(&gs_handle);
346
347 return 1;
348 }
349 llcc68_interface_debug_print("llcc68: set fsk crc initical value 0x%04X.\n", value);
350 res = llcc68_get_fsk_crc_initical_value(&gs_handle, (uint16_t *)&value_check);
351 if (res != 0)
352 {
353 llcc68_interface_debug_print("llcc68: get fsk crc initical value failed.\n");
354 (void)llcc68_deinit(&gs_handle);
355
356 return 1;
357 }
358 llcc68_interface_debug_print("llcc68: check fsk crc initical value %s.\n", value_check == value ? "ok" : "error");
359
360 /* llcc68_set_fsk_crc_initical_value/llcc68_get_fsk_crc_initical_value test */
361 llcc68_interface_debug_print("llcc68: llcc68_set_fsk_crc_initical_value/llcc68_get_fsk_crc_initical_value test.\n");
362
363 value = rand() % 65536;
364 res = llcc68_set_fsk_crc_polynomial_value(&gs_handle, value);
365 if (res != 0)
366 {
367 llcc68_interface_debug_print("llcc68: set fsk crc polynomial value failed.\n");
368 (void)llcc68_deinit(&gs_handle);
369
370 return 1;
371 }
372 llcc68_interface_debug_print("llcc68: set fsk crc polynomial value 0x%04X.\n", value);
373 res = llcc68_get_fsk_crc_polynomial_value(&gs_handle, (uint16_t *)&value_check);
374 if (res != 0)
375 {
376 llcc68_interface_debug_print("llcc68: get fsk crc polynomial value failed.\n");
377 (void)llcc68_deinit(&gs_handle);
378
379 return 1;
380 }
381 llcc68_interface_debug_print("llcc68: check fsk crc polynomial value %s.\n", value_check == value ? "ok" : "error");
382
383 /* llcc68_set_fsk_sync_word/llcc68_get_fsk_sync_word test */
384 llcc68_interface_debug_print("llcc68: llcc68_set_fsk_sync_word/llcc68_get_fsk_sync_word test.\n");
385
386 for (i = 0; i < 8; i++)
387 {
388 sync_word[i] = rand() %256;
389 }
390 res = llcc68_set_fsk_sync_word(&gs_handle, (uint8_t *)sync_word);
391 if (res != 0)
392 {
393 llcc68_interface_debug_print("llcc68: set fsk sync word failed.\n");
394 (void)llcc68_deinit(&gs_handle);
395
396 return 1;
397 }
398 llcc68_interface_debug_print("llcc68: set fsk sync word 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X.\n",
399 sync_word[0], sync_word[1], sync_word[2], sync_word[3],
400 sync_word[4], sync_word[5], sync_word[6], sync_word[7]);
401 res = llcc68_get_fsk_sync_word(&gs_handle, (uint8_t *)sync_word_check);
402 if (res != 0)
403 {
404 llcc68_interface_debug_print("llcc68: get fsk sync word failed.\n");
405 (void)llcc68_deinit(&gs_handle);
406
407 return 1;
408 }
409 llcc68_interface_debug_print("llcc68: check fsk sync word %s.\n", memcmp((uint8_t *)sync_word, (uint8_t *)sync_word_check, 8) == 0 ? "ok" : "error");
410
411 /* llcc68_set_fsk_node_address/llcc68_get_fsk_node_address test */
412 llcc68_interface_debug_print("llcc68: llcc68_set_fsk_node_address/llcc68_get_fsk_node_address test.\n");
413
414 addr = rand() %256;
415 res = llcc68_set_fsk_node_address(&gs_handle, addr);
416 if (res != 0)
417 {
418 llcc68_interface_debug_print("llcc68: set fsk node address failed.\n");
419 (void)llcc68_deinit(&gs_handle);
420
421 return 1;
422 }
423 llcc68_interface_debug_print("llcc68: set fsk node address 0x%02X.\n", addr);
424 res = llcc68_get_fsk_node_address(&gs_handle, (uint8_t *)&addr_check);
425 if (res != 0)
426 {
427 llcc68_interface_debug_print("llcc68: get fsk node address failed.\n");
428 (void)llcc68_deinit(&gs_handle);
429
430 return 1;
431 }
432 llcc68_interface_debug_print("llcc68: check fsk node address %s.\n", addr == addr_check ? "ok" : "error");
433
434 /* llcc68_set_fsk_broadcast_address/llcc68_get_fsk_broadcast_address test */
435 llcc68_interface_debug_print("llcc68: llcc68_set_fsk_broadcast_address/llcc68_get_fsk_broadcast_address test.\n");
436
437 addr = rand() %256;
438 res = llcc68_set_fsk_broadcast_address(&gs_handle, addr);
439 if (res != 0)
440 {
441 llcc68_interface_debug_print("llcc68: set fsk broadcast address failed.\n");
442 (void)llcc68_deinit(&gs_handle);
443
444 return 1;
445 }
446 llcc68_interface_debug_print("llcc68: set fsk broadcast address 0x%02X.\n", addr);
447 res = llcc68_get_fsk_broadcast_address(&gs_handle, (uint8_t *)&addr_check);
448 if (res != 0)
449 {
450 llcc68_interface_debug_print("llcc68: get fsk broadcast address failed.\n");
451 (void)llcc68_deinit(&gs_handle);
452
453 return 1;
454 }
455 llcc68_interface_debug_print("llcc68: check fsk broadcast address %s.\n", addr == addr_check ? "ok" : "error");
456
457 /* llcc68_set_iq_polarity/llcc68_get_iq_polarity test */
458 llcc68_interface_debug_print("llcc68: llcc68_set_iq_polarity/llcc68_get_iq_polarity test.\n");
459
460 setup = rand() %256;
461 res = llcc68_set_iq_polarity(&gs_handle, setup);
462 if (res != 0)
463 {
464 llcc68_interface_debug_print("llcc68: set iq polarity failed.\n");
465 (void)llcc68_deinit(&gs_handle);
466
467 return 1;
468 }
469 llcc68_interface_debug_print("llcc68: set iq polarity 0x%02X.\n", setup);
470 res = llcc68_get_iq_polarity(&gs_handle, (uint8_t *)&setup_check);
471 if (res != 0)
472 {
473 llcc68_interface_debug_print("llcc68: get iq polarity failed.\n");
474 (void)llcc68_deinit(&gs_handle);
475
476 return 1;
477 }
478 llcc68_interface_debug_print("llcc68: check iq polarity %s.\n", setup == setup_check ? "ok" : "error");
479
480 /* llcc68_set_lora_sync_word/llcc68_get_lora_sync_word test */
481 llcc68_interface_debug_print("llcc68: llcc68_set_lora_sync_word/llcc68_get_lora_sync_word test.\n");
482
483 value = rand() % 65536;
484 res = llcc68_set_lora_sync_word(&gs_handle, value);
485 if (res != 0)
486 {
487 llcc68_interface_debug_print("llcc68: set lora sync word failed.\n");
488 (void)llcc68_deinit(&gs_handle);
489
490 return 1;
491 }
492 llcc68_interface_debug_print("llcc68: set lora sync word 0x%04X.\n", value);
493 res = llcc68_get_lora_sync_word(&gs_handle, (uint16_t *)&value_check);
494 if (res != 0)
495 {
496 llcc68_interface_debug_print("llcc68: get lora sync word failed.\n");
497 (void)llcc68_deinit(&gs_handle);
498
499 return 1;
500 }
501 llcc68_interface_debug_print("llcc68: check lora sync word %s.\n", value == value_check ? "ok" : "error");
502
503 /* llcc68_get_random_number test */
504 llcc68_interface_debug_print("llcc68: llcc68_get_random_number test.\n");
505
506 res = llcc68_get_random_number(&gs_handle, (uint32_t *)&rand_number);
507 if (res != 0)
508 {
509 llcc68_interface_debug_print("llcc68: get random number failed.\n");
510 (void)llcc68_deinit(&gs_handle);
511
512 return 1;
513 }
514 llcc68_interface_debug_print("llcc68: random number is 0x%08X.\n", rand_number);
515
516 /* llcc68_set_tx_modulation/llcc68_get_tx_modulation test */
517 llcc68_interface_debug_print("llcc68: llcc68_set_tx_modulation/llcc68_get_tx_modulation test.\n");
518
519 res = llcc68_get_tx_modulation(&gs_handle, (uint8_t *)&modulation_check);
520 if (res != 0)
521 {
522 llcc68_interface_debug_print("llcc68: get tx modulation failed.\n");
523 (void)llcc68_deinit(&gs_handle);
524
525 return 1;
526 }
527 modulation = 0;
528 modulation |= 0x04;
529 res = llcc68_set_tx_modulation(&gs_handle, modulation);
530 if (res != 0)
531 {
532 llcc68_interface_debug_print("llcc68: set tx modulation failed.\n");
533 (void)llcc68_deinit(&gs_handle);
534
535 return 1;
536 }
537 llcc68_interface_debug_print("llcc68: set tx modulation 0x%02X.\n", modulation);
538 res = llcc68_get_tx_modulation(&gs_handle, (uint8_t *)&modulation_check);
539 if (res != 0)
540 {
541 llcc68_interface_debug_print("llcc68: get tx modulation failed.\n");
542 (void)llcc68_deinit(&gs_handle);
543
544 return 1;
545 }
546 llcc68_interface_debug_print("llcc68: check tx modulation %s.\n", modulation == modulation_check ? "ok" : "error");
547
548 /* llcc68_set_rx_gain/llcc68_get_rx_gain test */
549 llcc68_interface_debug_print("llcc68: llcc68_set_rx_gain/llcc68_get_rx_gain test.\n");
550
551 gain = rand() % 256;
552 res = llcc68_set_rx_gain(&gs_handle, gain);
553 if (res != 0)
554 {
555 llcc68_interface_debug_print("llcc68: set rx gain failed.\n");
556 (void)llcc68_deinit(&gs_handle);
557
558 return 1;
559 }
560 llcc68_interface_debug_print("llcc68: set rx gain 0x%02X.\n", gain);
561 res = llcc68_get_rx_gain(&gs_handle, (uint8_t *)&gain_check);
562 if (res != 0)
563 {
564 llcc68_interface_debug_print("llcc68: get rx gain failed.\n");
565 (void)llcc68_deinit(&gs_handle);
566
567 return 1;
568 }
569 llcc68_interface_debug_print("llcc68: check rx gain %s.\n", gain == gain_check ? "ok" : "error");
570
571 /* llcc68_set_tx_clamp_config/llcc68_get_tx_clamp_config test */
572 llcc68_interface_debug_print("llcc68: llcc68_set_tx_clamp_config/llcc68_get_tx_clamp_config test.\n");
573
574 config = rand() % 256;
575 res = llcc68_set_tx_clamp_config(&gs_handle, config);
576 if (res != 0)
577 {
578 llcc68_interface_debug_print("llcc68: set tx clamp config failed.\n");
579 (void)llcc68_deinit(&gs_handle);
580
581 return 1;
582 }
583 llcc68_interface_debug_print("llcc68: set tx clamp config 0x%02X.\n", config);
584 res = llcc68_get_tx_clamp_config(&gs_handle, (uint8_t *)&config_check);
585 if (res != 0)
586 {
587 llcc68_interface_debug_print("llcc68: get tx clamp config failed.\n");
588 (void)llcc68_deinit(&gs_handle);
589
590 return 1;
591 }
592 llcc68_interface_debug_print("llcc68: check tx clamp config %s.\n", config == config_check ? "ok" : "error");
593
594 /* llcc68_set_ocp/llcc68_get_ocp test */
595 llcc68_interface_debug_print("llcc68: llcc68_set_ocp/llcc68_get_ocp test.\n");
596
597 ocp = rand() % 0x20;
598 res = llcc68_set_ocp(&gs_handle, ocp);
599 if (res != 0)
600 {
601 llcc68_interface_debug_print("llcc68: set ocp failed.\n");
602 (void)llcc68_deinit(&gs_handle);
603
604 return 1;
605 }
606 llcc68_interface_debug_print("llcc68: set ocp 0x%02X.\n", ocp);
607 res = llcc68_get_ocp(&gs_handle, (uint8_t *)&ocp_check);
608 if (res != 0)
609 {
610 llcc68_interface_debug_print("llcc68: get ocp failed.\n");
611 (void)llcc68_deinit(&gs_handle);
612
613 return 1;
614 }
615 llcc68_interface_debug_print("llcc68: check ocp config %s.\n", ocp == ocp_check ? "ok" : "error");
616
617 /* llcc68_set_rtc_control/llcc68_get_rtc_control test */
618 llcc68_interface_debug_print("llcc68: llcc68_set_rtc_control/llcc68_get_rtc_control test.\n");
619
620 /* disable */
621 control = 0;
622 res = llcc68_set_rtc_control(&gs_handle, control);
623 if (res != 0)
624 {
625 llcc68_interface_debug_print("llcc68: set rtc control failed.\n");
626 (void)llcc68_deinit(&gs_handle);
627
628 return 1;
629 }
630 llcc68_interface_debug_print("llcc68: disable rtc control.\n");
631 res = llcc68_get_rtc_control(&gs_handle, (uint8_t *)&control_check);
632 if (res != 0)
633 {
634 llcc68_interface_debug_print("llcc68: get rtc control failed.\n");
635 (void)llcc68_deinit(&gs_handle);
636
637 return 1;
638 }
639 llcc68_interface_debug_print("llcc68: check rtc control %s.\n", control_check == control ? "ok" : "error");
640
641 /* llcc68_set_xta_trim/llcc68_get_xta_trim test */
642 llcc68_interface_debug_print("llcc68: llcc68_set_xta_trim/llcc68_get_xta_trim test.\n");
643
644 trim = 0x05;
645 res = llcc68_set_xta_trim(&gs_handle, trim);
646 if (res != 0)
647 {
648 llcc68_interface_debug_print("llcc68: set xta trim failed.\n");
649 (void)llcc68_deinit(&gs_handle);
650
651 return 1;
652 }
653 llcc68_interface_debug_print("llcc68: set xta trim 0x%02X.\n", trim);
654 res = llcc68_get_xta_trim(&gs_handle, (uint8_t *)&trim_check);
655 if (res != 0)
656 {
657 llcc68_interface_debug_print("llcc68: get xta trim failed.\n");
658 (void)llcc68_deinit(&gs_handle);
659
660 return 1;
661 }
662 llcc68_interface_debug_print("llcc68: check xta trim %s.\n", trim_check == trim ? "ok" : "error");
663
664 /* llcc68_set_xtb_trim/llcc68_get_xtb_trim test */
665 llcc68_interface_debug_print("llcc68: llcc68_set_xtb_trim/llcc68_get_xtb_trim test.\n");
666
667 trim = 0x05;
668 res = llcc68_set_xtb_trim(&gs_handle, trim);
669 if (res != 0)
670 {
671 llcc68_interface_debug_print("llcc68: set xtb trim failed.\n");
672 (void)llcc68_deinit(&gs_handle);
673
674 return 1;
675 }
676 llcc68_interface_debug_print("llcc68: set xtb trim 0x%02X.\n", trim);
677 res = llcc68_get_xtb_trim(&gs_handle, (uint8_t *)&trim_check);
678 if (res != 0)
679 {
680 llcc68_interface_debug_print("llcc68: get xtb trim failed.\n");
681 (void)llcc68_deinit(&gs_handle);
682
683 return 1;
684 }
685 llcc68_interface_debug_print("llcc68: check xtb trim %s.\n", trim_check == trim ? "ok" : "error");
686
687 /* llcc68_set_dio3_output_control/llcc68_get_dio3_output_control test */
688 llcc68_interface_debug_print("llcc68: llcc68_set_dio3_output_control/llcc68_get_dio3_output_control test.\n");
689
690 control = 0x01;
691 res = llcc68_set_dio3_output_control(&gs_handle, control);
692 if (res != 0)
693 {
694 llcc68_interface_debug_print("llcc68: set dio3 output control failed.\n");
695 (void)llcc68_deinit(&gs_handle);
696
697 return 1;
698 }
699 llcc68_interface_debug_print("llcc68: set dio3 output control 0x%02X.\n", control);
700 res = llcc68_get_dio3_output_control(&gs_handle, (uint8_t *)&control_check);
701 if (res != 0)
702 {
703 llcc68_interface_debug_print("llcc68: get dio3 output control failed.\n");
704 (void)llcc68_deinit(&gs_handle);
705
706 return 1;
707 }
708 llcc68_interface_debug_print("llcc68: check dio3 output control %s.\n", control_check == control ? "ok" : "error");
709
710 /* llcc68_set_event_mask/llcc68_get_event_mask test */
711 llcc68_interface_debug_print("llcc68: llcc68_set_event_mask/llcc68_get_event_mask test.\n");
712
713 mask = 0;
714 res = llcc68_set_event_mask(&gs_handle, mask);
715 if (res != 0)
716 {
717 llcc68_interface_debug_print("llcc68: set event mask failed.\n");
718 (void)llcc68_deinit(&gs_handle);
719
720 return 1;
721 }
722 llcc68_interface_debug_print("llcc68: set event mask 0x%02X.\n", mask);
723 res = llcc68_get_event_mask(&gs_handle, (uint8_t *)&mask_check);
724 if (res != 0)
725 {
726 llcc68_interface_debug_print("llcc68: get event mask failed.\n");
727 (void)llcc68_deinit(&gs_handle);
728
729 return 1;
730 }
731 llcc68_interface_debug_print("llcc68: check event mask %s.\n", mask_check == mask ? "ok" : "error");
732
733 /* llcc68_set_dio_output_enable/llcc68_get_dio_output_enable test */
734 llcc68_interface_debug_print("llcc68: llcc68_set_dio_output_enable/llcc68_get_dio_output_enable test.\n");
735
736 enable = rand() % 0xF;
737 res = llcc68_set_dio_output_enable(&gs_handle, enable);
738 if (res != 0)
739 {
740 llcc68_interface_debug_print("llcc68: set dio output enable failed.\n");
741 (void)llcc68_deinit(&gs_handle);
742
743 return 1;
744 }
745 llcc68_interface_debug_print("llcc68: set dio output enable 0x%02X.\n", enable);
746 res = llcc68_get_dio_output_enable(&gs_handle, (uint8_t *)&enable_check);
747 if (res != 0)
748 {
749 llcc68_interface_debug_print("llcc68: get dio output enable failed.\n");
750 (void)llcc68_deinit(&gs_handle);
751
752 return 1;
753 }
754 llcc68_interface_debug_print("llcc68: check dio output enable %s.\n", enable == enable_check ? "ok" : "error");
755
756 /* llcc68_set_dio_input_enable/llcc68_get_dio_input_enable test */
757 llcc68_interface_debug_print("llcc68: llcc68_set_dio_input_enable/llcc68_get_dio_input_enable test.\n");
758
759 res = llcc68_set_dio_output_enable(&gs_handle, 0x00);
760 if (res != 0)
761 {
762 llcc68_interface_debug_print("llcc68: set dio output enable failed.\n");
763 (void)llcc68_deinit(&gs_handle);
764
765 return 1;
766 }
767 enable = rand() % 0xF;
768 res = llcc68_set_dio_input_enable(&gs_handle, enable);
769 if (res != 0)
770 {
771 llcc68_interface_debug_print("llcc68: set dio input enable failed.\n");
772 (void)llcc68_deinit(&gs_handle);
773
774 return 1;
775 }
776 llcc68_interface_debug_print("llcc68: set dio input enable 0x%02X.\n", enable);
777 res = llcc68_get_dio_input_enable(&gs_handle, (uint8_t *)&enable_check);
778 if (res != 0)
779 {
780 llcc68_interface_debug_print("llcc68: get dio input enable failed.\n");
781 (void)llcc68_deinit(&gs_handle);
782
783 return 1;
784 }
785 llcc68_interface_debug_print("llcc68: check dio input enable %s.\n", enable == enable_check ? "ok" : "error");
786
787 /* llcc68_set_pull_up_control/llcc68_get_pull_up_control test */
788 llcc68_interface_debug_print("llcc68: llcc68_set_pull_up_control/llcc68_get_pull_up_control test.\n");
789
790 control = rand() % 0x0F;
791 res = llcc68_set_pull_up_control(&gs_handle, control);
792 if (res != 0)
793 {
794 llcc68_interface_debug_print("llcc68: set pull up control failed.\n");
795 (void)llcc68_deinit(&gs_handle);
796
797 return 1;
798 }
799 llcc68_interface_debug_print("llcc68: set pull up control 0x%02X.\n", control);
800 res = llcc68_get_pull_up_control(&gs_handle, (uint8_t *)&control_check);
801 if (res != 0)
802 {
803 llcc68_interface_debug_print("llcc68: get pull up control failed.\n");
804 (void)llcc68_deinit(&gs_handle);
805
806 return 1;
807 }
808 llcc68_interface_debug_print("llcc68: check pull up control %s.\n", control == control_check ? "ok" : "error");
809
810 /* llcc68_set_pull_down_control/llcc68_get_pull_down_control test */
811 llcc68_interface_debug_print("llcc68: llcc68_set_pull_down_control/llcc68_get_pull_down_control test.\n");
812
813 res = llcc68_set_pull_up_control(&gs_handle, 0x00);
814 if (res != 0)
815 {
816 llcc68_interface_debug_print("llcc68: set pull up control failed.\n");
817 (void)llcc68_deinit(&gs_handle);
818
819 return 1;
820 }
821 control = rand() % 0x0F;
822 res = llcc68_set_pull_down_control(&gs_handle, control);
823 if (res != 0)
824 {
825 llcc68_interface_debug_print("llcc68: set pull down control failed.\n");
826 (void)llcc68_deinit(&gs_handle);
827
828 return 1;
829 }
830 llcc68_interface_debug_print("llcc68: set pull down control 0x%02X.\n", control);
831 res = llcc68_get_pull_down_control(&gs_handle, (uint8_t *)&control_check);
832 if (res != 0)
833 {
834 llcc68_interface_debug_print("llcc68: get pull down control failed.\n");
835 (void)llcc68_deinit(&gs_handle);
836
837 return 1;
838 }
839 llcc68_interface_debug_print("llcc68: check pull down control %s.\n", control == control_check ? "ok" : "error");
840
841 /* finish register test */
842 llcc68_interface_debug_print("llcc68: finish register test.\n");
843 (void)llcc68_deinit(&gs_handle);
844
845 return 0;
846 }
driver_llcc68_register_test.h
driver llcc68 register test header file
llcc68_info
uint8_t llcc68_info(llcc68_info_t *info)
get chip's information
Definition: driver_llcc68.c:5617
llcc68_gfsk_bit_rate_convert_to_register
uint8_t llcc68_gfsk_bit_rate_convert_to_register(llcc68_handle_t *handle, uint32_t br, uint32_t *reg)
convert the bit rate to the register raw data
Definition: driver_llcc68.c:2776
llcc68_get_packet_type
uint8_t llcc68_get_packet_type(llcc68_handle_t *handle, llcc68_packet_type_t *type)
get the packet type
Definition: driver_llcc68.c:2626
llcc68_deinit
uint8_t llcc68_deinit(llcc68_handle_t *handle)
close the chip
Definition: driver_llcc68.c:754
llcc68_write_register
uint8_t llcc68_write_register(llcc68_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
write the register
Definition: driver_llcc68.c:1302
llcc68_gfsk_bit_rate_convert_to_data
uint8_t llcc68_gfsk_bit_rate_convert_to_data(llcc68_handle_t *handle, uint32_t reg, uint32_t *br)
convert the register raw data to the bit rate
Definition: driver_llcc68.c:2803
llcc68_timeout_convert_to_register
uint8_t llcc68_timeout_convert_to_register(llcc68_handle_t *handle, double us, uint32_t *reg)
convert the timeout to the register raw data
Definition: driver_llcc68.c:1712
llcc68_read_register
uint8_t llcc68_read_register(llcc68_handle_t *handle, uint16_t reg, uint8_t *buf, uint16_t len)
read the register
Definition: driver_llcc68.c:1347
llcc68_packet_type_t
llcc68_packet_type_t
llcc68 packet type enumeration definition
Definition: driver_llcc68.h:155
llcc68_set_standby
uint8_t llcc68_set_standby(llcc68_handle_t *handle, llcc68_clock_source_t src)
enter to the standby mode
Definition: driver_llcc68.c:1527
llcc68_gfsk_frequency_deviation_convert_to_register
uint8_t llcc68_gfsk_frequency_deviation_convert_to_register(llcc68_handle_t *handle, uint32_t freq, uint32_t *reg)
convert the frequency deviation to the register raw data
Definition: driver_llcc68.c:2830
llcc68_timeout_convert_to_data
uint8_t llcc68_timeout_convert_to_data(llcc68_handle_t *handle, uint32_t reg, double *us)
convert the register raw data to the timeout
Definition: driver_llcc68.c:1739
llcc68_frequency_convert_to_register
uint8_t llcc68_frequency_convert_to_register(llcc68_handle_t *handle, uint32_t freq, uint32_t *reg)
convert the frequency to the register raw data
Definition: driver_llcc68.c:2476
llcc68_write_buffer
uint8_t llcc68_write_buffer(llcc68_handle_t *handle, uint8_t offset, uint8_t *buf, uint16_t len)
write the buffer
Definition: driver_llcc68.c:1392
llcc68_frequency_convert_to_data
uint8_t llcc68_frequency_convert_to_data(llcc68_handle_t *handle, uint32_t reg, uint32_t *freq)
convert the register raw data to the frequency
Definition: driver_llcc68.c:2503
llcc68_read_buffer
uint8_t llcc68_read_buffer(llcc68_handle_t *handle, uint8_t offset, uint8_t *buf, uint16_t len)
read the buffer
Definition: driver_llcc68.c:1437
llcc68_set_packet_type
uint8_t llcc68_set_packet_type(llcc68_handle_t *handle, llcc68_packet_type_t type)
set the packet type
Definition: driver_llcc68.c:2580
llcc68_init
uint8_t llcc68_init(llcc68_handle_t *handle)
initialize the chip
Definition: driver_llcc68.c:583
llcc68_gfsk_frequency_deviation_convert_to_data
uint8_t llcc68_gfsk_frequency_deviation_convert_to_data(llcc68_handle_t *handle, uint32_t reg, uint32_t *freq)
convert the register raw data to the frequency deviation
Definition: driver_llcc68.c:2857
LLCC68_CLOCK_SOURCE_XTAL_32MHZ
@ LLCC68_CLOCK_SOURCE_XTAL_32MHZ
Definition: driver_llcc68.h:83
LLCC68_PACKET_TYPE_LORA
@ LLCC68_PACKET_TYPE_LORA
Definition: driver_llcc68.h:157
LLCC68_PACKET_TYPE_GFSK
@ LLCC68_PACKET_TYPE_GFSK
Definition: driver_llcc68.h:156
llcc68_interface_reset_gpio_init
uint8_t llcc68_interface_reset_gpio_init(void)
interface reset gpio init
Definition: driver_llcc68_interface_template.c:87
llcc68_interface_busy_gpio_read
uint8_t llcc68_interface_busy_gpio_read(uint8_t *value)
interface busy gpio read
Definition: driver_llcc68_interface_template.c:149
llcc68_interface_busy_gpio_deinit
uint8_t llcc68_interface_busy_gpio_deinit(void)
interface busy gpio deinit
Definition: driver_llcc68_interface_template.c:136
llcc68_interface_spi_deinit
uint8_t llcc68_interface_spi_deinit(void)
interface spi bus deinit
Definition: driver_llcc68_interface_template.c:58
llcc68_interface_spi_write_read
uint8_t llcc68_interface_spi_write_read(uint8_t *in_buf, uint32_t in_len, uint8_t *out_buf, uint32_t out_len)
interface spi bus write read
Definition: driver_llcc68_interface_template.c:74
llcc68_interface_reset_gpio_deinit
uint8_t llcc68_interface_reset_gpio_deinit(void)
interface reset gpio deinit
Definition: driver_llcc68_interface_template.c:99
llcc68_interface_receive_callback
void llcc68_interface_receive_callback(uint16_t type, uint8_t *buf, uint16_t len)
interface receive callback
Definition: driver_llcc68_interface_template.c:181
llcc68_interface_debug_print
void llcc68_interface_debug_print(const char *const fmt,...)
interface print format data
Definition: driver_llcc68_interface_template.c:169
llcc68_interface_delay_ms
void llcc68_interface_delay_ms(uint32_t ms)
interface delay ms
Definition: driver_llcc68_interface_template.c:159
llcc68_interface_spi_init
uint8_t llcc68_interface_spi_init(void)
interface spi bus init
Definition: driver_llcc68_interface_template.c:46
llcc68_interface_busy_gpio_init
uint8_t llcc68_interface_busy_gpio_init(void)
interface busy gpio init
Definition: driver_llcc68_interface_template.c:124
llcc68_interface_reset_gpio_write
uint8_t llcc68_interface_reset_gpio_write(uint8_t data)
interface reset gpio write
Definition: driver_llcc68_interface_template.c:112
DRIVER_LLCC68_LINK_BUSY_GPIO_READ
#define DRIVER_LLCC68_LINK_BUSY_GPIO_READ(HANDLE, FUC)
link busy_gpio_read function
Definition: driver_llcc68.h:501
DRIVER_LLCC68_LINK_SPI_INIT
#define DRIVER_LLCC68_LINK_SPI_INIT(HANDLE, FUC)
link spi_init function
Definition: driver_llcc68.h:437
DRIVER_LLCC68_LINK_DELAY_MS
#define DRIVER_LLCC68_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
Definition: driver_llcc68.h:509
DRIVER_LLCC68_LINK_RESET_GPIO_WRITE
#define DRIVER_LLCC68_LINK_RESET_GPIO_WRITE(HANDLE, FUC)
link reset_gpio_write function
Definition: driver_llcc68.h:477
DRIVER_LLCC68_LINK_BUSY_GPIO_DEINIT
#define DRIVER_LLCC68_LINK_BUSY_GPIO_DEINIT(HANDLE, FUC)
link busy_gpio_deinit function
Definition: driver_llcc68.h:493
DRIVER_LLCC68_LINK_SPI_WRITE_READ
#define DRIVER_LLCC68_LINK_SPI_WRITE_READ(HANDLE, FUC)
link spi_write_read function
Definition: driver_llcc68.h:453
DRIVER_LLCC68_LINK_INIT
#define DRIVER_LLCC68_LINK_INIT(HANDLE, STRUCTURE)
initialize llcc68_handle_t structure
Definition: driver_llcc68.h:429
DRIVER_LLCC68_LINK_RECEIVE_CALLBACK
#define DRIVER_LLCC68_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
link receive_callback function
Definition: driver_llcc68.h:525
DRIVER_LLCC68_LINK_DEBUG_PRINT
#define DRIVER_LLCC68_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
Definition: driver_llcc68.h:517
DRIVER_LLCC68_LINK_SPI_DEINIT
#define DRIVER_LLCC68_LINK_SPI_DEINIT(HANDLE, FUC)
link spi_deinit function
Definition: driver_llcc68.h:445
DRIVER_LLCC68_LINK_RESET_GPIO_INIT
#define DRIVER_LLCC68_LINK_RESET_GPIO_INIT(HANDLE, FUC)
link reset_gpio_init function
Definition: driver_llcc68.h:461
DRIVER_LLCC68_LINK_RESET_GPIO_DEINIT
#define DRIVER_LLCC68_LINK_RESET_GPIO_DEINIT(HANDLE, FUC)
link reset_gpio_deinit function
Definition: driver_llcc68.h:469
DRIVER_LLCC68_LINK_BUSY_GPIO_INIT
#define DRIVER_LLCC68_LINK_BUSY_GPIO_INIT(HANDLE, FUC)
link busy_gpio_init function
Definition: driver_llcc68.h:485
llcc68_set_dio_output_enable
uint8_t llcc68_set_dio_output_enable(llcc68_handle_t *handle, uint8_t enable)
set the dio output enable
Definition: driver_llcc68.c:5232
llcc68_get_dio_output_enable
uint8_t llcc68_get_dio_output_enable(llcc68_handle_t *handle, uint8_t *enable)
get the dio output enable
Definition: driver_llcc68.c:5276
llcc68_set_fsk_sync_word
uint8_t llcc68_set_fsk_sync_word(llcc68_handle_t *handle, uint8_t sync_word[8])
set the sync word in FSK mode
Definition: driver_llcc68.c:3948
llcc68_get_fsk_broadcast_address
uint8_t llcc68_get_fsk_broadcast_address(llcc68_handle_t *handle, uint8_t *addr)
get the broadcast address in FSK mode
Definition: driver_llcc68.c:4168
llcc68_set_xta_trim
uint8_t llcc68_set_xta_trim(llcc68_handle_t *handle, uint8_t trim)
set the xta trim
Definition: driver_llcc68.c:4880
llcc68_get_fsk_sync_word
uint8_t llcc68_get_fsk_sync_word(llcc68_handle_t *handle, uint8_t sync_word[8])
get the sync word in FSK mode
Definition: driver_llcc68.c:3992
llcc68_set_iq_polarity
uint8_t llcc68_set_iq_polarity(llcc68_handle_t *handle, uint8_t setup)
set the iq polarity
Definition: driver_llcc68.c:4212
llcc68_set_lora_sync_word
uint8_t llcc68_set_lora_sync_word(llcc68_handle_t *handle, uint16_t sync_word)
set the lora sync word
Definition: driver_llcc68.c:4300
llcc68_get_pull_down_control
uint8_t llcc68_get_pull_down_control(llcc68_handle_t *handle, uint8_t *control)
get the pull down control
Definition: driver_llcc68.c:5540
llcc68_set_ocp
uint8_t llcc68_set_ocp(llcc68_handle_t *handle, uint8_t ocp)
set the ocp
Definition: driver_llcc68.c:4704
llcc68_set_tx_clamp_config
uint8_t llcc68_set_tx_clamp_config(llcc68_handle_t *handle, uint8_t config)
set the tx clamp config
Definition: driver_llcc68.c:4616
llcc68_get_iq_polarity
uint8_t llcc68_get_iq_polarity(llcc68_handle_t *handle, uint8_t *setup)
get the iq polarity
Definition: driver_llcc68.c:4256
llcc68_get_fsk_crc_initical_value
uint8_t llcc68_get_fsk_crc_initical_value(llcc68_handle_t *handle, uint16_t *value)
get the crc initical value in FSK mode
Definition: driver_llcc68.c:3809
llcc68_get_event_mask
uint8_t llcc68_get_event_mask(llcc68_handle_t *handle, uint8_t *mask)
get the event mask
Definition: driver_llcc68.c:5188
llcc68_get_fsk_node_address
uint8_t llcc68_get_fsk_node_address(llcc68_handle_t *handle, uint8_t *addr)
get the node address in FSK mode
Definition: driver_llcc68.c:4080
llcc68_get_rtc_control
uint8_t llcc68_get_rtc_control(llcc68_handle_t *handle, uint8_t *control)
get the rtc control
Definition: driver_llcc68.c:4836
llcc68_set_rx_gain
uint8_t llcc68_set_rx_gain(llcc68_handle_t *handle, uint8_t gain)
set the rx gain
Definition: driver_llcc68.c:4528
llcc68_get_xtb_trim
uint8_t llcc68_get_xtb_trim(llcc68_handle_t *handle, uint8_t *trim)
get the xtb trim
Definition: driver_llcc68.c:5012
llcc68_set_rtc_control
uint8_t llcc68_set_rtc_control(llcc68_handle_t *handle, uint8_t control)
set the rtc control
Definition: driver_llcc68.c:4792
llcc68_get_dio3_output_control
uint8_t llcc68_get_dio3_output_control(llcc68_handle_t *handle, uint8_t *control)
get the dio3 output
Definition: driver_llcc68.c:5100
llcc68_get_dio_input_enable
uint8_t llcc68_get_dio_input_enable(llcc68_handle_t *handle, uint8_t *enable)
get the dio input enable
Definition: driver_llcc68.c:5364
llcc68_get_xta_trim
uint8_t llcc68_get_xta_trim(llcc68_handle_t *handle, uint8_t *trim)
get the xta trim
Definition: driver_llcc68.c:4924
llcc68_set_pull_up_control
uint8_t llcc68_set_pull_up_control(llcc68_handle_t *handle, uint8_t control)
set the pull up control
Definition: driver_llcc68.c:5408
llcc68_set_fsk_whitening_initial_value
uint8_t llcc68_set_fsk_whitening_initial_value(llcc68_handle_t *handle, uint16_t value)
set the whitening initial value in FSK mode
Definition: driver_llcc68.c:3669
llcc68_set_event_mask
uint8_t llcc68_set_event_mask(llcc68_handle_t *handle, uint8_t mask)
set the event mask
Definition: driver_llcc68.c:5144
llcc68_set_dio3_output_control
uint8_t llcc68_set_dio3_output_control(llcc68_handle_t *handle, uint8_t control)
set the dio3 output
Definition: driver_llcc68.c:5056
llcc68_get_lora_sync_word
uint8_t llcc68_get_lora_sync_word(llcc68_handle_t *handle, uint16_t *sync_word)
get the lora sync word
Definition: driver_llcc68.c:4347
llcc68_get_random_number
uint8_t llcc68_get_random_number(llcc68_handle_t *handle, uint32_t *r)
get the random number
Definition: driver_llcc68.c:4393
llcc68_get_pull_up_control
uint8_t llcc68_get_pull_up_control(llcc68_handle_t *handle, uint8_t *control)
get the pull up control
Definition: driver_llcc68.c:5452
llcc68_set_fsk_broadcast_address
uint8_t llcc68_set_fsk_broadcast_address(llcc68_handle_t *handle, uint8_t addr)
set the broadcast address in FSK mode
Definition: driver_llcc68.c:4124
llcc68_get_rx_gain
uint8_t llcc68_get_rx_gain(llcc68_handle_t *handle, uint8_t *gain)
get the rx gain
Definition: driver_llcc68.c:4572
llcc68_set_fsk_crc_polynomial_value
uint8_t llcc68_set_fsk_crc_polynomial_value(llcc68_handle_t *handle, uint16_t value)
set the crc polynomial value in FSK mode
Definition: driver_llcc68.c:3855
llcc68_set_tx_modulation
uint8_t llcc68_set_tx_modulation(llcc68_handle_t *handle, uint8_t modulation)
set the tx modulation
Definition: driver_llcc68.c:4440
llcc68_set_fsk_node_address
uint8_t llcc68_set_fsk_node_address(llcc68_handle_t *handle, uint8_t addr)
set the node address in FSK mode
Definition: driver_llcc68.c:4036
llcc68_set_pull_down_control
uint8_t llcc68_set_pull_down_control(llcc68_handle_t *handle, uint8_t control)
set the pull down control
Definition: driver_llcc68.c:5496
llcc68_set_dio_input_enable
uint8_t llcc68_set_dio_input_enable(llcc68_handle_t *handle, uint8_t enable)
set the dio input enable
Definition: driver_llcc68.c:5320
llcc68_get_tx_modulation
uint8_t llcc68_get_tx_modulation(llcc68_handle_t *handle, uint8_t *modulation)
get the tx modulation
Definition: driver_llcc68.c:4484
llcc68_set_xtb_trim
uint8_t llcc68_set_xtb_trim(llcc68_handle_t *handle, uint8_t trim)
set the xtb trim
Definition: driver_llcc68.c:4968
llcc68_get_tx_clamp_config
uint8_t llcc68_get_tx_clamp_config(llcc68_handle_t *handle, uint8_t *config)
get the tx clamp config
Definition: driver_llcc68.c:4660
llcc68_get_ocp
uint8_t llcc68_get_ocp(llcc68_handle_t *handle, uint8_t *ocp)
get the ocp
Definition: driver_llcc68.c:4748
llcc68_get_fsk_whitening_initial_value
uint8_t llcc68_get_fsk_whitening_initial_value(llcc68_handle_t *handle, uint16_t *value)
get the whitening initial value in FSK mode
Definition: driver_llcc68.c:3716
llcc68_get_fsk_crc_polynomial_value
uint8_t llcc68_get_fsk_crc_polynomial_value(llcc68_handle_t *handle, uint16_t *value)
get the crc polynomial value in FSK mode
Definition: driver_llcc68.c:3902
llcc68_set_fsk_crc_initical_value
uint8_t llcc68_set_fsk_crc_initical_value(llcc68_handle_t *handle, uint16_t value)
set the crc initial value in FSK mode
Definition: driver_llcc68.c:3762
llcc68_register_test
uint8_t llcc68_register_test(void)
register test
Definition: driver_llcc68_register_test.c:49
llcc68_handle_s
llcc68 handle structure definition
Definition: driver_llcc68.h:371
llcc68_info_s
llcc68 information structure definition
Definition: driver_llcc68.h:400
llcc68_info_s::temperature_max
float temperature_max
Definition: driver_llcc68.h:408
llcc68_info_s::supply_voltage_max_v
float supply_voltage_max_v
Definition: driver_llcc68.h:405
llcc68_info_s::driver_version
uint32_t driver_version
Definition: driver_llcc68.h:409
llcc68_info_s::temperature_min
float temperature_min
Definition: driver_llcc68.h:407
llcc68_info_s::max_current_ma
float max_current_ma
Definition: driver_llcc68.h:406
llcc68_info_s::manufacturer_name
char manufacturer_name[32]
Definition: driver_llcc68.h:402
llcc68_info_s::supply_voltage_min_v
float supply_voltage_min_v
Definition: driver_llcc68.h:404
llcc68_info_s::interface
char interface[8]
Definition: driver_llcc68.h:403
llcc68_info_s::chip_name
char chip_name[32]
Definition: driver_llcc68.h:401