inline static tSirRetStatus
limInitMeasResources(tpAniSirGlobal pMac)
{
    tANI_U32    val;
    tANI_U32    beaconInterval;

    
    // Create Meas related timers only when
    // periodic measurements are enabled
    if (pMac->lim.gpLimMeasReq->measControl.periodicMeasEnabled)
    {
        val = SYS_MS_TO_TICKS(pMac->lim.gpLimMeasReq->measIndPeriod);
        if (tx_timer_create(
                        &pMac->lim.gLimMeasParams.measurementIndTimer,
                        "Meas Ind TIMEOUT",
                        limTimerHandler,
                        SIR_LIM_MEASUREMENT_IND_TIMEOUT,
                        val,
                        val,
                        TX_NO_ACTIVATE) != TX_SUCCESS)
        {
            /// Could not create MeasInd timer.
            // Log error
            limLog(pMac, LOGP, FL("call to create MeasInd timer failed\n"));

            return eSIR_SYS_TX_TIMER_CREATE_FAILED;
        }
        pMac->lim.gLimMeasParams.isMeasIndTimerActive = 0;
       PELOG3(limLog(pMac, LOG3, FL("MeasurementIndication timer initialized, period = %d\n"), 
                                                    pMac->lim.gpLimMeasReq->measIndPeriod);)
Пример #2
0
wiced_result_t wiced_rtos_init_timer( wiced_timer_t* timer, uint32_t time_ms, timer_handler_t function, void* arg )
{
    if ( tx_timer_create( timer, (char*)"", (native_timer_handler_t)function, (ULONG)arg, time_ms / ms_to_tick_ratio, time_ms / ms_to_tick_ratio, 0 ) != WICED_SUCCESS )
    {
        return WICED_ERROR;
    }

    return WICED_SUCCESS;
}
Пример #3
0
CTXTimerHandler::CTXTimerHandler(){
// setup the handler for recieving the timer calls  
  //TODO handle ticks per second correctly here
  UINT status = tx_timer_create(&m_stTimer, "FORTE timer", &timerHandlerFunc, 0, 1, 1, TX_NO_ACTIVATE); 
  if (status == TX_SUCCESS)
    DEVLOG_DEBUG("Timer created\n");
  else
    DEVLOG_DEBUG("Error creating timer\n");
  
  //TODO handle retval
}
Пример #4
0
STATUS Device_Open(const char *p_file_name)
{

	for (U32 device = 0; device < FF_NUM_UNITS_MAX; device++)
	{
 		// Initialize timers 
		timer_context[device] = 0;
#ifdef THREADX
 		STATUS status = tx_timer_create(&timer[device],
 			"FbTimer", // name of timer
 			&Device_Timer_Expiration_Routine,
 			
 			// The ID passed to FF_Timer_Expiration_Routine
 			// will have the device number.
 			device,
 			1,	// zero initial ticks
 			0, // reschedule time
 			TX_NO_ACTIVATE);
#else
 		STATUS status = NU_Create_Timer(&timer[device],
 			"FbTimer", // name of timer
 			&Device_Timer_Expiration_Routine,
 			
 			// The ID passed to FF_Timer_Expiration_Routine
 			// will have the device number.
 			device,
 			0,	// zero initial ticks
 			0, // reschedule time
 			NU_DISABLE_TIMER);
#endif
 			
		if (status != OK)
		{
			CT_Log_Error(CT_ERROR_TYPE_FATAL,
				"Device_Open", 
				"NU_Create_Timer failed",
				status,
				0);
			return status;
		}

		// Reset device busy flag.
		busy_status.source &= ~FF_bit_mask[device];
	}

	// Seed the random-number generator with current time so that
	// the numbers will be different every time we run.    
	Seed_Random();

	return OK;

} // Device_Open