prova

Fork of BLE_API by Bluetooth Low Energy

Committer:
Vincent Coubard
Date:
Wed Sep 14 14:17:52 2016 +0100
Branch:
2f55eed1fdde06fdabfb66d41ce6cd14e280978f
Revision:
1201:9b71aac42d14
Sync with 2f55eed1fdde06fdabfb66d41ce6cd14e280978f

2016-06-06 09:36:57+01:00: Vincent Coubard
Add an interface which allows user code to customise the way BLE events
are processed.

The mechanism is quite simple:
* user code can process all events pending in the internal BLE stack by
calling the function BLE::processEvent.
* user code can be notified when an event become available and the event
stack has to be processed. The notification is issued by the port of
mbed BLE.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Vincent Coubard 1201:9b71aac42d14 1 /* mbed Microcontroller Library
Vincent Coubard 1201:9b71aac42d14 2 * Copyright (c) 2006-2013 ARM Limited
Vincent Coubard 1201:9b71aac42d14 3 *
Vincent Coubard 1201:9b71aac42d14 4 * Licensed under the Apache License, Version 2.0 (the "License");
Vincent Coubard 1201:9b71aac42d14 5 * you may not use this file except in compliance with the License.
Vincent Coubard 1201:9b71aac42d14 6 * You may obtain a copy of the License at
Vincent Coubard 1201:9b71aac42d14 7 *
Vincent Coubard 1201:9b71aac42d14 8 * http://www.apache.org/licenses/LICENSE-2.0
Vincent Coubard 1201:9b71aac42d14 9 *
Vincent Coubard 1201:9b71aac42d14 10 * Unless required by applicable law or agreed to in writing, software
Vincent Coubard 1201:9b71aac42d14 11 * distributed under the License is distributed on an "AS IS" BASIS,
Vincent Coubard 1201:9b71aac42d14 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Vincent Coubard 1201:9b71aac42d14 13 * See the License for the specific language governing permissions and
Vincent Coubard 1201:9b71aac42d14 14 * limitations under the License.
Vincent Coubard 1201:9b71aac42d14 15 */
Vincent Coubard 1201:9b71aac42d14 16
Vincent Coubard 1201:9b71aac42d14 17 #include "ble/BLE.h"
Vincent Coubard 1201:9b71aac42d14 18 #include "ble/BLEInstanceBase.h"
Vincent Coubard 1201:9b71aac42d14 19
Vincent Coubard 1201:9b71aac42d14 20 BLEInstanceBase::~BLEInstanceBase()
Vincent Coubard 1201:9b71aac42d14 21 {
Vincent Coubard 1201:9b71aac42d14 22 // empty destructor
Vincent Coubard 1201:9b71aac42d14 23 }
Vincent Coubard 1201:9b71aac42d14 24
Vincent Coubard 1201:9b71aac42d14 25 void BLEInstanceBase::signalEventsToProcess(BLE::InstanceID_t id)
Vincent Coubard 1201:9b71aac42d14 26 {
Vincent Coubard 1201:9b71aac42d14 27 BLE::Instance(id).signalEventsToProcess();
Vincent Coubard 1201:9b71aac42d14 28 }