-
Notifications
You must be signed in to change notification settings - Fork 205
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
add libmaple STM32F1 SoftwareSerial capable define #54
Conversation
Thanks! |
For some reason some of our STM32F1x platforms can find |
Which pio/arduino lib are you using for the STM32 ? |
@thinkyhead Do you know how many of our build tools support |
I have been told that we can use |
Aha, actually this did work. Not sure if it works with #ifdef __has_include
#if __has_include(<Arduino.h>)
#error "Arduino.h is seen by __has_include!"
#else
#error "Arduino.h is NOT seen by __has_include!"
#error
#endif |
Nope. Don't do this: #if defined(__has_include) && __has_include(<Arduino.h>) |
its not that some find it.. its just all the F1 which doesnt find it.. Others does not include it at all. This release change is only for STM32F1 (ARDUINO_ARCH_STM32F1) |
That patch will be helpful to future-proof the library. So basically, any platform that's using C++17 will be able to avoid the include automagically. But note that if the library isn't installed, there will be no |
Yea if the library isn't installed (maybe because the platform doesn't have it), then you can't use SW Serial. Makes sense to me but I need to think about whether or not I want to add a more verbose warning of some sort. |
I've seen some tricks employed to add warnings to deprecated things and errors to obsolete things, but I've never seen official support in C++ yet. But I grabbed the new specification PDF so I'll see if it mentions it. |
Ah, yes. Here it is… [[ deprecated ]] void hello() { printf("Hello"); } |
And we also have… |
Also see https://en.cppreference.com/w/cpp/language/function#Deleted_functions
|
@teemuatlut |
If you add this , so i can add software serial for stm32f1 boards.