FreeCalypso > hg > fc-rfcal-tools
view 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 |
line wrap: on
line source
/* * This module contains the main() function for fc-rfcal-vcxo. */ #include <stdio.h> #include <stdlib.h> #include <rvinterf/l1tm.h> #include <rvinterf/exitcodes.h> #include "stdband.h" #define VCXOCAL_BAND 900 #define VCXOCAL_BAND_RFPW RFPW_STD_BAND(6, 0) #define VCXOCAL_ARFCN 40 prepare_rf_test_system() { char cmd[80]; printf("Preparing RF test system for VCXO calibration\n"); sprintf(cmd, "vcxo-cal-setup %d %d\n", VCXOCAL_BAND, VCXOCAL_ARFCN); tsid_command(cmd); return(0); } main(argc, argv) char **argv; { socket_pathname_options(argc, argv); connect_rvinterf_socket(); connect_tsid_socket(); prepare_rf_test_system(); printf("Putting the DUT into Test Mode\n"); do_tms(1); do_rfpw(STD_BAND_FLAG, VCXOCAL_BAND_RFPW); do_rfpw(TCH_ARFCN, VCXOCAL_ARFCN); do_rfpw(AFC_ENA_FLAG, 0); do_txpw(TX_PWR_LEVEL, 12); printf("Starting RF Tx on the DUT\n"); do_rfe(RX_TX_TCH); }