comparison autocal/rxcommon.c @ 45:98abe6bd2042

autocal: scw implemented for Rx cal
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 27 May 2017 05:48:04 +0000
parents 5018fd8eecce
children 751f8d9efed0
comparison
equal deleted inserted replaced
44:5018fd8eecce 45:98abe6bd2042
3 * fc-rfcal-gmagic and fc-rfcal-rxband. 3 * fc-rfcal-gmagic and fc-rfcal-rxband.
4 */ 4 */
5 5
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h>
9 #include <strings.h>
10 #include <rvinterf/l1tm.h> 8 #include <rvinterf/l1tm.h>
11 #include <rvinterf/exitcodes.h> 9 #include <rvinterf/exitcodes.h>
12 #include "rxcaldefs.h" 10 #include "rxcaldefs.h"
13 11
14 l1tm_setup_for_rxcal() 12 l1tm_setup_for_rxcal()
15 { 13 {
16 do_rxpw(RX_AGC_ENA_FLAG, 0); 14 do_rxpw(RX_AGC_ENA_FLAG, 0);
17 do_rxpw(RX_AGC_GAIN, RXCAL_AGC_DB); 15 do_rxpw(RX_AGC_GAIN, RXCAL_AGC_DB);
18 do_rfpw(AFC_ENA_FLAG, 0); 16 do_rfpw(AFC_ENA_FLAG, 0);
19 /* scw settings to be added */ 17 do_scw(LOOPS, RXCAL_LOOP_COUNT);
18 do_scw(AUTO_RESULT_LOOPS, RXCAL_LOOP_COUNT);
19 do_scw(AUTO_RESET_LOOPS, RXCAL_LOOP_COUNT);
20 do_scw(STAT_TYPE, ACCUMULATED_RX_STATS);
21 do_scw(STAT_BITMASK, DSP_PM);
20 return(0); 22 return(0);
21 } 23 }