A non-irq based heartbeat timer
In your main loop
HeartbeatTimer();
if (Do10msFunctions)
{
//-----------------------------
//----- DO 10mS FUNCTIONS -----
//-----------------------------
Do10msFunctions = 0;
}
Heartbeat timer function
HeartbeatTimer();
//Switches1New = 0;
if (Do10msFunctions)
{
//-----------------------------
//----- DO 10mS FUNCTIONS -----
//-----------------------------
Do10msFunctions = 0;
//----- READ SWICHES -----
//read_switches();
}
