FreeCalypso > hg > fc-rfcal-tools
comparison autocal/l1tmops.c @ 59:c87067884da7
autocal/l1tmops.c: do_rftr() added
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 27 May 2017 23:23:35 +0000 |
parents | e86779d5445c |
children | 81e8f7e99d89 |
comparison
equal
deleted
inserted
replaced
58:46c72323182a | 59:c87067884da7 |
---|---|
195 exit(ERROR_TARGET); | 195 exit(ERROR_TARGET); |
196 } | 196 } |
197 return(0); | 197 return(0); |
198 } | 198 } |
199 | 199 |
200 do_rftr(index, table, size) | |
201 u_char *table; | |
202 { | |
203 u_char cmdpkt[4]; | |
204 | |
205 cmdpkt[1] = RF_TABLE_READ; | |
206 cmdpkt[2] = index; | |
207 l1tm_pkt_exch(cmdpkt, 2); | |
208 if (rvi_msg[3]) { | |
209 fprintf(stderr, "DUT error %u in response to rftr\n", | |
210 rvi_msg[3]); | |
211 exit(ERROR_TARGET); | |
212 } | |
213 if (rvi_msg_len != size + 6) { | |
214 fprintf(stderr, "DUT error: rftr response wrong length\n"); | |
215 exit(ERROR_TARGET); | |
216 } | |
217 if (rvi_msg[4] != index) { | |
218 fprintf(stderr, "DUT error: rftr response wrong index\n"); | |
219 exit(ERROR_TARGET); | |
220 } | |
221 bcopy(rvi_msg + 5, table, size); | |
222 return(0); | |
223 } | |
224 | |
200 misc_enable(arg) | 225 misc_enable(arg) |
201 { | 226 { |
202 u_char cmdpkt[5]; | 227 u_char cmdpkt[5]; |
203 | 228 |
204 cmdpkt[1] = MISC_ENABLE; | 229 cmdpkt[1] = MISC_ENABLE; |