FreeCalypso > hg > freecalypso-tools
comparison rvinterf/tmsh/l1cmd.c @ 126:777172bcea3c
fc-tmsh: txpw and txpr implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 19 Feb 2017 09:52:58 +0000 |
parents | ca4fa5681f08 |
children | d76970e1895e |
comparison
equal
deleted
inserted
replaced
125:ca4fa5681f08 | 126:777172bcea3c |
---|---|
391 cmdpkt[2] = index; | 391 cmdpkt[2] = index; |
392 cmdpkt[3] = index >> 8; | 392 cmdpkt[3] = index >> 8; |
393 send_etm_cmd(cmdpkt, 3); | 393 send_etm_cmd(cmdpkt, 3); |
394 return(0); | 394 return(0); |
395 } | 395 } |
396 | |
397 static struct kwtab tx_param_arg[] = { | |
398 {"pwr-level", TX_PWR_LEVEL}, | |
399 {"apc-dac", TX_APC_DAC}, | |
400 {"ramp-template", TX_RAMP_TEMPLATE}, | |
401 {"chan-cal-table", TX_CHAN_CAL_TABLE}, | |
402 {"burst-type", TX_BURST_TYPE}, | |
403 {"burst-data", TX_BURST_DATA}, | |
404 {"timing-advance", TX_TIMING_ADVANCE}, | |
405 {"training-seq", TX_TRAINING_SEQ}, | |
406 {"pwr-skip", TX_PWR_SKIP}, | |
407 {"flags-cal", TX_FLAGS_CAL}, | |
408 {"flags-platform", TX_FLAGS_PLATFORM}, | |
409 {"flags-iq-swap", TX_FLAGS_IQ_SWAP}, | |
410 {"flags-all", TX_FLAGS_ALL}, | |
411 {"gprs-power0", TX_GPRS_POWER0}, | |
412 {"gprs-power1", TX_GPRS_POWER1}, | |
413 {"gprs-power2", TX_GPRS_POWER2}, | |
414 {"gprs-power3", TX_GPRS_POWER3}, | |
415 {"gprs-power4", TX_GPRS_POWER4}, | |
416 {"gprs-power5", TX_GPRS_POWER5}, | |
417 {"gprs-power6", TX_GPRS_POWER6}, | |
418 {"gprs-power7", TX_GPRS_POWER7}, | |
419 {"gprs-slots", TX_GPRS_SLOTS}, | |
420 {"gprs-coding", TX_GPRS_CODING}, | |
421 {0, 0} | |
422 }; | |
423 | |
424 cmd_txpw(argc, argv) | |
425 char **argv; | |
426 { | |
427 u16 index, value; | |
428 u_char cmdpkt[7]; | |
429 | |
430 if (keyword_or_num(argv[1], tx_param_arg, &index)) | |
431 return(ERROR_USAGE); | |
432 value = strtol(argv[2], 0, 0); | |
433 cmdpkt[1] = TX_PARAM_WRITE; | |
434 cmdpkt[2] = index; | |
435 cmdpkt[3] = index >> 8; | |
436 cmdpkt[4] = value; | |
437 cmdpkt[5] = value >> 8; | |
438 send_etm_cmd(cmdpkt, 5); | |
439 return(0); | |
440 } | |
441 | |
442 cmd_txpr(argc, argv) | |
443 char **argv; | |
444 { | |
445 u16 index; | |
446 u_char cmdpkt[5]; | |
447 | |
448 if (keyword_or_num(argv[1], tx_param_arg, &index)) | |
449 return(ERROR_USAGE); | |
450 cmdpkt[1] = TX_PARAM_READ; | |
451 cmdpkt[2] = index; | |
452 cmdpkt[3] = index >> 8; | |
453 send_etm_cmd(cmdpkt, 3); | |
454 return(0); | |
455 } |