FreeCalypso > hg > fc-rfcal-tools
annotate autocal/rxupload.c @ 60:81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 27 May 2017 23:35:06 +0000 |
parents | |
children | 0bf853d1b68e |
rev | line source |
---|---|
60
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This module contains the RF table upload code for fc-rfcal-rxband. |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 */ |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #include <stdio.h> |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <stdlib.h> |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <stdint.h> |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include <endian.h> |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include <rvinterf/l1tm.h> |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include <rvinterf/exitcodes.h> |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 #include "rxband.h" |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 #include "rxtables.h" |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 extern struct rxcal_band *rxcal_band; |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 upload_gmagic(Gmagic) |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 unsigned Gmagic; |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 { |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 struct rx_agc_params agcparams; |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 do_rftr(RX_AGC_PARAMS, &agcparams, sizeof agcparams); |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 agcparams.g_magic = htole16(Gmagic); |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 do_rftw(RX_AGC_PARAMS, &agcparams, sizeof agcparams); |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 return(0); |
81e8f7e99d89
fc-rfcal-rxband: upload of GMagic to DUT implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 } |