123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173 |
- #include "EXT_cbtimer.h"
- #include "OSAL_Clock.h"
- #include "gpio.h"
- #include "OSAL_Tasks.h"
- EXT_CBTIMER_ENTITY ext_cbtimer_entity[EXT_CBTIMER_MAX_ENTITIES];
- EXT_CBTIMER_ENTITY *ext_cbtimer_q_start = NULL;
- EXT_CBTIMER_ENTITY *ext_cbtimer_q_end = NULL;
- #if 0
- EM_thread_mutex_type timer_mutex;
- #endif
- #if 1
- #if defined ( CBTIMER_NUM_TASKS )
- #include "cbTimer.h"
- #endif
- #define EXT_NUM_CBTIMERS_PER_TASK 16
- #define EXT_NUM_CBTIMERS ( CBTIMER_NUM_TASKS * EXT_NUM_CBTIMERS_PER_TASK )
- #define ext_timer_malloc EM_alloc_mem
- #define ext_timer_free EM_free_mem
- typedef struct
- {
- extpfnCbTimer_t pfnCbTimer;
- uint8 *pData;
- } ext_cbTimer_t;
- ext_cbTimer_t ext_cbTimers[EXT_NUM_CBTIMERS];
- uint16 extbaseTaskID = TASK_NO_TASK;
- #define EXT_EVENT_ID( timerId ) ( 0x0001 << ( ( timerId ) % EXT_NUM_CBTIMERS_PER_TASK ) )
- #define EXT_TASK_ID( timerId ) ( ( ( timerId ) / EXT_NUM_CBTIMERS_PER_TASK ) + extbaseTaskID )
- #define EXT_BANK_TASK_ID( taskId ) ( ( ( taskId ) - extbaseTaskID ) * EXT_NUM_CBTIMERS_PER_TASK )
- EM_RESULT ext_timer_init_entity (EXT_CBTIMER_ENTITY *timer);
- EM_RESULT ext_timer_search_entity_timer_id
- (
- EXT_CBTIMER_ENTITY **timer,
- UINT8 handle
- );
- EM_RESULT ext_timer_del_entity
- (
- EXT_CBTIMER_ENTITY *timer,
- UCHAR free
- );
- EM_RESULT ext_timer_search_entity ( EXT_CBTIMER_ENTITY *timer );
- EM_RESULT ext_timer_add_entity ( EXT_CBTIMER_ENTITY *timer );
- #ifdef EXT_CBTIMER_SUPPORT_REMAINING_TIME
- UINT64 ext_cbtimer_get_ms_timestamp(void);
- #endif
- void CbTimerInit( uint8 taskId )
- {
- if ( extbaseTaskID == TASK_NO_TASK )
- {
-
- extbaseTaskID = taskId;
-
- osal_memset( ext_cbTimers, 0, sizeof( ext_cbTimers ) );
- }
- }
- uint16 CbTimerProcessEvent( uint8 taskId, uint16 events )
- {
- if ( events )
- {
- uint8 i;
- uint16 event;
-
- for ( i = 0; i < EXT_NUM_CBTIMERS_PER_TASK; i++ )
- {
- if ( ( events >> i ) & 0x0001 )
- {
- ext_cbTimer_t *pTimer = &ext_cbTimers[EXT_BANK_TASK_ID( taskId )+i];
-
- event = 0x0001 << i;
-
- if(pTimer->pData != NULL)
- {
- pTimer->pfnCbTimer( pTimer->pData );
- }
-
-
- pTimer->pfnCbTimer = NULL;
-
- pTimer->pData = NULL;
-
- break;
- }
- }
-
- return ( events ^ event );
- }
-
-
- return 0;
- }
- Status_t CbTimerStart( extpfnCbTimer_t pfnCbTimer, uint8 *pData,
- uint16 timeout, uint8 *pTimerId )
- {
- uint8 i;
-
-
- if ( pfnCbTimer == NULL )
- {
- return ( INVALIDPARAMETER );
- }
-
- for ( i = 0; i < EXT_NUM_CBTIMERS; i++ )
- {
- if ( ext_cbTimers[i].pfnCbTimer == NULL )
- {
-
- if ( osal_start_timerEx( EXT_TASK_ID( i ), EXT_EVENT_ID( i ), timeout ) == SUCCESS )
- {
-
- ext_cbTimers[i].pfnCbTimer = pfnCbTimer;
- ext_cbTimers[i].pData = pData;
- if ( pTimerId != NULL )
- {
-
- *pTimerId = i;
- }
- return ( SUCCESS );
- }
- }
- }
-
- return ( NO_TIMER_AVAIL );
- }
- Status_t CbTimerUpdate( uint8 timerId, uint16 timeout )
- {
-
- if ( timerId < EXT_NUM_CBTIMERS )
- {
- if ( ext_cbTimers[timerId].pfnCbTimer != NULL )
- {
-
- if ( osal_get_timeoutEx( EXT_TASK_ID( timerId ), EXT_EVENT_ID( timerId ) ) != 0 )
- {
-
- osal_start_timerEx( EXT_TASK_ID( timerId ), EXT_EVENT_ID( timerId ), timeout );
- return ( SUCCESS );
- }
- }
- }
-
- return ( INVALIDPARAMETER );
- }
- Status_t CbTimerStop( uint8 timerId )
- {
-
- if ( timerId < EXT_NUM_CBTIMERS )
- {
- if ( ext_cbTimers[timerId].pfnCbTimer != NULL )
- {
-
- osal_stop_timerEx( EXT_TASK_ID( timerId ), EXT_EVENT_ID( timerId ) );
-
- ext_cbTimers[timerId].pfnCbTimer = NULL;
-
- ext_cbTimers[timerId].pData = NULL;
- return ( SUCCESS );
- }
- }
-
- return ( INVALIDPARAMETER );
- }
- #endif
- #undef EM_RESTART_TIMER
- void EXT_cbtimer_init (void)
- {
- UINT16 index;
- #if 0
-
- EM_thread_mutex_init(&timer_mutex, NULL);
- #endif
-
- for (index = 0; index < EXT_CBTIMER_MAX_ENTITIES; index ++)
- {
- ext_timer_init_entity(&ext_cbtimer_entity[index]);
- ext_cbtimer_entity[index].timer_id = EXT_PHYOS_INVALID_TIMER_ID;
- ext_cbtimer_entity[index].handle = index;
- }
- return;
- }
- void ext_cbtimer_em_init ( void )
- {
- EXT_CBTIMER_ENTITY *timer;
- UINT16 index;
-
-
- for (index = 0; index < EXT_CBTIMER_MAX_ENTITIES; index ++)
- {
- timer = &ext_cbtimer_entity[index];
- timer->timer_id = EXT_PHYOS_INVALID_TIMER_ID;
- }
-
- ext_cbtimer_q_start = ext_cbtimer_q_end = NULL;
- return;
- }
- EM_RESULT EXT_cbtimer_start_timer
- (
- EXT_cbtimer_handle *handle,
- UINT32 timeout,
- void (* callback) (void *, UINT16),
- void *data,
- UINT16 data_length
- )
- {
- UCHAR *data_ptr = NULL;
- EM_RESULT retval;
- EXT_CBTIMER_ENTITY current_timer;
-
- osalTimeUpdate();
-
- if (NULL == handle)
- {
- return EXT_CBTIMER_HANDLE_IS_NULL;
- }
-
- if (NULL == callback)
- {
- return EXT_CBTIMER_CALLBACK_IS_NULL;
- }
- if (0 != data_length)
- {
- if (data_length > EXT_CBTIMER_STATIC_DATA_SIZE)
- {
- data_ptr = (UCHAR *) ext_timer_malloc (data_length);
- if (NULL == data_ptr)
- {
- return EXT_CBTIMER_MEMORY_ALLOCATION_FAILED;
- }
- current_timer.allocated_data = data_ptr;
- }
- else
- {
- data_ptr = current_timer.static_data;
- }
-
- EM_mem_copy(data_ptr, data, data_length);
- }
-
- current_timer.callback = callback;
- current_timer.data_length = data_length;
- current_timer.timeout = timeout;
-
-
- retval = ext_timer_add_entity(¤t_timer);
- if (EM_SUCCESS != retval)
- {
- if (current_timer.data_length > EXT_CBTIMER_STATIC_DATA_SIZE)
- {
- ext_timer_free (current_timer.allocated_data);
- }
- return retval;
- }
-
- *handle = current_timer.handle;
- return EM_SUCCESS;
- }
- void ext_cbtimer_em_shutdown ( void )
- {
- UINT16 index;
- EXT_CBTIMER_ENTITY *timer;
-
-
- ext_cbtimer_q_start = ext_cbtimer_q_end = NULL;
-
- for (index = 0; index < EXT_CBTIMER_MAX_ENTITIES; index++)
- {
- timer = &ext_cbtimer_entity[index];
- if (EXT_CBTIMER_ENTITY_IN_USE == timer->in_use)
- {
-
- CbTimerStop(timer->timer_id);
- if (timer->data_length > EXT_CBTIMER_STATIC_DATA_SIZE)
- {
- ext_timer_free(timer->allocated_data);
- }
- ext_timer_init_entity(timer);
- timer->timer_id = EXT_PHYOS_INVALID_TIMER_ID;
- }
- }
- return;
- }
- void ext_cbtimer_timeout_handler (UINT8 * handle)
- {
- EM_RESULT retval;
- EXT_CBTIMER_ENTITY *timer;
-
-
- retval = ext_timer_search_entity_timer_id (&timer, *handle);
- if (EM_SUCCESS != retval)
- {
-
- return;
- }
-
- if (timer->data_length > EXT_CBTIMER_STATIC_DATA_SIZE)
- {
-
- timer->callback (timer->allocated_data, timer->data_length);
- }
- else
- {
-
- timer->callback (timer->static_data, timer->data_length);
- }
-
- #if 0
-
- xTimerStop (timer->timer_id, 0);
- #endif
-
- retval = ext_timer_del_entity (timer, 1);
- if (EM_SUCCESS != retval)
- {
- printf(
- "FAILED to find Timer Element. Handle = 0x%02X. Error Code = 0x%04X\n",
- *handle, retval);
- }
-
- return;
- }
- EM_RESULT EXT_cbtimer_stop_timer
- (
- EXT_cbtimer_handle handle
- )
- {
- EXT_CBTIMER_ENTITY *timer;
- EM_RESULT retval;
- UINT8 timer_id;
- UINT32 new_timeout;
- Status_t status;
- if (EXT_CBTIMER_MAX_ENTITIES <= handle)
- {
-
- return EXT_CBTIMER_HANDLE_IS_NULL;
- }
- retval = EM_FAILURE;
-
- timer = &ext_cbtimer_entity[handle];
-
- timer_id = timer->timer_id;
- new_timeout = 0x10;
- if(CbTimerUpdate(timer_id,new_timeout) == EM_SUCCESS)
- {
- retval = ext_timer_del_entity(timer, 0x01);
- if (EM_SUCCESS != retval)
- {
- printf(
- "FAILED to find Timer Element. Handle = 0x%02X. Error Code = 0x%04X\n",
- handle, retval);
- }
- else
- {
-
- status = CbTimerStop(timer_id);
- osal_clear_event(EXT_TASK_ID( timer->timer_id ),EXT_EVENT_ID( timer->timer_id ));
-
- if (SUCCESS != status)
- {
- retval = EM_FAILURE;
- }
- }
- }
-
-
- return retval;
- }
- UINT32 EXT_cbtimer_get_remain_timer
- (
- EXT_cbtimer_handle handle
- )
- {
- EXT_CBTIMER_ENTITY *timer;
- UINT32 remain_timeout;
- if (EXT_CBTIMER_MAX_ENTITIES <= handle)
- {
-
- return EXT_CBTIMER_HANDLE_IS_NULL;
- }
-
- timer = &ext_cbtimer_entity[handle];
- remain_timeout = osal_get_timeoutEx(EXT_TASK_ID( timer->timer_id ),EXT_EVENT_ID( timer->timer_id ));
-
-
- return remain_timeout;
- }
- EM_RESULT EXT_cbtimer_restart_timer
- (
- EXT_cbtimer_handle handle,
- UINT32 new_timeout
- )
- {
- EXT_CBTIMER_ENTITY *timer;
- EM_RESULT retval;
-
- if (EXT_CBTIMER_MAX_ENTITIES <= handle)
- {
-
-
- return EXT_CBTIMER_HANDLE_IS_NULL;
- }
- timer = &ext_cbtimer_entity[handle];
- retval = ext_timer_search_entity(timer);
- if (EM_SUCCESS != retval)
- {
- }
- else
- {
- if(CbTimerUpdate(timer->timer_id,new_timeout) == EM_SUCCESS)
- {
- return ( SUCCESS );
- }
- }
-
-
- return ( NO_TIMER_AVAIL );
-
- }
- EM_RESULT EXT_cbtimer_is_active_timer
- (
- EXT_cbtimer_handle handle
- )
- {
- EXT_CBTIMER_ENTITY *timer;
- EM_RESULT retval;
- if (EXT_CBTIMER_MAX_ENTITIES <= handle)
- {
-
- return EXT_CBTIMER_HANDLE_IS_NULL;
- }
-
- timer = &ext_cbtimer_entity[handle];
- retval = ext_timer_search_entity(timer);
- if (EM_SUCCESS != retval)
- {
- }
- return retval;
- }
- EM_RESULT ext_timer_search_entity ( EXT_CBTIMER_ENTITY *timer )
- {
- EXT_CBTIMER_ENTITY *current_timer;
-
- if (NULL == ext_cbtimer_q_start)
- {
- return EXT_CBTIMER_QUEUE_EMPTY;
- }
-
- if (timer == ext_cbtimer_q_start)
- {
- return EM_SUCCESS;
- }
- current_timer = ext_cbtimer_q_start->next;
- while (NULL != current_timer)
- {
- if (timer == current_timer)
- {
- return EM_SUCCESS;
- }
- current_timer = current_timer->next;
- }
- return EXT_CBTIMER_ENTITY_SEARCH_FAILED;
- }
- EM_RESULT ext_timer_search_entity_timer_id
- (
- EXT_CBTIMER_ENTITY **timer,
- UINT8 handle
- )
- {
- EXT_CBTIMER_ENTITY *current_timer;
-
- if (NULL == ext_cbtimer_q_start)
- {
- return EXT_CBTIMER_QUEUE_EMPTY;
- }
-
- if (handle == ext_cbtimer_q_start->handle)
- {
-
- *timer = ext_cbtimer_q_start;
- return EM_SUCCESS;
- }
- current_timer = ext_cbtimer_q_start->next;
- while (NULL != current_timer)
- {
- if (handle == current_timer->handle)
- {
-
- *timer = current_timer;
- return EM_SUCCESS;
- }
- current_timer = current_timer->next;
- }
- return EXT_CBTIMER_ENTITY_SEARCH_FAILED;
- }
-
- EM_RESULT ext_timer_add_entity ( EXT_CBTIMER_ENTITY *timer )
- {
- UINT16 index;
- Status_t ret;
- EXT_CBTIMER_ENTITY *new_timer;
- new_timer = NULL;
- for (index = 0; index < EXT_CBTIMER_MAX_ENTITIES; index++)
- {
- new_timer = &ext_cbtimer_entity[index];
- if (EXT_CBTIMER_ENTITY_FREE == new_timer->in_use)
- {
- new_timer->in_use = EXT_CBTIMER_ENTITY_IN_USE;
- break;
- }
- else
- {
- new_timer = NULL;
- }
- }
- if (NULL == new_timer)
- {
- printf(
- "FAILED to Allocate EXT New Timer Entity. Timer List FULL !\n");
- #ifdef EM_STATUS
-
- EM_status_set_bit (STATUS_BIT_TIMER_ENTITY_FULL, STATUS_BIT_SET);
- #endif
- return EXT_CBTIMER_QUEUE_FULL;
- }
- new_timer->next = NULL;
- new_timer->timeout = timer->timeout;
- new_timer->callback = timer->callback;
- new_timer->data_length = timer->data_length;
- if (new_timer->data_length > EXT_CBTIMER_STATIC_DATA_SIZE)
- {
- new_timer->allocated_data = timer->allocated_data;
- }
- else
- {
- EM_mem_copy
- (
- new_timer->static_data,
- timer->static_data,
- new_timer->data_length
- );
- }
-
- #ifdef EXT_CBTIMER_SUPPORT_REMAINING_TIME
- new_timer->start_timestamp = ext_cbtimer_get_ms_timestamp();
- #endif
-
- ret = CbTimerStart
- (
- ext_cbtimer_timeout_handler,
- &new_timer->handle,
- ((EXT_CBTIMEOUT_MILLISEC & new_timer->timeout) ?
- (new_timer->timeout & (UINT32)~(EXT_CBTIMEOUT_MILLISEC)):
- (new_timer->timeout * 1000)),
- &new_timer->timer_id
- );
- if (SUCCESS != ret)
- {
- return EXT_CBTIMER_FAILED_SET_TIME_EVENT;
- }
- timer->handle = new_timer->handle;
- timer->timer_id = new_timer->timer_id;
-
- if (NULL == ext_cbtimer_q_start)
- {
- ext_cbtimer_q_start = ext_cbtimer_q_end = new_timer;
- return EM_SUCCESS;
- }
- ext_cbtimer_q_end->next = new_timer;
- ext_cbtimer_q_end = new_timer;
- return EM_SUCCESS;
- }
- EM_RESULT ext_timer_del_entity
- (
- EXT_CBTIMER_ENTITY *timer,
- UCHAR free
- )
- {
- EXT_CBTIMER_ENTITY *current_timer, *previous_timer;
-
- if (ext_cbtimer_q_start == ext_cbtimer_q_end)
- {
- if (NULL == ext_cbtimer_q_start)
- {
-
- return EXT_CBTIMER_QUEUE_EMPTY;
- }
- else
- {
- if (timer == ext_cbtimer_q_start)
- {
-
- ext_cbtimer_q_start = ext_cbtimer_q_end = NULL;
- }
- else
- {
-
- return EXT_CBTIMER_ENTITY_SEARCH_FAILED;
- }
- }
- }
- else
- {
-
- if (timer == ext_cbtimer_q_start)
- {
-
- ext_cbtimer_q_start = ext_cbtimer_q_start->next;
- }
- else
- {
- previous_timer = ext_cbtimer_q_start;
- current_timer = ext_cbtimer_q_start->next;
- while (NULL != current_timer)
- {
- if (timer == current_timer)
- {
- previous_timer->next = current_timer->next;
- if (current_timer == ext_cbtimer_q_end)
- {
- ext_cbtimer_q_end = previous_timer;
- }
- break;
- }
- previous_timer = current_timer;
- current_timer = current_timer->next;
- }
- if (NULL == current_timer)
- {
- return EXT_CBTIMER_ENTITY_SEARCH_FAILED;
- }
- }
- }
-
- if ((0x01 == free) &&
- (timer->data_length > EXT_CBTIMER_STATIC_DATA_SIZE))
- {
- ext_timer_free (timer->allocated_data);
- }
- ext_timer_init_entity(timer);
- return EM_SUCCESS;
- }
- EM_RESULT ext_timer_init_entity (EXT_CBTIMER_ENTITY *timer)
- {
- timer->in_use = EXT_CBTIMER_ENTITY_FREE;
- timer->timeout = 0;
- timer->callback = NULL;
- timer->allocated_data = NULL;
- timer->data_length = 0;
- timer->next = NULL;
- #ifdef EM_TIMER_SUPPORT_REMAINING_TIME
- timer->start_timestamp = 0;
- #endif
- return EM_SUCCESS;
- }
- #ifdef EXT_CBTIMER_SUPPORT_REMAINING_TIME
- UINT64 ext_cbtimer_get_ms_timestamp(void)
- {
- return osal_GetSystemClock();
- }
- EM_RESULT EXT_cbtimer_get_remaining_time
- (
- EXT_cbtimer_handle handle,
- UINT32 * remaining_time_ms
- )
- {
- EXT_CBTIMER_ENTITY *timer;
- EM_RESULT retval;
- UINT64 current_timestamp;
- UINT32 time_ms;
- if (NULL == handle)
- {
- return EXT_CBTIMER_HANDLE_IS_NULL;
- }
-
- timer = (EXT_CBTIMER_ENTITY *)handle;
- retval = ext_timer_search_entity(timer);
- if (EM_SUCCESS != retval)
- {
- }
- else
- {
- time_ms = ((EXT_CBTIMEOUT_MILLISEC & timer->timeout) ?
- (timer->timeout & (UINT32)~(EXT_CBTIMEOUT_MILLISEC)) :
- (timer->timeout * 1000));
-
-
- current_timestamp = ext_cbtimer_get_ms_timestamp();
- if ((current_timestamp < timer->start_timestamp) ||
- (time_ms < (current_timestamp - timer->start_timestamp))
- )
- {
- }
- else
- {
- time_ms -= (UINT32)(current_timestamp - timer->start_timestamp);
- *remaining_time_ms = time_ms;
- retval = EM_SUCCESS;
- }
- }
- return retval;
- }
- #endif
- EM_RESULT EXT_cbtimer_list_timer ( void )
- {
- #ifdef EM_TIMERL_DEBUG
- UINT16 index, free;
- EXT_CBTIMER_ENTITY *timer;
- timer_lock();
- EM_TIMERL_TRC("\n");
- EM_TIMERL_TRC("========================================= \n");
- EM_TIMERL_TRC("Start Q = %p\n", ext_cbtimer_q_start);
- timer = ext_cbtimer_q_start;
- while(NULL != timer)
- {
- EM_TIMERL_TRC(" Handle = 0x%02X",
- timer->handle);
- timer = timer->next;
- }
- EM_TIMERL_TRC("End Q = %p\n", ext_cbtimer_q_end);
- free = 0;
- for (index = 0; index < EXT_CBTIMER_MAX_ENTITIES; index ++)
- {
- if (EXT_CBTIMER_ENTITY_FREE == ext_cbtimer_entity[index].in_use)
- {
- free ++;
- }
- }
- EM_TIMERL_TRC("Max Q Entity = %d, Free = %d\n",
- EXT_CBTIMER_MAX_ENTITIES, free);
- EM_TIMERL_TRC("========================================= \n");
- EM_TIMERL_TRC("\n");
- timer_unlock();
- #endif
- return EM_SUCCESS;
- }
|