changeset 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 f67f46e56355
children a3f48378658d
files autocal/l1tmops.c autocal/stdband.h
diffstat 2 files changed, 3 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/autocal/l1tmops.c	Mon May 22 20:20:49 2017 +0000
+++ b/autocal/l1tmops.c	Mon May 22 20:35:42 2017 +0000
@@ -110,32 +110,6 @@
 	return(0);
 }
 
-set_std_band(std, band)
-{
-	u_char cmdpkt[7];
-
-	cmdpkt[1] = RF_PARAM_WRITE;
-	cmdpkt[2] = STD_BAND_FLAG;
-	cmdpkt[3] = 0;
-	cmdpkt[4] = std;
-	cmdpkt[5] = band;
-	l1tm_pkt_exch(cmdpkt, 5);
-	if (rvi_msg[3]) {
-		fprintf(stderr, "DUT error %u in response to rfpw\n",
-			rvi_msg[3]);
-		exit(ERROR_TARGET);
-	}
-	if (rvi_msg_len != 6) {
-		fprintf(stderr, "DUT error: rfpw response wrong length\n");
-		exit(ERROR_TARGET);
-	}
-	if (rvi_msg[4] != STD_BAND_FLAG) {
-		fprintf(stderr, "DUT error: rfpw response wrong index\n");
-		exit(ERROR_TARGET);
-	}
-	return(0);
-}
-
 do_rxpw(index, value)
 {
 	u_char cmdpkt[7];
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/autocal/stdband.h	Mon May 22 20:35:42 2017 +0000
@@ -0,0 +1,3 @@
+/* macro for encoding std and band in rfpw 7 command */
+
+#define	RFPW_STD_BAND(std,band)	((std) | ((band) << 8))