bluetooth/btstack/l2cap/l2capSAPSignalHandler.cpp
branchRCL_3
changeset 25 99439b07e980
parent 17 32ba20339036
equal deleted inserted replaced
24:e9b924a62a66 25:99439b07e980
   811 	
   811 	
   812 void CL2CapSAPSignalHandler::SAPClosed()
   812 void CL2CapSAPSignalHandler::SAPClosed()
   813 	{
   813 	{
   814 	LOG_FUNC
   814 	LOG_FUNC
   815 	// The SAP is about to be detached from this signal handler.
   815 	// The SAP is about to be detached from this signal handler.
   816 	// Ensure no park overrides are active.
   816 	// Ensure no overrides are active.
   817 	UndoOverrideParkMode();
   817 	UndoOverrideParkMode();
       
   818 	UndoOverrideLPM();
   818 	
   819 	
   819 	// Check if this SH has any unsent commands
   820 	// Check if this SH has any unsent commands
   820 	// outstanding.
   821 	// outstanding.
   821 	iSAP = NULL;
   822 	iSAP = NULL;
   822 	if(iMuxer == NULL)	
   823 	if(iMuxer == NULL)	
   914 	if(iSAP)
   915 	if(iSAP)
   915 		{
   916 		{
   916 		iSAP->Protocol().ControlPlane().ModifyPhysicalLink(EUndoOverridePark, iSAP->RemoteDev());
   917 		iSAP->Protocol().ControlPlane().ModifyPhysicalLink(EUndoOverridePark, iSAP->RemoteDev());
   917 		}
   918 		}
   918 	}
   919 	}
   919 	
   920 
   920 void CL2CapSAPSignalHandler::OverrideLPMWithTimeout()
   921 void CL2CapSAPSignalHandler::OverrideLPM()
   921 	{
   922 	{
   922 	LOG_FUNC
   923 	LOG_FUNC
   923 	// Temporarily override all low power modes.  A reference to the SAP is required
   924 	// Temporarily override all low power modes.  A reference to the SAP is required
   924 	// to get the remote device address.
   925 	// to get the remote device address.
   925 	if(iSAP)
   926 	if(iSAP)
   926 		{
   927 		{
   927 		iSAP->Protocol().ControlPlane().ModifyPhysicalLink(EOverrideLPMWithTimeout, iSAP->RemoteDev());
   928 		iSAP->Protocol().ControlPlane().ModifyPhysicalLink(EOverrideLPM, iSAP->RemoteDev());
   928 		}
   929 		}
   929 	}
   930 	}
   930 	
   931 
       
   932 void CL2CapSAPSignalHandler::UndoOverrideLPM()
       
   933 	{
       
   934 	LOG_FUNC
       
   935 	// Remove the temporary override of all low power modes.  A reference to the SAP is 
       
   936 	// required to get the remote device address.
       
   937 	if(iSAP)
       
   938 		{
       
   939 		iSAP->Protocol().ControlPlane().ModifyPhysicalLink(EUndoOverrideLPM, iSAP->RemoteDev());
       
   940 		}
       
   941 	}
       
   942