From d78e451d6bb81823c77d421e327a738bc54dc943 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Fri, 16 May 2014 16:23:50 +0800 Subject: Added Machine State --- rs422lib/rsbus.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'rs422lib/rsbus.h') 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 #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_ */ -- cgit v1.2.3-70-g09d2