From: SourceForge.net <no...@so...> - 2011-02-20 17:42:50
|
Bugs item #3187488, was opened at 2011-02-20 18:28 Message generated for change (Comment added) made by gaufillet You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3187488&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pic16 target Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Goofy (gaufillet) Assigned to: Nobody/Anonymous (nobody) Summary: [PIC16] Inconsistent declarations of USTATbits Initial Comment: in pic18f4450.h, USTATbits are defined as: 228 extern __sfr __at (0xF6C) USTAT; 229 typedef union { 230 struct { 231 unsigned : 1; 232 unsigned PPBI : 1; 233 unsigned DIR : 1; 234 unsigned ENDP0 : 1; 235 unsigned ENDP1 : 1; 236 unsigned ENDP2 : 1; 237 unsigned ENDP3 : 1; 238 unsigned : 1; 239 }; 240 } __USTATbits_t; 241 extern volatile __USTATbits_t __at (0xF6C) USTATbits; and in pic18f2455.h: 147 extern __sfr __at (0xF6C) USTAT; 148 typedef union { 149 struct { 150 unsigned : 1; 151 unsigned PPBI : 1; 152 unsigned DIR : 1; 153 unsigned ENDP : 4; 154 unsigned : 1; 155 }; 156 } __USTAT_t; 157 extern volatile __USTAT_t __at (0xF6C) USTATbits; The second one should be preferred, as ENDP is most of the time used as an index. Moreover, it is important to keep consistent definitions to make easier writing of portable code. Other header files should also be checked and fixed if required. ---------------------------------------------------------------------- >Comment By: Goofy (gaufillet) Date: 2011-02-20 18:42 Message: Other headers that should be fixed: pic18f14k50.h pic18f46j50.h pic18f67j50.h pic18f87j50.h ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3187488&group_id=599 |