void sinkHfpInit( void ) { hfp_init_params hfp_params; memset(&hfp_params, 0, sizeof(hfp_init_params)); sinkClearQueueudEvent(); /* get the extra hfp supported features such as supported sco packet types from pskey user 5 */ configManagerHFP_SupportedFeatures(); /* initialise the hfp library with parameters read from config*/ configManagerHFP_Init(&hfp_params); theSink.hfp_profiles = hfp_params.supported_profile; /* store the link loss time in the app */ theSink.linkLossReminderTime = hfp_params.link_loss_interval; /* initialise hfp library with pskey read configuration */ HfpInit(&theSink.task, &hfp_params, NULL); /* initialise the audio library, uses one malloc slot */ AudioLibraryInit(); }
/**************************************************************************** NAME sinkRecallQueuedEvent DESCRIPTION Checks to see if an event was Queued and issues it RETURNS void */ void sinkRecallQueuedEvent ( void ) { /*this is currently only applicable to LNR and voice Dial but does not care */ if ((theSink.gEventQueuedOnConnection != (EventInvalid - EVENTS_MESSAGE_BASE))) { switch (stateManagerGetState() ) { case deviceIncomingCallEstablish: case deviceOutgoingCallEstablish: case deviceActiveCallSCO: case deviceActiveCallNoSCO: case deviceThreeWayCallWaiting: case deviceThreeWayCallOnHold: case deviceThreeWayMulticall: /* Do Nothing Message Gets ignored*/ break ; default: /* delay sending of queued message by 1 second as some phones are ignoring the AT command when using native firmware as the connection time is much quicker using that firmware */ MessageSendLater ( &theSink.task , (theSink.gEventQueuedOnConnection + EVENTS_MESSAGE_BASE), 0 , 1500) ; break; } } /*reset the queued event*/ sinkClearQueueudEvent(); }
/**************************************************************************** NAME slcConnectFail DESCRIPTION SLC failed to connect RETURNS void */ void slcConnectFail(void) { SLC_DEBUG(("SLC: ConnFail\n" )) ; /* Send event to signify that all reconnection attempts failed */ MessageSend(&theSink.task, EventSysReconnectFailed, 0); /*clear the queue*/ sinkClearQueueudEvent() ; /* continue the connection sequence, this may or may not make any further connection attempts depending upon multipoint configuration */ if(!gSlcData.gSlcConnectRemote) { /* continue trying to connect to next device in 2 seconds time to allow paging between connection attempts */ MessageSendLater(&theSink.task,EventSysContinueSlcConnectRequest,0,theSink.conf1->timeouts.SecondAGConnectDelayTime_s); } /* if set to repeat a connection attempt decrement this as an attempt has occured */ if(theSink.NoOfReconnectionAttempts) theSink.NoOfReconnectionAttempts--; }