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

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

[avr-libc-commit] [2477] bug #43011: Remove SPI mode only bits from stru


From: Pitchumani
Subject: [avr-libc-commit] [2477] bug #43011: Remove SPI mode only bits from struct definition of __reg_UCSR1C and __reg_UCSR0C ; and remove duplicate defines in iom128rfa1.h
Date: Fri, 19 Jun 2015 13:22:25 +0000

Revision: 2477
          http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2477
Author:   pitchumani
Date:     2015-06-19 13:22:24 +0000 (Fri, 19 Jun 2015)
Log Message:
-----------
bug #43011: Remove SPI mode only bits from struct definition of __reg_UCSR1C 
and __reg_UCSR0C; and remove duplicate defines in iom128rfa1.h

Ticket Links:
------------
    http://savannah.gnu.org/bugs/?43011

Modified Paths:
--------------
    trunk/avr-libc/ChangeLog
    trunk/avr-libc/NEWS
    trunk/avr-libc/include/avr/iom128rfa1.h

Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog    2015-06-18 09:40:35 UTC (rev 2476)
+++ trunk/avr-libc/ChangeLog    2015-06-19 13:22:24 UTC (rev 2477)
@@ -1,3 +1,11 @@
+2015-06-19  Pitchumani Sivanupandi <address@hidden>
+
+       bug #43011: Bug in struct definition of __reg_UCSR1C and 
+       __reg_UCSR0C in iom128rfa1.h
+       * include/avr/iom128rfa1.h (struct __reg_UCSR0C, struct __reg_UCSR1C):
+       Remove SPI mode only bitfields.
+       (UCPHA0,UDORD0,UCPHA1,UDORD1): Remove duplicates.
+
 2015-06-18  Georg-Johann Lay <address@hidden>
             Pitchumani Sivanupandi <address@hidden>
 

Modified: trunk/avr-libc/NEWS
===================================================================
--- trunk/avr-libc/NEWS 2015-06-18 09:40:35 UTC (rev 2476)
+++ trunk/avr-libc/NEWS 2015-06-19 13:22:24 UTC (rev 2477)
@@ -5,6 +5,7 @@
   [#33698] Explicit use of RJMP/RCALL can cause "relocation truncated to fit:
            R_AVR_13_PCREL" linker error
   [#34719] Check for right build compiler
+  [#43011] Bug in struct definition of __reg_UCSR1C and __reg_UCSR0C in 
iom128rfa1.h
   [#43044] memory sections require __attribute__ ((used))
   [#43828] wdt.h: Wrong inline assembler arguments
   [#44140] wdt_disable() macro clobbers prescaller bits 

Modified: trunk/avr-libc/include/avr/iom128rfa1.h
===================================================================
--- trunk/avr-libc/include/avr/iom128rfa1.h     2015-06-18 09:40:35 UTC (rev 
2476)
+++ trunk/avr-libc/include/avr/iom128rfa1.h     2015-06-19 13:22:24 UTC (rev 
2477)
@@ -2508,12 +2508,15 @@
 struct __reg_UCSR0C {
         unsigned int ucpol0 : 1;       /* Clock Polarity */
         unsigned int ucsz0 : 2;        /* Character Size */
-        unsigned int ucpha0 : 1;       /* Clock Phase */
-        unsigned int udord0 : 1;       /* Data Order */
         unsigned int usbs0 : 1;        /* Stop Bit Select */
         unsigned int upm0 : 2; /* Parity Mode */
         unsigned int umsel0 : 2;       /* USART Mode Select */
 };
+/* NOTE: UCSR0C in SPI mode have only lower three bits.
+  UCORD1 Data Order
+  UCPHA1 Clock Phase
+  UCPOL1 Clock Polarity
+*/
 
 #define UCSR0C_struct _SFR_MEM8_STRUCT(0xc2, struct __reg_UCSR0C)
 
@@ -2523,10 +2526,8 @@
 
 #define UCPOL0                          0
 #define UCPHA0                          1
-#define UCPHA0                          1
 #define UCSZ00                          1
 #define UDORD0                          2
-#define UDORD0                          2
 #define UCSZ01                          2
 #define USBS0                           3
 #define UPM00                           4
@@ -2625,13 +2626,15 @@
 struct __reg_UCSR1C {
         unsigned int ucpol1 : 1;       /* Clock Polarity */
         unsigned int ucsz1 : 2;        /* Character Size */
-        unsigned int ucpha1 : 1;       /* Clock Phase */
-        unsigned int udord1 : 1;       /* Data Order */
         unsigned int usbs1 : 1;        /* Stop Bit Select */
         unsigned int upm1 : 2; /* Parity Mode */
         unsigned int umsel1 : 2;       /* USART Mode Select */
 };
-
+/* NOTE: UCSR1C in SPI mode have only lower three bits.
+  UCORD1 Data Order
+  UCPHA1 Clock Phase
+  UCPOL1 Clock Polarity
+*/
 #define UCSR1C_struct _SFR_MEM8_STRUCT(0xca, struct __reg_UCSR1C)
 
 #endif /* __ASSEMBLER__ */
@@ -2640,10 +2643,8 @@
 
 #define UCPOL1                          0
 #define UCPHA1                          1
-#define UCPHA1                          1
 #define UCSZ10                          1
 #define UDORD1                          2
-#define UDORD1                          2
 #define UCSZ11                          2
 #define USBS1                           3
 #define UPM10                           4




reply via email to

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