FreeCalypso > hg > fc-rfcal-tools
annotate 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 |
rev | line source |
---|---|
21
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This module contains the main() function for fc-rfcal-vcxo. |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 */ |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #include <stdio.h> |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <stdlib.h> |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <rvinterf/l1tm.h> |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include <rvinterf/exitcodes.h> |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include "stdband.h" |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 #define VCXOCAL_BAND 900 |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 #define VCXOCAL_BAND_RFPW RFPW_STD_BAND(6, 0) |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 #define VCXOCAL_ARFCN 40 |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 |
23
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
15 prepare_rf_test_system() |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
16 { |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
17 char cmd[80]; |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
18 |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
19 printf("Preparing RF test system for VCXO calibration\n"); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
20 sprintf(cmd, "vcxo-cal-setup %d %d\n", VCXOCAL_BAND, VCXOCAL_ARFCN); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
21 tsid_command(cmd); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
22 return(0); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
23 } |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
24 |
21
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 main(argc, argv) |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 char **argv; |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 { |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 socket_pathname_options(argc, argv); |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 connect_rvinterf_socket(); |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 connect_tsid_socket(); |
23
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
31 prepare_rf_test_system(); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
32 |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
33 printf("Putting the DUT into Test Mode\n"); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
34 do_tms(1); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
35 do_rfpw(STD_BAND_FLAG, VCXOCAL_BAND_RFPW); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
36 do_rfpw(TCH_ARFCN, VCXOCAL_ARFCN); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
37 do_rfpw(AFC_ENA_FLAG, 0); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
38 do_txpw(TX_PWR_LEVEL, 12); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
39 printf("Starting RF Tx on the DUT\n"); |
9a9fd9ebe799
autocal/vcxomain.c: coming along
Mychaela Falconia <falcon@freecalypso.org>
parents:
21
diff
changeset
|
40 do_rfe(RX_TX_TCH); |
21
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 |
a3f48378658d
autocal: beginning of fc-rfcal-vcxo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 } |