comparison autocal/vcxomain.c @ 23:9a9fd9ebe799

autocal/vcxomain.c: coming along
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 22 May 2017 21:19:33 +0000
parents a3f48378658d
children 0b6881281d86
comparison
equal deleted inserted replaced
22:e8bcead3aa9b 23:9a9fd9ebe799
10 10
11 #define VCXOCAL_BAND 900 11 #define VCXOCAL_BAND 900
12 #define VCXOCAL_BAND_RFPW RFPW_STD_BAND(6, 0) 12 #define VCXOCAL_BAND_RFPW RFPW_STD_BAND(6, 0)
13 #define VCXOCAL_ARFCN 40 13 #define VCXOCAL_ARFCN 40
14 14
15 prepare_rf_test_system()
16 {
17 char cmd[80];
18
19 printf("Preparing RF test system for VCXO calibration\n");
20 sprintf(cmd, "vcxo-cal-setup %d %d\n", VCXOCAL_BAND, VCXOCAL_ARFCN);
21 tsid_command(cmd);
22 return(0);
23 }
24
15 main(argc, argv) 25 main(argc, argv)
16 char **argv; 26 char **argv;
17 { 27 {
18 socket_pathname_options(argc, argv); 28 socket_pathname_options(argc, argv);
19 connect_rvinterf_socket(); 29 connect_rvinterf_socket();
20 connect_tsid_socket(); 30 connect_tsid_socket();
31 prepare_rf_test_system();
32
33 printf("Putting the DUT into Test Mode\n");
34 do_tms(1);
35 do_rfpw(STD_BAND_FLAG, VCXOCAL_BAND_RFPW);
36 do_rfpw(TCH_ARFCN, VCXOCAL_ARFCN);
37 do_rfpw(AFC_ENA_FLAG, 0);
38 do_txpw(TX_PWR_LEVEL, 12);
39 printf("Starting RF Tx on the DUT\n");
40 do_rfe(RX_TX_TCH);
21 41
22 42
23 } 43 }