Heartbeat is a simple application that flashes LED1 on ADS development systems. If you have a problem causing your device to lock or become unresponsive, you can use Heartbeat to determine if the kernel is still running.
Heartbeat supports a command line parameter for run duration in seconds. A duration of -1 is infinite. The default duration is infinite.
i.e. To run heartbeat for 60 seconds:
Key APIs Used
CreateFile WriteFile GetCommState SetCommState
Lines of Code: 85
Source Download Rev 3 (73k zip). modified March 31, 02 (ctacke) - added key APIs and LOC edited 11-Apr-2003 by akidder: update to rev 3; add CommState functions to list; 49->85 lines
We've updated the Heartbeat application to work on Bitsy and Bitsy Plus systems. Take a look at these Bitsy and Bitsy Plus topics for details about why it's necessary to control the LED using the DTR signal of COM1 instead of using the LED1: driver.
Important Notes: If you run this application on a Bitsy or Bitsy Plus....
The application won't work if COM1: is already open.
Other applications will not be able to use COM1: while the application is running.
If your PC is connected to COM1: of your device, your PC will probably think that ActiveSync is trying to connect, but will ultimately give an error message that it can't establish a connection. Disconnect from Serial 1 to avoid this issue.
This code doesn't appear to work on the BitsyX, even though no other applications are using COM1. Looking at the BitsyX User Manual (110115-00032), it's not clear to me what mechanism is available, if any, on the BitsyX to control the LED. Can you point me in the right direction?