From 07d2ace8b4771e2ad48d4a9e6bf43a2022a25fac Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Fri, 23 May 2014 15:36:51 +0800 Subject: Added SYSSTOP & MSTATE macro New example main.c --- rs422lib/precomp.h | 75 +++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 37 deletions(-) (limited to 'rs422lib/precomp.h') diff --git a/rs422lib/precomp.h b/rs422lib/precomp.h index d2d2380..6e54606 100644 --- a/rs422lib/precomp.h +++ b/rs422lib/precomp.h @@ -1,37 +1,38 @@ -/* - * precomp.h - * - * Created on: 2014-4-26 - * Author: Tuowen - */ - -#ifndef PRECOMP_H_ -#define PRECOMP_H_ - -#include - -// ====== RSBUS configuration ====== - -// Data Enable pin configuration -// P1.0 -> red led -#define RSDIR (P1DIR) -#define RSOUT (P1OUT) -#define RSPIN (BIT0) - -// This is the highest level -#define RSSYSBIT (SYS_BIT0) - -// Specify the physical address on the rsbus -#define RSADDR (1) - -// Machine Type -// TYPE 0 is a dummy used for debug -// Change it in real implementation -#define MACTYPE (0x00) - -// ====== End RSBUS configuration ====== - -//define delay func -#define delay_ms(ms) __delay_cycles(16000*(ms)) - -#endif /* PRECOMP_H_ */ +/* + * precomp.h + * + * Created on: 2014-4-26 + * Author: Tuowen + */ + +#ifndef PRECOMP_H_ +#define PRECOMP_H_ + +#include + +// ====== RSBUS configuration ====== + +// Data Enable pin configuration +// P1.0 -> red led +#define RSDIR (P1DIR) +#define RSOUT (P1OUT) +#define RSPIN (BIT0) + +// This is the highest level +#define RSSYSBIT (SYS_BIT0) +#define TEST (SYS_BIT1) + +// Specify the physical address on the rsbus +#define RSADDR (1) + +// Machine Type +// TYPE 0 is a dummy used for debug +// Change it in real implementation +#define MACTYPE (0x00) + +// ====== End RSBUS configuration ====== + +//define delay func +#define delay_ms(ms) __delay_cycles(16000*(ms)) + +#endif /* PRECOMP_H_ */ -- cgit v1.2.3-70-g09d2