* device/include/pic16/usart.h: added compatibility defines for
authortecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 7 Apr 2005 17:19:42 +0000 (17:19 +0000)
committertecodev <tecodev@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 7 Apr 2005 17:19:42 +0000 (17:19 +0000)
  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

ChangeLog
device/include/pic16/pic18f6520.h
device/include/pic16/pic18f6620.h
device/include/pic16/pic18f6720.h
device/include/pic16/pic18f8520.h
device/include/pic16/pic18f8620.h
device/include/pic16/pic18f8720.h
device/include/pic16/usart.h

index 44212d0ce844c63d513f3aeff6f9ffefb7c1e96d..9cac5f0b7ca7a4fe49c3ed353ea7009719135b43 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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
index 7888498e778c60852d0e3599fea421f29cdb9d01..2d87a28859c1b5e959d69ded6000656fc791c823 100644 (file)
@@ -1391,4 +1391,7 @@ extern __sfr __at 0xfff TOSU;
 #define __IDLOC7       0x200007
 
 
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
 #endif
index b519002145a49107574bde387fe3b1b492705150..8747f30fc323697bb2ce33be9b1fc325bc6161fd 100644 (file)
@@ -1368,4 +1368,7 @@ extern __sfr __at 0xfff TOSU;
 #define __IDLOC7       0x200007
 
 
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
 #endif
index 5a1fddc6003604dfc8032616480dbfe9b8b17fa3..d8f24d61733589cc82d142aded7585191fd186c5 100644 (file)
@@ -1416,4 +1416,7 @@ extern __sfr __at 0xfff TOSU;
 #define __IDLOC7       0x200007
 
 
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
 #endif
index ce5eaeb04fa8bd53307b2b111977b48fe5b4266e..f1f02273c5532bee6ace47ea38de429f6f36709a 100644 (file)
@@ -1493,4 +1493,7 @@ extern __sfr __at 0xfff TOSU;
 #define __IDLOC7       0x200007
 
 
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
 #endif
index 7598db07a9d0f3c1c2dfd216179f53723e6c28cf..5da917c803521e317d7acbedfc5a8e2c1e4dd8ee 100644 (file)
@@ -1491,4 +1491,7 @@ extern __sfr __at 0xfff TOSU;
 #define __IDLOC7       0x200007
 
 
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
 #endif
index fc5e82f05cec7f3618d550682467a94c3fe2f366..91cbf38e2931407b1f273ac88da9b20d24995467 100644 (file)
@@ -1539,4 +1539,7 @@ extern __sfr __at 0xfff TOSU;
 #define __IDLOC7       0x200007
 
 
+/* added for USART compatibility with smaller devices */
+#define __MULTIPLE_USARTS 1
+
 #endif
index 0b119f37ced7a74013e60f3cc4a3f174510644b4..3c62927f1448d9716b1f0c78f9f2f8e3640893a3 100644 (file)
 #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