Skip to content

USART define warnings - U3Xn in HardwareSerial_private.h #466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mikrocoder opened this issue Mar 3, 2022 · 2 comments
Open

USART define warnings - U3Xn in HardwareSerial_private.h #466

mikrocoder opened this issue Mar 3, 2022 · 2 comments
Labels

Comments

@mikrocoder
Copy link

Hello,

there is an error in the USART define links. A bit definition called U3Xn does not exist. This is surely a typo and must be U2Xn. n stands for USART 0...3. If you activate the compiler flag -Wundef you get the following output. Can someone please correct this in HardwareSerial_private.h?
Thank you.

In file included from C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial.cpp:33:0:
C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial_private.h:80:29: warning: "U3X3" is not defined, evaluates to 0 [-Wundef]
         UDRIE3 != UDRIE0 || U3X3 != U3X0 || UPE3 != UPE0 || \
                             ^~~~
C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial_private.h:80:37: warning: "U3X0" is not defined, evaluates to 0 [-Wundef]
         UDRIE3 != UDRIE0 || U3X3 != U3X0 || UPE3 != UPE0 || \
                                     ^~~~
In file included from C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial2.cpp:27:0:
C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial_private.h:80:29: warning: "U3X3" is not defined, evaluates to 0 [-Wundef]
         UDRIE3 != UDRIE0 || U3X3 != U3X0 || UPE3 != UPE0 || \
                             ^~~~
C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial_private.h:80:37: warning: "U3X0" is not defined, evaluates to 0 [-Wundef]
         UDRIE3 != UDRIE0 || U3X3 != U3X0 || UPE3 != UPE0 || \
                                     ^~~~
In file included from C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial0.cpp:27:0:
C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial_private.h:80:29: warning: "U3X3" is not defined, evaluates to 0 [-Wundef]
         UDRIE3 != UDRIE0 || U3X3 != U3X0 || UPE3 != UPE0 || \
                             ^~~~
C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial_private.h:80:37: warning: "U3X0" is not defined, evaluates to 0 [-Wundef]
         UDRIE3 != UDRIE0 || U3X3 != U3X0 || UPE3 != UPE0 || \
                                     ^~~~
In file included from C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial1.cpp:27:0:
C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial_private.h:80:29: warning: "U3X3" is not defined, evaluates to 0 [-Wundef]
         UDRIE3 != UDRIE0 || U3X3 != U3X0 || UPE3 != UPE0 || \
                             ^~~~
C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial_private.h:80:37: warning: "U3X0" is not defined, evaluates to 0 [-Wundef]
         UDRIE3 != UDRIE0 || U3X3 != U3X0 || UPE3 != UPE0 || \
                                     ^~~~
In file included from C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial3.cpp:27:0:
C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial_private.h:80:29: warning: "U3X3" is not defined, evaluates to 0 [-Wundef]
         UDRIE3 != UDRIE0 || U3X3 != U3X0 || UPE3 != UPE0 || \
                             ^~~~
C:\Arduino IDE Portable\Mega2560\arduino-1.8.19\portable\packages\arduino\hardware\avr\1.8.5\cores\arduino\HardwareSerial_private.h:80:37: warning: "U3X0" is not defined, evaluates to 0 [-Wundef]
         UDRIE3 != UDRIE0 || U3X3 != U3X0 || UPE3 != UPE0 || \
                                     ^~~~
@per1234 per1234 transferred this issue from arduino/Arduino Mar 3, 2022
@per1234 per1234 added the bug label Mar 3, 2022
@mikrocoder
Copy link
Author

Link to the proposed change

I did not want to start a duplicate request now, therefore the link. I hope this makes your work easier.

MCUdude added a commit to MCUdude/MCUdude_corefiles that referenced this issue Apr 6, 2022
MCUdude added a commit to MCUdude/MegaCore that referenced this issue Apr 21, 2022
b1703a37 Initial support for AVR ATmega 5 and 9-series ATmega165/325/645, ATmega3250/6450, ATmega169/239/649, ATmega3290/6490
6b36d8f1 Fix typo More detals here: arduino/ArduinoCore-avr#466
ecb12fa4 Add GCC printf formatting checks

git-subtree-dir: avr/cores/MCUdude_corefiles
git-subtree-split: b1703a37e880b4f0b5fc42c09acfc35f04f4a91d
@CombiesGit
Copy link
Contributor

After update from 1.8.5 to 1.8.6
The problem still persists.

MCUdude added a commit to MCUdude/MiniCore that referenced this issue Jan 15, 2023
…cc53

0d56ecc53 Use template based functions for radians() and degrees() by default
a9ade41df Use template functions instead of macros by default This will make it possible to use the previous "typeof" macros outside functions and structures
b811cd119 Use template based min/max functions by default
5ddffca3f Reorder hardware serial macros ... to ensure no poisoned macros are being used
21b32d156 Add support for AVR 5 and 9 series
88a427b0f Add support for AVR 5 and 9 series
54808586e Reorder macro checking To prevent GCC poison error on when compiling for ATmega165
b1703a37e Initial support for AVR ATmega 5 and 9-series ATmega165/325/645, ATmega3250/6450, ATmega169/239/649, ATmega3290/6490
6b36d8f1a Fix typo More detals here: arduino/ArduinoCore-avr#466
ecb12fa46 Add GCC printf formatting checks

git-subtree-dir: avr/cores/MCUdude_corefiles
git-subtree-split: 0d56ecc539d7047899835fdc040d8748c3afc564
MCUdude added a commit to MCUdude/MightyCore that referenced this issue Jan 17, 2023
…cc53

0d56ecc53 Use template based functions for radians() and degrees() by default
a9ade41df Use template functions instead of macros by default This will make it possible to use the previous "typeof" macros outside functions and structures
b811cd119 Use template based min/max functions by default
5ddffca3f Reorder hardware serial macros ... to ensure no poisoned macros are being used
21b32d156 Add support for AVR 5 and 9 series
88a427b0f Add support for AVR 5 and 9 series
54808586e Reorder macro checking To prevent GCC poison error on when compiling for ATmega165
b1703a37e Initial support for AVR ATmega 5 and 9-series ATmega165/325/645, ATmega3250/6450, ATmega169/239/649, ATmega3290/6490
6b36d8f1a Fix typo More detals here: arduino/ArduinoCore-avr#466
ecb12fa46 Add GCC printf formatting checks

git-subtree-dir: avr/cores/MCUdude_corefiles
git-subtree-split: 0d56ecc539d7047899835fdc040d8748c3afc564
MCUdude added a commit to MCUdude/MajorCore that referenced this issue Jan 17, 2023
0d56ecc5 Use template based functions for radians() and degrees() by default
a9ade41d Use template functions instead of macros by default This will make it possible to use the previous "typeof" macros outside functions and structures
b811cd11 Use template based min/max functions by default
5ddffca3 Reorder hardware serial macros ... to ensure no poisoned macros are being used
21b32d15 Add support for AVR 5 and 9 series
88a427b0 Add support for AVR 5 and 9 series
54808586 Reorder macro checking To prevent GCC poison error on when compiling for ATmega165
b1703a37 Initial support for AVR ATmega 5 and 9-series ATmega165/325/645, ATmega3250/6450, ATmega169/239/649, ATmega3290/6490
6b36d8f1 Fix typo More detals here: arduino/ArduinoCore-avr#466
ecb12fa4 Add GCC printf formatting checks

git-subtree-dir: avr/cores/MCUdude_corefiles
git-subtree-split: 0d56ecc539d7047899835fdc040d8748c3afc564
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants