Lightly modified version of the BLE stack, that doesn't bring up a DFUService by default... as we have our own.
Fork of BLE_API by
common/BLEDeviceInstanceBase.h@403:f24e0ea73138, 2015-05-21 (annotated)
- Committer:
- finneyj
- Date:
- Thu May 21 09:34:46 2015 +0000
- Revision:
- 403:f24e0ea73138
- Parent:
- 305:71367f7cd078
- Child:
- 347:20be4234c6fe
Disabled autogenerated DFU Service
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Rohit Grover |
111:189ff241dae1 | 1 | /* mbed Microcontroller Library |
Rohit Grover |
111:189ff241dae1 | 2 | * Copyright (c) 2006-2013 ARM Limited |
Rohit Grover |
111:189ff241dae1 | 3 | * |
Rohit Grover |
111:189ff241dae1 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Rohit Grover |
111:189ff241dae1 | 5 | * you may not use this file except in compliance with the License. |
Rohit Grover |
111:189ff241dae1 | 6 | * You may obtain a copy of the License at |
Rohit Grover |
111:189ff241dae1 | 7 | * |
Rohit Grover |
111:189ff241dae1 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Rohit Grover |
111:189ff241dae1 | 9 | * |
Rohit Grover |
111:189ff241dae1 | 10 | * Unless required by applicable law or agreed to in writing, software |
Rohit Grover |
111:189ff241dae1 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Rohit Grover |
111:189ff241dae1 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Rohit Grover |
111:189ff241dae1 | 13 | * See the License for the specific language governing permissions and |
Rohit Grover |
111:189ff241dae1 | 14 | * limitations under the License. |
Rohit Grover |
111:189ff241dae1 | 15 | */ |
Rohit Grover |
111:189ff241dae1 | 16 | |
Rohit Grover |
111:189ff241dae1 | 17 | #ifndef __BLE_DEVICE_INSTANCE_BASE__ |
Rohit Grover |
111:189ff241dae1 | 18 | #define __BLE_DEVICE_INSTANCE_BASE__ |
Rohit Grover |
111:189ff241dae1 | 19 | |
Rohit Grover |
111:189ff241dae1 | 20 | /** |
Rohit Grover |
111:189ff241dae1 | 21 | * The interface for the transport object to be created by the target library's |
Rohit Grover |
111:189ff241dae1 | 22 | * createBLEDeviceInstance(). |
Rohit Grover |
111:189ff241dae1 | 23 | */ |
Rohit Grover |
111:189ff241dae1 | 24 | class BLEDeviceInstanceBase |
Rohit Grover |
111:189ff241dae1 | 25 | { |
Rohit Grover |
111:189ff241dae1 | 26 | public: |
Rohit Grover |
111:189ff241dae1 | 27 | virtual const char *getVersion(void) = 0; |
Rohit Grover |
111:189ff241dae1 | 28 | virtual Gap& getGap() = 0; |
Rohit Grover |
111:189ff241dae1 | 29 | virtual GattServer& getGattServer() = 0; |
Rohit Grover |
111:189ff241dae1 | 30 | virtual ble_error_t init(void) = 0; |
rgrover1 | 230:2c414d3240a8 | 31 | virtual ble_error_t shutdown(void) = 0; |
Rohit Grover |
111:189ff241dae1 | 32 | virtual ble_error_t reset(void) = 0; |
Rohit Grover |
111:189ff241dae1 | 33 | virtual ble_error_t setTxPower(int8_t txPower) = 0; |
rgrover1 | 305:71367f7cd078 | 34 | virtual void getPermittedTxPowerValues(const int8_t **, size_t *) = 0; |
Rohit Grover |
111:189ff241dae1 | 35 | virtual void waitForEvent(void) = 0; |
Rohit Grover |
111:189ff241dae1 | 36 | }; |
Rohit Grover |
111:189ff241dae1 | 37 | |
Rohit Grover |
111:189ff241dae1 | 38 | /** |
Rohit Grover |
111:189ff241dae1 | 39 | * BLEDevice uses composition to hide an interface object encapsulating the |
Rohit Grover |
111:189ff241dae1 | 40 | * backend transport. |
Rohit Grover |
111:189ff241dae1 | 41 | * |
Rohit Grover |
111:189ff241dae1 | 42 | * The following API is used to create the singleton interface object. An |
Rohit Grover |
111:189ff241dae1 | 43 | * implementation for this function must be provided by the device-specific |
Rohit Grover |
111:189ff241dae1 | 44 | * library, otherwise there will be a linker error. |
Rohit Grover |
111:189ff241dae1 | 45 | */ |
Rohit Grover |
111:189ff241dae1 | 46 | extern BLEDeviceInstanceBase *createBLEDeviceInstance(void); |
Rohit Grover |
111:189ff241dae1 | 47 | |
rgrover1 | 230:2c414d3240a8 | 48 | #endif // ifndef __BLE_DEVICE_INSTANCE_BASE__ |