Niklaus Giger wrote:
>To document basic Xenomai/Linux patterns I developed the attached small
>example for our PPC405 board, which just rolls the 8 debug LEDs.
>
>Are there any comments about it?
This is a worthy example. I strongly recommend you to declare your
ledRegister variable as volatile. You'll find another example in
the Denx's FAQ[1], and accessible through shorter URL[2].
Personally, I always access hardware registers through in_[lbe]{8,16,32}
out_[lbe]{8,16,32} macros, so the code is portable across machines of
different endianess, and thanks to the integrated memory barriers,
I known exactly when the CPU will actually perform the I/O with respect
to the other C instructions.
[1]
http://www.denx.de/wiki/bin/view/PPCEmbedded/DeviceDrivers#Section_Acces
singPeripheralsFromUserSpace
[2] http://tinyurl.com/6c7th
Best regards
--
Stephane
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help