Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork130
Fix including "Arduino.h" from C files#163
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecov-commenter commentedJun 8, 2022
Codecov Report
@@ Coverage Diff @@## master #163 +/- ##======================================= Coverage 96.00% 96.00% ======================================= Files 13 13 Lines 827 827 ======================================= Hits 794 794 Misses 33 33
Continue to review full report at Codecov.
|
Would love a look from@facchinm! |
LGTM! Thanks for the patch 😉 |
Consider the following sketch, to be run on the Portenta H7. We have a
project.ino
file with the following:We also have an
extra.c
file in the sketch folder with the following:You candownload the zipped sketch here.
This is a valid sketch, and it compiles on most boards (the Arduino Uno, the Nano 33 BLE, the Arduino Due, etc). On the Portenta, however, we get the following error:
This occurs because we do not include
stdbool.h
. We could fix the issue by removing thetypedef bool boolean;
(it is not used, and the comment suggests someone has been considering it for a while), but just adding the include seems safer.This PR fixes the issue by adding
#include <stdbool.h>
at the top ofapi/Common.h
.