diff options
author | Joe Zhao <ztuowen@gmail.com> | 2014-05-16 16:41:30 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2014-05-16 16:41:30 +0800 |
commit | b038c3b87564e9f4acac0019b18fd6d20692ac38 (patch) | |
tree | 4e795aeb88fbb67f6ecdfcdc0d75fdf2e15150bb /rs422lib/rsbus.h | |
parent | d78e451d6bb81823c77d421e327a738bc54dc943 (diff) | |
download | rsbus-b038c3b87564e9f4acac0019b18fd6d20692ac38.tar.gz rsbus-b038c3b87564e9f4acac0019b18fd6d20692ac38.tar.bz2 rsbus-b038c3b87564e9f4acac0019b18fd6d20692ac38.zip |
Tangential change
Diffstat (limited to 'rs422lib/rsbus.h')
-rw-r--r-- | rs422lib/rsbus.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/rs422lib/rsbus.h b/rs422lib/rsbus.h index ea66148..2faf620 100644 --- a/rs422lib/rsbus.h +++ b/rs422lib/rsbus.h @@ -18,29 +18,27 @@ #include<msp430g2553.h>
#include"precomp.h"
+// MAXIMUM length to be send
+#define RS_MAX (14)
+
#define ST_BUSY (0x04)
#define ST_RUN (0x02)
#define ST_RES (0x01)
#define ST_REST (0x00)
+// Switch the machine to a new state specified above
+// This will shown on the network -> must call
#define SWITCH_STATE(STATE) (mac_stat[0]=STATE)
+// Changing the state value (unsigned char) ->
+// Available indices 0,1,2
#define STATE(X) (mac_stat[X+1])
-#define TYPE0 (0x00) //TYPE 0 is a dummy used for debug
-
-#define TYPE1 (0x01)
-#define TYPE2 (0x02)
-
#define STBIT0 (0x5B)
#define STBIT1 (0xAD)
#define EDBIT0 (0xA4)
#define EDBIT1 (0x52)
-#define TXLEN (4)
-
-#define RSMAX (20)
-
typedef void (*rshdlr)(unsigned char*,int);
void rsbus_init(rshdlr);
|