コード例 #1
0
ファイル: cgms_meas.c プロジェクト: lyncxy119/Sentry
/**@brief Function for handling the WRITE event.
 *
 * @details Handles WRITE events from the BLE stack.
 *
 * @param[in]   p_cgms      Glucose Service structure.
 * @param[in]   p_ble_evt  Event received from the BLE stack.
 */
void cgms_meas_on_write(nrf_ble_cgms_t * p_cgms, ble_gatts_evt_write_t * p_evt_write)
{

    if (p_evt_write->handle == p_cgms->char_handles.measurment.cccd_handle)
    {
        on_meas_cccd_write(p_cgms, p_evt_write);
    }
}
コード例 #2
0
ファイル: ble_cscs.c プロジェクト: Aidan-zhang/nRF51SDK
/**@brief Function for handling the Write event.
 *
 * @param[in]   p_cscs      Cycling Speed and Cadence Service structure.
 * @param[in]   p_ble_evt   Event received from the BLE stack.
 */
static void on_write(ble_cscs_t * p_cscs, ble_evt_t * p_ble_evt)
{
    ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write;
    
    if (p_evt_write->handle == p_cscs->meas_handles.cccd_handle)
    {
        on_meas_cccd_write(p_cscs, p_evt_write);
    }
}