I have a GPIO port reading in values from a couple pins (either high or low read). The way that the device attatched to the gpio pins works is:
1. Set the pins high for a couple microseconds to charge the cap on the device.
2. Read the pins after a couple hundred microseconds to read the values as high or low.
In the sys-bios I used the clock function to do this by setting a period of a couple hundred microseconds and making an instance calling the function to read the values. .... (then in the function I called sysctldelay() to wait a couple micro-seconds for the charging of the cap before exiting ).
This process worked fine. But now I would like to do the same thing with two timers so I setup in Sys-bios two timers on two different clocks and defined their period. Then I attached both timers to two different functions, set the timers to start when called by user, and then set them to a one-time shot timer. The two functions work like so:
function on first timer does it's thing, clears it's interupt then enables second timer....
function on second timer does it's thing, clears it's interrupt then enables first timer...
... and this should keep going on
I figured I could enable one of the timers from outside of these two functions with TimerEnable(arg0,arg1) and the timer would start and the two functions would keep enabling the different timers until I dissable both of them later (haven't figured that part out yet).
My problem is that the timers don't start at all. I believe it's part that I'm starting the timers on my own because if I setup the timers to start on start up they run. What is the problem here?
_____________________________________________________________________________________
Secondly, Is there a way to print from a HWI or SWI to the console. I've read the documentation about not being able to use system_printf() but don't understand what I could use in replacement.
----------------------------------------------------------------------------------------------------------------------------------------------
Also, one other question. I wanted to put my h files in a seperate folder to clean up the working folder a bit. I went through adding the folder to my "includes" folder and shows up in there but it doesn't seem to work. I've done some hunting on this and can't find the answer. How would I do this?