devices with more than one USART
* device/include/pic16/pic18f[68][567]20.h: activated above defines
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3725
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2005-04-07 Raphael Neider <rneider AT web.de>
+
+ * device/include/pic16/usart.h: added compatibility defines for
+ devices with more than one USART
+ * device/include/pic16/pic18f[68][567]20.h: activated above defines
+
2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
* device/lib/Makefile.in: updated for port specific include
#define __IDLOC7 0x200007
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
#endif
#define __IDLOC7 0x200007
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
#endif
#define __IDLOC7 0x200007
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
#endif
#define __IDLOC7 0x200007
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
#endif
#define __IDLOC7 0x200007
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
#endif
#define __IDLOC7 0x200007
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
#endif
#define USART_SYNCH_MODE 0xff
#define USART_ASYNCH_MODE 0xfe
+#if defined(__MULTIPLE_USARTS) && __MULTIPLE_USARTS > 0
+/* added for USART compatibility with smaller devices */
+#define RCREG RCREG1
+#define TXREG TXREG1
+#define RCSTA RCSTA1
+#define TXSTA TXSTA1
+#define RCSTAbits RCSTA1bits
+#define TXSTAbits TXSTA1bits
+#define SPBRG SPBRG1
+
+/* and now for use in inline assembly */
+#define _RCREG _RCREG1
+#define _TXREG _TXREG1
+#define _RCSTA _RCSTA1
+#define _TXSTA _TXSTA1
+#define _RCSTAbits _RCSTA1bits
+#define _TXSTAbits _TXSTA1bits
+#define _SPBRG _SPBRG1
+#endif
/* status bits */
union USART