avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] patch for iom169.h - signal and UART reisters name consis


From: Artur Lipowski
Subject: [avr-libc-dev] patch for iom169.h - signal and UART reisters name consistency
Date: Tue, 17 Feb 2004 14:59:05 +0100
User-agent: Mozilla Thunderbird 0.5+ (Windows/20040215)

Like a previous one but there is a name cleanup for UART registers.

--
Artur Lipowski

--- iom169.h.new        2004-02-17 14:51:08.000000000 +0100
+++ iom169.h            2004-02-17 14:54:25.000000000 +0100
@@ -334,6 +334,13 @@
 
 #define _VECTORS_SIZE 92
 
+/* To disallow compilation of obsoleted signal names 
+ * use character not allowed in C indentifier */
+#define _UART_SIGNAME_ERR      +
+#define SIG_UART0_RECV         _UART_SIGNAME_ERR
+#define SIG_UART0_DATA         _UART_SIGNAME_ERR
+#define SIG_UART0_TRANS                _UART_SIGNAME_ERR
+
 /* Bit numbers */
 
 /*
--- iom169.h.old        2004-02-17 14:34:54.000000000 +0100
+++ iom169.h            2004-02-17 14:41:00.000000000 +0100
@@ -261,21 +261,21 @@
 #define USIDR  _SFR_MEM8(0xBA)
 
 /* USART0 Control and Status Register A */
-#define UCSR0A _SFR_MEM8(0xC0)
+#define UCSRA  _SFR_MEM8(0xC0)
 
 /* USART0 Control and Status Register B */
-#define UCSR0B _SFR_MEM8(0xC1)
+#define UCSRB  _SFR_MEM8(0xC1)
 
 /* USART0 Control and Status Register C */
-#define UCSR0C _SFR_MEM8(0xC2)
+#define UCSRC  _SFR_MEM8(0xC2)
 
 /* USART0 Baud Rate Register */
-#define UBRR0  _SFR_MEM16(0xC4)
-#define UBRR0L _SFR_MEM8(0xC4)
-#define UBRR0H _SFR_MEM8(0xC5)
+#define UBRR   _SFR_MEM16(0xC4)
+#define UBRRL  _SFR_MEM8(0xC4)
+#define UBRRH  _SFR_MEM8(0xC5)
 
 /* USART0 I/O Data Register */
-#define UDR0   _SFR_MEM8(0xC6)
+#define UDR    _SFR_MEM8(0xC6)
 
 /* LCD Control and Status Register A */
 #define LCDCRA _SFR_MEM8(0xE4)
@@ -321,9 +321,9 @@
 #define SIG_OUTPUT_COMPARE0     _VECTOR(10)
 #define SIG_OVERFLOW0           _VECTOR(11)
 #define SIG_SPI                 _VECTOR(12)
-#define SIG_UART0_RECV          _VECTOR(13)
-#define SIG_UART0_DATA          _VECTOR(14)
-#define SIG_UART0_TRANS         _VECTOR(15)
+#define SIG_UART_RECV           _VECTOR(13)
+#define SIG_UART_DATA           _VECTOR(14)
+#define SIG_UART_TRANS          _VECTOR(15)
 #define SIG_USI_START           _VECTOR(16)
 #define SIG_USI_OVERFLOW        _VECTOR(17)
 #define SIG_COMPERATOR          _VECTOR(18)
@@ -870,7 +870,7 @@
 #define USICNT1 1
 #define USICNT0 0
 
-/* UCSR0A */
+/* UCSRA */
 #define RXC0   7
 #define TXC0   6
 #define UDRE0  5
@@ -880,7 +880,7 @@
 #define U2X0   1
 #define MPCM0  0
 
-/* UCSR0B */
+/* UCSRB */
 #define RXCIE0 7
 #define TXCIE0 6
 #define UDRIE0 5
@@ -890,7 +890,7 @@
 #define RXB80  1
 #define TXB80  0
 
-/* UCSR0C */
+/* UCSRC */
 #define UMSEL0 6
 #define UPM01  5
 #define UPM00  4

reply via email to

[Prev in Thread] Current Thread [Next in Thread]