Beispiel #1
0
static void handleAccessRead(GATT_ACCESS_IND_T *p_ind)
{

    /* Check all the services that support attribute 'Read' operation handled
     * by application
     */

    if(GapCheckHandleRange(p_ind->handle))
    {
        GapHandleAccessRead(p_ind);
    }
    else if(HidCheckHandleRange(p_ind->handle))
    {
        HidHandleAccessRead(p_ind);
    }

   
    else if(BatteryCheckHandleRange(p_ind->handle))
    {
        BatteryHandleAccessRead(p_ind);
    }
    else if(ScanParamCheckHandleRange(p_ind->handle))
    {
        ScanParamHandleAccessRead(p_ind);
    }
    else
    {
        GattAccessRsp(p_ind->cid, p_ind->handle, 
                      gatt_status_read_not_permitted,
                      0, NULL);
    }

}
static void handleAccessRead(GATT_ACCESS_IND_T *p_ind)
{

    /* Check all the services that support attribute 'Read' operation handled
     * by application
     */

    if(GapCheckHandleRange(p_ind->handle))
    {
        GapHandleAccessRead(p_ind);
    }
#ifdef ENABLE_OTA
    else if(GattCheckHandleRange(p_ind->handle))
    {
        /* Attribute handle belongs to Gatt service */
        GattHandleAccessRead(p_ind);
    }
    else if(OtaCheckHandleRange(p_ind->handle))
    {
        /* Attribute handle belongs to OTA service */
        OtaHandleAccessRead(p_ind);
    }
#endif /* ENABLE_OTA */
    else if(HidCheckHandleRange(p_ind->handle))
    {
        HidHandleAccessRead(p_ind);
    }

#ifdef __PROPRIETARY_HID_SUPPORT__

    else if(HidBootCheckHandleRange(p_ind->handle))
    {
        HidBootHandleAccessRead(p_ind);
    }

#endif /* __PROPRIETARY_HID_SUPPORT__ */

    else if(BatteryCheckHandleRange(p_ind->handle))
    {
        BatteryHandleAccessRead(p_ind);
    }
    else if(ScanParamCheckHandleRange(p_ind->handle))
    {
        ScanParamHandleAccessRead(p_ind);
    }
    else if(DeviceInfoCheckHandleRange(p_ind->handle))
    {
        DeviceInfoHandleAccessRead(p_ind);
    }
    else if(BondMgmtCheckHandleRange(p_ind->handle))
    {
        BondMgmtHandleAccessRead(p_ind);
    }
    else
    {
        GattAccessRsp(p_ind->cid, p_ind->handle,
                      gatt_status_read_not_permitted,
                      0, NULL);
    }

}