FreeCalypso > hg > fc-rfcal-tools
comparison autocal/l1tmops.c @ 20:7ac866c3baf6
autocal: set_std_band() function replaced with RFPW_STD_BAND() macro
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 22 May 2017 20:35:42 +0000 |
parents | af77b95feeba |
children | d6ef94518117 |
comparison
equal
deleted
inserted
replaced
19:f67f46e56355 | 20:7ac866c3baf6 |
---|---|
108 exit(ERROR_TARGET); | 108 exit(ERROR_TARGET); |
109 } | 109 } |
110 return(0); | 110 return(0); |
111 } | 111 } |
112 | 112 |
113 set_std_band(std, band) | |
114 { | |
115 u_char cmdpkt[7]; | |
116 | |
117 cmdpkt[1] = RF_PARAM_WRITE; | |
118 cmdpkt[2] = STD_BAND_FLAG; | |
119 cmdpkt[3] = 0; | |
120 cmdpkt[4] = std; | |
121 cmdpkt[5] = band; | |
122 l1tm_pkt_exch(cmdpkt, 5); | |
123 if (rvi_msg[3]) { | |
124 fprintf(stderr, "DUT error %u in response to rfpw\n", | |
125 rvi_msg[3]); | |
126 exit(ERROR_TARGET); | |
127 } | |
128 if (rvi_msg_len != 6) { | |
129 fprintf(stderr, "DUT error: rfpw response wrong length\n"); | |
130 exit(ERROR_TARGET); | |
131 } | |
132 if (rvi_msg[4] != STD_BAND_FLAG) { | |
133 fprintf(stderr, "DUT error: rfpw response wrong index\n"); | |
134 exit(ERROR_TARGET); | |
135 } | |
136 return(0); | |
137 } | |
138 | |
139 do_rxpw(index, value) | 113 do_rxpw(index, value) |
140 { | 114 { |
141 u_char cmdpkt[7]; | 115 u_char cmdpkt[7]; |
142 | 116 |
143 cmdpkt[1] = RX_PARAM_WRITE; | 117 cmdpkt[1] = RX_PARAM_WRITE; |