forked from espressif/esp-idf
component/bt : add cpp extern c
1. add cpp extern c 2. retab tab to 4 space
This commit is contained in:
@@ -21,6 +21,10 @@
|
|||||||
#include "bta_gatt_api.h"
|
#include "bta_gatt_api.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ESP_BLUFI_RECV_DATA_LEN_MAX (64+1)
|
#define ESP_BLUFI_RECV_DATA_LEN_MAX (64+1)
|
||||||
|
|
||||||
#define ESP_BLUFI_EVENT_INIT_FINISH 0
|
#define ESP_BLUFI_EVENT_INIT_FINISH 0
|
||||||
@@ -112,6 +116,8 @@ esp_err_t esp_blufi_profile_init(void);
|
|||||||
*/
|
*/
|
||||||
esp_err_t esp_blufi_profile_deinit(void);
|
esp_err_t esp_blufi_profile_deinit(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _ESP_BLUFI_API_ */
|
#endif /* _ESP_BLUFI_API_ */
|
||||||
|
@@ -18,6 +18,10 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/// Status Return Value
|
/// Status Return Value
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ESP_BT_STATUS_SUCCESS = 0, /* Successful operation. */
|
ESP_BT_STATUS_SUCCESS = 0, /* Successful operation. */
|
||||||
@@ -99,4 +103,8 @@ typedef enum {
|
|||||||
*/
|
*/
|
||||||
typedef void (* esp_profile_cb_t)(uint32_t event, void *param);
|
typedef void (* esp_profile_cb_t)(uint32_t event, void *param);
|
||||||
|
|
||||||
#endif ///__ESP_BT_DEFS_H__
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __ESP_BT_DEFS_H__ */
|
||||||
|
@@ -18,6 +18,10 @@
|
|||||||
#include "btc_main.h"
|
#include "btc_main.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable bluetooth, must after esp_init_bluetooth()
|
* @brief Enable bluetooth, must after esp_init_bluetooth()
|
||||||
*
|
*
|
||||||
@@ -54,5 +58,8 @@ esp_err_t esp_init_bluetooth(void);
|
|||||||
*/
|
*/
|
||||||
esp_err_t esp_deinit_bluetooth(void);
|
esp_err_t esp_deinit_bluetooth(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ESP_BT_MAIN_H__ */
|
#endif /* __ESP_BT_MAIN_H__ */
|
||||||
|
@@ -21,6 +21,10 @@
|
|||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_bt_defs.h"
|
#include "esp_bt_defs.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/// GAP BLE callback event type
|
/// GAP BLE callback event type
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT = 0, /*!< When advertising data set complete, the event comes */
|
ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT = 0, /*!< When advertising data set complete, the event comes */
|
||||||
@@ -421,4 +425,8 @@ esp_err_t esp_ble_gap_set_device_name(const char *name);
|
|||||||
*/
|
*/
|
||||||
uint8_t *esp_ble_resolve_adv_data(uint8_t *adv_data, uint8_t type, uint8_t *length);
|
uint8_t *esp_ble_resolve_adv_data(uint8_t *adv_data, uint8_t type, uint8_t *length);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ESP_GAP_BLE_API_H__ */
|
#endif /* __ESP_GAP_BLE_API_H__ */
|
||||||
|
@@ -17,6 +17,10 @@
|
|||||||
|
|
||||||
#include "esp_bt_defs.h"
|
#include "esp_bt_defs.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/// Attribute write data type from the client
|
/// Attribute write data type from the client
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ESP_GATT_PREP_WRITE_CANCEL = 0x00, /*!< Prepare write cancel */
|
ESP_GATT_PREP_WRITE_CANCEL = 0x00, /*!< Prepare write cancel */
|
||||||
@@ -109,11 +113,11 @@ typedef struct {
|
|||||||
* @brief Gatt authentication request type
|
* @brief Gatt authentication request type
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ESP_GATT_AUTH_REQ_NONE = 0,
|
ESP_GATT_AUTH_REQ_NONE = 0,
|
||||||
ESP_GATT_AUTH_REQ_NO_MITM = 1, /* unauthenticated encryption */
|
ESP_GATT_AUTH_REQ_NO_MITM = 1, /* unauthenticated encryption */
|
||||||
ESP_GATT_AUTH_REQ_MITM = 2, /* authenticated encryption */
|
ESP_GATT_AUTH_REQ_MITM = 2, /* authenticated encryption */
|
||||||
ESP_GATT_AUTH_REQ_SIGNED_NO_MITM = 3,
|
ESP_GATT_AUTH_REQ_SIGNED_NO_MITM = 3,
|
||||||
ESP_GATT_AUTH_REQ_SIGNED_MITM = 4,
|
ESP_GATT_AUTH_REQ_SIGNED_MITM = 4,
|
||||||
} esp_gatt_auth_req_t;
|
} esp_gatt_auth_req_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -170,4 +174,8 @@ typedef enum {
|
|||||||
|
|
||||||
typedef uint32_t esp_gatt_if_t; /*!< Gatt interface type, different application on GATT client use different gatt_if */
|
typedef uint32_t esp_gatt_if_t; /*!< Gatt interface type, different application on GATT client use different gatt_if */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ESP_GATT_DEFS_H__ */
|
#endif /* __ESP_GATT_DEFS_H__ */
|
||||||
|
7
components/bt/bluedroid/api/include/esp_gattc_api.h
Executable file → Normal file
7
components/bt/bluedroid/api/include/esp_gattc_api.h
Executable file → Normal file
@@ -20,6 +20,10 @@
|
|||||||
#include "esp_gatt_defs.h"
|
#include "esp_gatt_defs.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/// GATT Client callback function events
|
/// GATT Client callback function events
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ESP_GATTC_REG_EVT = 0, /*!< When GATT client is registered, the event comes */
|
ESP_GATTC_REG_EVT = 0, /*!< When GATT client is registered, the event comes */
|
||||||
@@ -572,5 +576,8 @@ esp_gatt_status_t esp_ble_gattc_unregister_for_notify (esp_gatt_if_t gatt_if,
|
|||||||
esp_gatt_srvc_id_t *srvc_id,
|
esp_gatt_srvc_id_t *srvc_id,
|
||||||
esp_gatt_id_t *char_id);
|
esp_gatt_id_t *char_id);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ESP_GATTC_API_H__ */
|
#endif /* __ESP_GATTC_API_H__ */
|
||||||
|
@@ -21,6 +21,10 @@
|
|||||||
#include "bta_gatt_api.h"
|
#include "bta_gatt_api.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/// GATT Server callback function events
|
/// GATT Server callback function events
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ESP_GATTS_REG_EVT = 0, /*!< When register application id, the event comes */
|
ESP_GATTS_REG_EVT = 0, /*!< When register application id, the event comes */
|
||||||
@@ -458,5 +462,8 @@ esp_err_t esp_ble_gatts_open(esp_gatt_if_t gatt_if, esp_bd_addr_t remote_bda, bo
|
|||||||
*/
|
*/
|
||||||
esp_err_t esp_ble_gatts_close(uint16_t conn_id);
|
esp_err_t esp_ble_gatts_close(uint16_t conn_id);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ESP_GATTS_API_H__ */
|
#endif /* __ESP_GATTS_API_H__ */
|
||||||
|
Reference in New Issue
Block a user