FreeCalypso > hg > freecalypso-sw
changeset 458:705030e1e8b2
os_tim_fl.c: os_RecoverTick() done
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 23 Jun 2014 05:44:03 +0000 |
parents | 103b06ef644a |
children | 38afaeb194ea |
files | gsm-fw/gpf/osl/os_tim_fl.c |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gsm-fw/gpf/osl/os_tim_fl.c Mon Jun 23 05:33:13 2014 +0000 +++ b/gsm-fw/gpf/osl/os_tim_fl.c Mon Jun 23 05:44:03 2014 +0000 @@ -95,3 +95,20 @@ t_running = 0; return(OS_OK); } + +GLOBAL LONG +os_RecoverTick(OS_TICK ticks) +{ + UNSIGNED current_system_clock; + + current_system_clock = NU_Retrieve_Clock(); + NU_Set_Clock(current_system_clock + ticks); + if (TMD_Timer_State == TM_ACTIVE) { + if (TMD_Timer <= ticks) { + TMD_Timer_State = TM_EXPIRED; + TMD_Timer = 0; + } else + TMD_Timer -= ticks; + } + return(OS_OK); +}