'hw_timer_t' does not name a type error when in an included file
Posted: Sun Jun 14, 2020 7:48 am
This may be my inexperience but I'm getting a
'hw_timer_t' does not name a type error
when declared in an included file. I've stripped the problem down to very simple files. (All using the Arduino IDE for ESP32 Dev Module), if I have this simple file;
Without any headers etc. then all compiles OK. If I have an included file with it in then fails with the mentioned error. These files below recreate the problem;
The Main
"IncludedFile.h"
"IncludedFile.cpp"
Now if I take out the #include "IncludedFile.h" from #include "IncludedFile.cpp" then it compiles but then I don't have access to the variable "timer".
I know I'm doing something basic wrong here but what, help appreciated
'hw_timer_t' does not name a type error
when declared in an included file. I've stripped the problem down to very simple files. (All using the Arduino IDE for ESP32 Dev Module), if I have this simple file;
Code: Select all
hw_timer_t * timer = NULL;
void setup() {
}
void loop() {
}
The Main
Code: Select all
#include "IncludedFile.h"
void setup() {
}
void loop() {
}
Code: Select all
hw_timer_t * timer = NULL;
Code: Select all
#include "IncludedFile.h"
I know I'm doing something basic wrong here but what, help appreciated