Beispiel #1
0
static bool WF_CMIsHostScanAllowed(void)
{
    uint8_t   profileID;
    uint8_t   profileIDState;

    WF_CMCheckConnectionState(&profileIDState, &profileID);
    if (profileIDState == WF_CSTATE_CONNECTION_IN_PROGRESS || profileIDState == WF_CSTATE_RECONNECTION_IN_PROGRESS)
        return false;

    return true;
}
Beispiel #2
0
static BOOL WF_CMIsHostScanAllowed(void)
{
	UINT8	profileID;
	UINT8	profileIDState;
  
	WF_CMCheckConnectionState(&profileIDState, &profileID);
    if (profileIDState == WF_CSTATE_CONNECTION_IN_PROGRESS || profileIDState == WF_CSTATE_RECONNECTION_IN_PROGRESS)
        return FALSE;

	return TRUE;
}
static BOOL
WF_CMIsDisconnectAllowed(void)
{
	UINT8	profileID;
	UINT8	profileIDState;
  
	WF_CMCheckConnectionState(&profileIDState, &profileID);
    if (profileIDState == WF_CSTATE_CONNECTED_INFRASTRUCTURE || profileIDState == WF_CSTATE_CONNECTED_ADHOC)
        return TRUE;

	return FALSE;
}
/*******************************************************************************
  Function:
    static bool WF_CMIsDisconnectAllowed(void)

  Summary:
    Checks whether disconnection is now allowed.

  Description:

  Precondition:
    MACInit must be called first.

  Parameters:
    None.

  Returns:
    true - Currently connected. Disconnection is allowed.
    false - Not connected to any network. So either no need for disconnection or disallowed.

  Remarks:
    None.
  *****************************************************************************/
static bool
WF_CMIsDisconnectAllowed(void)
{
    uint8_t   profileID;
    uint8_t   profileIDState;

    WF_CMCheckConnectionState(&profileIDState, &profileID);
    if (profileIDState == WF_CSTATE_CONNECTED_INFRASTRUCTURE || profileIDState == WF_CSTATE_CONNECTED_ADHOC)
    {
        return true;
    }

    return false;
}