Created
August 30, 2019 12:36
-
-
Save Micrified/4f9e931791d3497dc978fa67ffe66aa0 to your computer and use it in GitHub Desktop.
Bluetooth Header
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if !defined(BLE_H) | |
#define BLE_H | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "esp_system.h" | |
#include "esp_log.h" | |
#include "nvs_flash.h" | |
#include "esp_bt.h" | |
#include "esp_gap_ble_api.h" | |
#include "esp_gatts_api.h" | |
#include "esp_bt_defs.h" | |
#include "esp_bt_main.h" | |
#include "esp_gatt_common_api.h" | |
#include "sdkconfig.h" | |
#include "ble_profiles.h" // Custom BLE profiles | |
/* | |
******************************************************************************* | |
* External Symbolic Constants * | |
******************************************************************************* | |
*/ | |
// The name of the device as seen in the GAP advertising messages | |
#define BLE_DEVICE_NAME "Foo-ESP32" | |
// The Message-Transmission-Unit to use with clients | |
#define BLE_MTU_SIZE 512 | |
// The maximum size (in bytes) of the response/indicate message (< MTU size) | |
#define BLE_RSP_MSG_MAX_SIZE 15 | |
/* | |
******************************************************************************* | |
* External Global Variables * | |
******************************************************************************* | |
*/ | |
// Enumeration of supported Application Profiles | |
enum { | |
/*************************************************************************/ | |
APP_PROFILE_WIFI, | |
/*************************************************************************/ | |
// The number of application profiles (do not remove) | |
APP_PROFILE_COUNT | |
}; | |
/* | |
******************************************************************************* | |
* Function Declarations * | |
******************************************************************************* | |
*/ | |
/* @brief Initializes the BT Controller in BLE mode, and Bluetooth Stack | |
* @note NVS Flash storage should be initialized prior to calling this | |
*/ | |
esp_err_t ble_init (void); | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment