Though I have not yet tested your code, thank you for your great example.
is it possible to write code for PRU in C?
Maxim,
Yes, there is a beta C compiler from TI ( you have to ask Jason Kridner for it ), and CCS 6 comes with it too I’ve been told( I do not use CCS personally ).
The Beta C compiler is downloadable from:
http://software-dl.ti.com/codegen/non-esd/downloads/beta.htm
under the “PRU Code Generation Tools” section. IIRC, you need to create a log in and fill in a request form.
There’s also a project to port GCC located at:
https://github.com/dinuxbg/gnupru
that I’ve not yet tried.
Scott
The GCC compiler last I heard was not complete, or even really all that usable for more than a couple things.