diff options
author | Joe Zhao <ztuowen@gmail.com> | 2014-05-16 16:23:50 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2014-05-16 16:23:50 +0800 |
commit | d78e451d6bb81823c77d421e327a738bc54dc943 (patch) | |
tree | e6c047fde65f1e026a3bc6b1d0f94ad797912164 /rs422lib/rsbus.h | |
parent | ca5fa5130115f16e0a5bcbc470cd0bb4b2265844 (diff) | |
download | rsbus-d78e451d6bb81823c77d421e327a738bc54dc943.tar.gz rsbus-d78e451d6bb81823c77d421e327a738bc54dc943.tar.bz2 rsbus-d78e451d6bb81823c77d421e327a738bc54dc943.zip |
Added Machine State
Diffstat (limited to 'rs422lib/rsbus.h')
-rw-r--r-- | rs422lib/rsbus.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/rs422lib/rsbus.h b/rs422lib/rsbus.h index 036195d..ea66148 100644 --- a/rs422lib/rsbus.h +++ b/rs422lib/rsbus.h @@ -18,6 +18,15 @@ #include<msp430g2553.h>
#include"precomp.h"
+#define ST_BUSY (0x04)
+#define ST_RUN (0x02)
+#define ST_RES (0x01)
+#define ST_REST (0x00)
+
+#define SWITCH_STATE(STATE) (mac_stat[0]=STATE)
+
+#define STATE(X) (mac_stat[X+1])
+
#define TYPE0 (0x00) //TYPE 0 is a dummy used for debug
#define TYPE1 (0x01)
@@ -38,4 +47,6 @@ void rsbus_init(rshdlr); void rsbus_w(int addr,unsigned char* buf,unsigned int len);
+extern volatile unsigned char mac_stat[4]; // Machine status -> change it to change the auto respond status
+
#endif /* RSBUS_H_ */
|