FreeCalypso > hg > freecalypso-tools
comparison librftab/rftablerd.c @ 721:059649902c7f
librftab: added support for adc-cal tables
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 25 Aug 2020 07:15:02 +0000 |
parents | a0f79bba0ad8 |
children |
comparison
equal
deleted
inserted
replaced
720:b73c21a2148f | 721:059649902c7f |
---|---|
97 } | 97 } |
98 return(0); | 98 return(0); |
99 } | 99 } |
100 | 100 |
101 static | 101 static |
102 read_adccal_table() | |
103 { | |
104 u_char tmpbuf[36], *finalbuf; | |
105 int i, rc; | |
106 | |
107 finalbuf = writeptr; | |
108 writeptr = tmpbuf; | |
109 for (i = 0; i < 18; i++) { | |
110 rc = process_number(2); | |
111 if (rc) | |
112 return(rc); | |
113 } | |
114 writeptr = finalbuf; | |
115 for (i = 0; i < 9; i++) { | |
116 *writeptr++ = tmpbuf[i*4]; | |
117 *writeptr++ = tmpbuf[i*4 + 1]; | |
118 } | |
119 for (i = 0; i < 9; i++) { | |
120 *writeptr++ = tmpbuf[i*4 + 2]; | |
121 *writeptr++ = tmpbuf[i*4 + 3]; | |
122 } | |
123 return ensure_eof(); | |
124 } | |
125 | |
126 static | |
102 read_agc_table() | 127 read_agc_table() |
103 { | 128 { |
104 int i, rc; | 129 int i, rc; |
105 | 130 |
106 for (i = 0; i < 20; i++) { | 131 for (i = 0; i < 20; i++) { |
300 | 325 |
301 static struct table_format { | 326 static struct table_format { |
302 char *kw; | 327 char *kw; |
303 int (*handler)(); | 328 int (*handler)(); |
304 } table_formats[] = { | 329 } table_formats[] = { |
330 {"adc-cal", read_adccal_table}, | |
305 {"agc-table", read_agc_table}, | 331 {"agc-table", read_agc_table}, |
306 {"afcparams", read_afcparams}, | 332 {"afcparams", read_afcparams}, |
307 {"agc-global-params", read_agc_global_params}, | 333 {"agc-global-params", read_agc_global_params}, |
308 {"il2agc", read_il2agc}, | 334 {"il2agc", read_il2agc}, |
309 {"tx-ramps", read_tx_ramps}, | 335 {"tx-ramps", read_tx_ramps}, |