Beispiel #1
0
/*******************************************************************************
  Function:
    void WF_SetRtsThreshold(uint16_t rtsThreshold)

  Summary:
    Sets the RTS Threshold.

  Description:
    Sets the RTS/CTS packet size threshold for when RTS/CTS frame will be sent.
    The default is 2347 bytes – the maximum for 802.11.  It is recommended that
    the user leave the default at 2347 until they understand the performance and
    power ramifications of setting it smaller.  Valid values are from 0 to
    WF_RTS_THRESHOLD_MAX (2347).

  Precondition:
  	MACInit must be called first.

  Parameters:
    rtsThreshold - Value of the packet size threshold

  Returns:
  	None.

  Remarks:
  	None.
  *****************************************************************************/
void WF_SetRtsThreshold(uint16_t rtsThreshold)
{
    SYS_ASSERT(rtsThreshold <= WF_RTS_THRESHOLD_MAX, "");

    /* correct endianness before sending message */
    rtsThreshold = HSTOWFS(rtsThreshold);

    SendSetParamMsg(PARAM_RTS_THRESHOLD, (uint8_t *)&rtsThreshold, sizeof(rtsThreshold));
}
/*******************************************************************************
  Function:    
    void WF_SetRtsThreshold(UINT16 rtsThreshold)

  Summary:
    Sets the RTS Threshold.

  Description:
    Sets the RTS/CTS packet size threshold for when RTS/CTS frame will be sent.  
    The default is 2347 bytes – the maximum for 802.11.  It is recommended that 
    the user leave the default at 2347 until they understand the performance and 
    power ramifications of setting it smaller.  Valid values are from 0 to
    WF_RTS_THRESHOLD_MAX (2347).

  Precondition:
    MACInit must be called first.

  Parameters:
    rtsThreshold - Value of the packet size threshold

  Returns:
    None.
      
  Remarks:
    None.
 *****************************************************************************/
void WF_SetRtsThreshold(UINT16 rtsThreshold)
{
    WF_ASSERT(rtsThreshold <= WF_RTS_THRESHOLD_MAX);
    
     /* correct endianness before sending message */
    rtsThreshold = HSTOWFS(rtsThreshold);
    
    SendSetParamMsg(PARAM_RTS_THRESHOLD, (UINT8 *)&rtsThreshold, sizeof(rtsThreshold)); 
}