Moti,
I think you are misunderstanding how the TMR_StartSIngleshotTimer() works.
It is not a "blocking mode" delay function.
It starts a timer that expires after an interval. When the timer expires the callback is called.
Also you should not use the Callback that is used by another timer, you should make your own - e.g.
static tmrTimerID_t mDelayTimerId;
void testfunction(void)
{
mDelayTimerId = TMR_AllocateTimer(); // should only be done once!!
LCD_ClearDisplay();
LCD_WriteString(1,"Press any key"
;
LCD_WriteString(2,"to start."
;
TMR_StartSingleShotTimer(mDelayTimerId_c, 4000_c, DisplayTimeoutHandler);
}
void DisplayTimeoutHandler((uint8_t timerID)
(void) timerID;
LCD_ClearDisplay();
LCD_WriteString(1,"are you";
LCD_WriteString(2,"sure."; }
Look in the Beestack Generic app for example on how the timer can be used to drive delays between different states.
BR,
Mads,