Cyclic #include?
ul5255 opened this issue · 2 comments
Hi Dale,
Me again:
Line:
https://github.com/organix/pijFORTHos/blob/master/raspi.h#L7:
looks like a cyclic #include to me. Can this be removed?
I'm also not clear what these two lines do:
https://github.com/organix/pijFORTHos/blob/master/raspi.h#L20
and
https://github.com/organix/pijFORTHos/blob/master/raspi.h#L21 .
Does this mean they shadow the definitions of PUT_32 and GET_32
from start.s? If so, why not get rid of those definitions in
start.s?
I will try today at home to build the project. My goal is to
port an Arduino sketch such that I can control the Si504:
http://www.ov-selbstbau.de/wiki/index.php?title=Flexibler_Quarz-Oszillator_auf_Basis_Si504
Cheers,
Uwe.
Nice catch, Thanks!
The #include is not really circular, because the #ifndef wrapper prevents multiple inclusion, even in this case.
The macros for PUT_32 and GET_32 are a way to inline equivalent functionality in C code (not the "volatile" keyword is important). The assembly-language versions are still there for cases where you need a real procedure to call. Also, if the optimizer gets too tricky with the macro-expanded versions, it's easy to comment them out and re-compile. I want to leave that option open.
Good luck with your project!
Ok.