summaryrefslogtreecommitdiff
path: root/rs422lib/rsbus.h
diff options
context:
space:
mode:
Diffstat (limited to 'rs422lib/rsbus.h')
-rw-r--r--rs422lib/rsbus.h11
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_ */