TEST
Dependencies: max32630fthr Adafruit_FeatherOLED USBDevice
Drivers/BLE_ICARUS/BLE_ICARUS.h@4:291477e8690d, 2020-04-19 (annotated)
- Committer:
- wwwarunraj
- Date:
- Sun Apr 19 11:19:57 2020 +0000
- Revision:
- 4:291477e8690d
- Parent:
- 3:2fe2ff1ca0dc
19/04
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 1 | /******************************************************************************* |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 2 | * Copyright (C) Maxim Integrated Products, Inc., All rights Reserved. |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 3 | * |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 4 | * This software is protected by copyright laws of the United States and |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 5 | * of foreign countries. This material may also be protected by patent laws |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 6 | * and technology transfer regulations of the United States and of foreign |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 7 | * countries. This software is furnished under a license agreement and/or a |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 8 | * nondisclosure agreement and may only be used or reproduced in accordance |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 9 | * with the terms of those agreements. Dissemination of this information to |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 10 | * any party or parties not specified in the license agreement and/or |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 11 | * nondisclosure agreement is expressly prohibited. |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 12 | * |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 13 | * The above copyright notice and this permission notice shall be included |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 14 | * in all copies or substantial portions of the Software. |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 15 | * |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 19 | * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 20 | * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 22 | * OTHER DEALINGS IN THE SOFTWARE. |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 23 | * |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 24 | * Except as contained in this notice, the name of Maxim Integrated |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 25 | * Products, Inc. shall not be used except as stated in the Maxim Integrated |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 26 | * Products, Inc. Branding Policy. |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 27 | * |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 28 | * The mere transfer of this software does not imply any licenses |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 29 | * of trade secrets, proprietary technology, copyrights, patents, |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 30 | * trademarks, maskwork rights, or any other form of intellectual |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 31 | * property whatsoever. Maxim Integrated Products, Inc. retains all |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 32 | * ownership rights. |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 33 | ******************************************************************************* |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 34 | */ |
Emre.Eken@IST-LT-36262.maxim-ic.internal | 3:2fe2ff1ca0dc | 35 | |
gmehmet | 1:f60eafbf009a | 36 | #ifndef _BLE_ICARUS_H_ |
gmehmet | 1:f60eafbf009a | 37 | #define _BLE_ICARUS_H_ |
gmehmet | 1:f60eafbf009a | 38 | |
gmehmet | 1:f60eafbf009a | 39 | |
gmehmet | 1:f60eafbf009a | 40 | #include "mbed.h" |
gmehmet | 1:f60eafbf009a | 41 | #include "ble/BLE.h" |
gmehmet | 1:f60eafbf009a | 42 | #include "DSInterface.h" |
gmehmet | 1:f60eafbf009a | 43 | |
gmehmet | 1:f60eafbf009a | 44 | |
gmehmet | 1:f60eafbf009a | 45 | |
gmehmet | 1:f60eafbf009a | 46 | |
gmehmet | 1:f60eafbf009a | 47 | |
gmehmet | 1:f60eafbf009a | 48 | |
gmehmet | 1:f60eafbf009a | 49 | |
gmehmet | 1:f60eafbf009a | 50 | enum BLE_State { |
gmehmet | 1:f60eafbf009a | 51 | BLE_DOWN, |
gmehmet | 1:f60eafbf009a | 52 | BLE_STARTING, |
gmehmet | 1:f60eafbf009a | 53 | BLE_ADVERTISING, |
gmehmet | 1:f60eafbf009a | 54 | BLE_CONNECTED, |
gmehmet | 1:f60eafbf009a | 55 | BLE_DISCONNECTED, |
gmehmet | 1:f60eafbf009a | 56 | }; |
gmehmet | 1:f60eafbf009a | 57 | |
gmehmet | 1:f60eafbf009a | 58 | extern volatile BLE_State bleState; |
gmehmet | 1:f60eafbf009a | 59 | |
gmehmet | 1:f60eafbf009a | 60 | /** |
gmehmet | 1:f60eafbf009a | 61 | * Callback triggered when the ble initialization process has finished |
gmehmet | 1:f60eafbf009a | 62 | */ |
gmehmet | 1:f60eafbf009a | 63 | void bleInitComplete(BLE::InitializationCompleteCallbackContext *params); |
gmehmet | 1:f60eafbf009a | 64 | |
gmehmet | 1:f60eafbf009a | 65 | int BLE_Icarus_TransferData(uint8_t data_transfer[20]); |
gmehmet | 1:f60eafbf009a | 66 | |
gmehmet | 1:f60eafbf009a | 67 | int BLE_Icarus_AddtoQueue(uint8_t *data_transfer, int32_t buf_size, int32_t data_size); |
gmehmet | 1:f60eafbf009a | 68 | |
gmehmet | 1:f60eafbf009a | 69 | int BLE_Icarus_SetDSInterface(DSInterface *comm_obj); |
gmehmet | 1:f60eafbf009a | 70 | |
gmehmet | 1:f60eafbf009a | 71 | int BLE_Icarus_TransferDataFromQueue(); |
gmehmet | 1:f60eafbf009a | 72 | |
gmehmet | 1:f60eafbf009a | 73 | bool BLE_Icarus_Interface_Exists(); |
gmehmet | 1:f60eafbf009a | 74 | |
gmehmet | 1:f60eafbf009a | 75 | int BLE_ICARUS_Get_Mac_Address(char MacAdress[6]); |
gmehmet | 1:f60eafbf009a | 76 | |
gmehmet | 1:f60eafbf009a | 77 | |
gmehmet | 1:f60eafbf009a | 78 | |
gmehmet | 1:f60eafbf009a | 79 | |
gmehmet | 1:f60eafbf009a | 80 | |
gmehmet | 1:f60eafbf009a | 81 | |
gmehmet | 1:f60eafbf009a | 82 | |
gmehmet | 1:f60eafbf009a | 83 | |
gmehmet | 1:f60eafbf009a | 84 | |
gmehmet | 1:f60eafbf009a | 85 | |
gmehmet | 1:f60eafbf009a | 86 | |
gmehmet | 1:f60eafbf009a | 87 | |
gmehmet | 1:f60eafbf009a | 88 | |
gmehmet | 1:f60eafbf009a | 89 | |
gmehmet | 1:f60eafbf009a | 90 | |
gmehmet | 1:f60eafbf009a | 91 | |
gmehmet | 1:f60eafbf009a | 92 | |
gmehmet | 1:f60eafbf009a | 93 | |
gmehmet | 1:f60eafbf009a | 94 | |
gmehmet | 1:f60eafbf009a | 95 | |
gmehmet | 1:f60eafbf009a | 96 | |
gmehmet | 1:f60eafbf009a | 97 | |
gmehmet | 1:f60eafbf009a | 98 | |
gmehmet | 1:f60eafbf009a | 99 | |
gmehmet | 1:f60eafbf009a | 100 | |
gmehmet | 1:f60eafbf009a | 101 | #endif |