Change Details
tools/atrf-txrx/atrf-txrx.c |
74 | 74 | static volatile int run = 1; |
75 | 75 | |
76 | 76 | |
| 77 | /* ----- Helper functions -------------------------------------------------- */ |
| 78 | |
| 79 | |
77 | 80 | /* |
78 | | * clkm: 0 disable CLKM |
79 | | * >0 output 2^(clkm-1) MHz signal |
| 81 | * mhz: 0 disable CLKM |
| 82 | * >0 output specified clock |
80 | 83 | */ |
81 | 84 | |
82 | 85 | static struct atrf_dsc *init_txrx(const char *driver, int trim, unsigned mhz) |
... | ... | |
138 | 141 | } |
139 | 142 | |
140 | 143 | |
| 144 | /* ----- Message transmit/receive ------------------------------------------ */ |
| 145 | |
| 146 | |
141 | 147 | static void receive_message(struct atrf_dsc *dsc) |
142 | 148 | { |
143 | 149 | uint8_t buf[MAX_PSDU+1]; /* PSDU+LQI */ |
... | ... | |
320 | 326 | } |
321 | 327 | |
322 | 328 | |
| 329 | /* ----- PER test ---------------------------------------------------------- */ |
| 330 | |
| 331 | |
323 | 332 | static void transmit_pattern(struct atrf_dsc *dsc, double pause_s, int times) |
324 | 333 | { |
325 | 334 | uint8_t buf[MAX_PSDU]; |
... | ... | |
355 | 364 | } |
356 | 365 | |
357 | 366 | |
| 367 | /* ----- Ping -------------------------------------------------------------- */ |
| 368 | |
| 369 | |
358 | 370 | static void ping_tx(struct atrf_dsc *dsc, const struct ping *pck) |
359 | 371 | { |
360 | 372 | atrf_reg_write(dsc, REG_TRX_STATE, TRX_CMD_PLL_ON); |
... | ... | |
440 | 452 | } |
441 | 453 | |
442 | 454 | |
| 455 | /* ----- Continuous wave test ---------------------------------------------- */ |
| 456 | |
| 457 | |
443 | 458 | static int test_mode(struct atrf_dsc *dsc, uint8_t cont_tx, const char *cmd) |
444 | 459 | { |
445 | 460 | int status = 0; |
... | ... | |
459 | 474 | } |
460 | 475 | |
461 | 476 | |
| 477 | /* ----- Command-line processing ------------------------------------------- */ |
| 478 | |
| 479 | |
462 | 480 | static void die(int sig) |
463 | 481 | { |
464 | 482 | run = 0; |
Download the corresponding diff file