The code in my applications is getting kind of large so i split it in to several function.h files but not sure if the way i have structured these are quite the right way as including the function.h has to be done in a specific order.
Essentially I have somethign like the following..
At compile time I would have thought that the functions inside the XXX.h files would be available globally so if there was a function in Tickers.h it could be called by WebServer.h however this does not seem to be the case.
In my case i have a function in Tickers.h called stopTickers() that is supposed to stop all of the tickers.
There is also a function in Tickers.h called startTickers() that runs functions in Sensors.h and pidRoutine.h
If I put Tickers.h at the bottom like I have above then i get an error at compile time "'stopTickers' was not declared in this scope"
and if I put it before WebServer.h i get an error "'updateTemperature' was not declared in this scope"
because it cant see the UpdateTemperature() in sensors.h
How do you create and declare a function that is essentially global? Another issue is there are #defines included in the includes and adding a #include "Tickers.h" to the other XXX.h files would end up redefining the declares's and I am not sure but think it would end up bloating the code.