Ejemplo n.º 1
0
/*----------------------------------------------------------------------------*
 *  NAME
 *      GattStopAdverts
 *
 *  DESCRIPTION
 *      This function is used to stop advertisements.
 *
 *  PARAMETERS
 *      None
 *
 *  RETURNS
 *      Nothing
 *----------------------------------------------------------------------------*/
extern void GattStopAdverts(void)
{
    switch(GetState())
    {
        case app_state_fast_advertising:
        {
            if(IsWhiteListEnabled())
            {
                /* Set advertisement timer for remaining 20 seconds for fast
                 * connections without any device in the white list.
                 */
                g_gatt_data.advert_timer_value = 
                                FAST_CONNECTION_ADVERT_TIMEOUT_VALUE - 
                                BONDED_DEVICE_ADVERT_TIMEOUT_VALUE;
            }

            /* Stop on-going advertisements */
            GattCancelConnectReq();
        }
        /* FALLTHROUGH*/

        default:
            /* Ignore timer in remaining states */
        break;
    }
}
Ejemplo n.º 2
0
/*-----------------------------------------------------------------------------*
 *  NAME
 *      GattStopAdverts
 *
 *  DESCRIPTION
 *      This function is used to stop on-going advertisements.
 *
 *  RETURNS/MODIFIES
 *      Nothing.
 *
 *----------------------------------------------------------------------------*/
extern void GattStopAdverts(void)
{
    GattCancelConnectReq();
}