Arun Raj / Mbed OS MAXREFDES101_SOURCE

Dependencies:   max32630fthr Adafruit_FeatherOLED USBDevice

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers BLE_ICARUS.h Source File

BLE_ICARUS.h

00001 /*******************************************************************************
00002 * Copyright (C) Maxim Integrated Products, Inc., All rights Reserved.
00003 * 
00004 * This software is protected by copyright laws of the United States and
00005 * of foreign countries. This material may also be protected by patent laws
00006 * and technology transfer regulations of the United States and of foreign
00007 * countries. This software is furnished under a license agreement and/or a
00008 * nondisclosure agreement and may only be used or reproduced in accordance
00009 * with the terms of those agreements. Dissemination of this information to
00010 * any party or parties not specified in the license agreement and/or
00011 * nondisclosure agreement is expressly prohibited.
00012 *
00013 * The above copyright notice and this permission notice shall be included
00014 * in all copies or substantial portions of the Software.
00015 *
00016 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00017 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00018 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00019 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
00020 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00021 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00022 * OTHER DEALINGS IN THE SOFTWARE.
00023 *
00024 * Except as contained in this notice, the name of Maxim Integrated
00025 * Products, Inc. shall not be used except as stated in the Maxim Integrated
00026 * Products, Inc. Branding Policy.
00027 *
00028 * The mere transfer of this software does not imply any licenses
00029 * of trade secrets, proprietary technology, copyrights, patents,
00030 * trademarks, maskwork rights, or any other form of intellectual
00031 * property whatsoever. Maxim Integrated Products, Inc. retains all
00032 * ownership rights.
00033 *******************************************************************************
00034 */
00035 
00036 #ifndef _BLE_ICARUS_H_
00037 #define _BLE_ICARUS_H_
00038 
00039 
00040 #include "mbed.h"
00041 #include "ble/BLE.h"
00042 #include "DSInterface.h"
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 enum BLE_State {
00051     BLE_DOWN,
00052     BLE_STARTING,
00053     BLE_ADVERTISING,
00054     BLE_CONNECTED,
00055     BLE_DISCONNECTED,
00056 };
00057 
00058 extern volatile BLE_State bleState;
00059 
00060 /**
00061  * Callback triggered when the ble initialization process has finished
00062  */
00063 void bleInitComplete(BLE::InitializationCompleteCallbackContext *params);
00064 
00065 int BLE_Icarus_TransferData(uint8_t data_transfer[20]);
00066 
00067 int BLE_Icarus_AddtoQueue(uint8_t *data_transfer, int32_t buf_size, int32_t data_size);
00068 
00069 int BLE_Icarus_SetDSInterface(DSInterface *comm_obj);
00070 
00071 int BLE_Icarus_TransferDataFromQueue();
00072 
00073 bool BLE_Icarus_Interface_Exists();
00074 
00075 int BLE_ICARUS_Get_Mac_Address(char MacAdress[6]);
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 
00101 #endif