/* Function for checking a write event for whether a CCCD was written during the write operation.  */
static bool cccd_written(ble_gatts_evt_write_t *p_write_evt)
/* Function for checking a write event for whether a CCCD was written during the write operation.  */
static bool cccd_written(ble_gatts_evt_write_t *p_write_evt)
{
    return (    (p_write_evt->op        == BLE_GATTS_OP_WRITE_REQ)
             && (p_write_evt->uuid.type == BLE_UUID_TYPE_BLE)
             && (p_write_evt->uuid.uuid == BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG)
           );
}