component/bt: merge SDP client and SDP server example to a single demo

This commit is contained in:
wangmengyang
2016-11-01 11:54:01 +08:00
parent 124a673a78
commit a8b2608dd9
34 changed files with 2418 additions and 429 deletions

View File

@@ -8,6 +8,6 @@
typedef tBT_UUID esp_bt_uuid_t; /* tBT_UUID in "bt_types.h" */
typedef BD_ADDR esp_bd_addr_t;
typedef BD_ADDR esp_bd_addr_t; /* BD_ADDR in bt_types.h */
#endif /* __BT_API_COMMON_H__ */

View File

@@ -6,26 +6,11 @@
#include "esp_err.h"
#include "bt_api_common.h"
/*
#define ESP_OK 0
#define ESP_FAIL -1
#define ESP_ERR_NO_MEM 0x101
#define ESP_ERR_INVALID_ARG 0x102
#define ESP_ERR_INVALID_STATE 0x103
#define ESP_ERR_INVALID_SIZE 0x104
#define ESP_ERR_NOT_FOUND 0x105
*/
#define ESP_ERR_BT_GAP_BASE (0xf000) // TODO: move base address to esp_err.h
// #define ESP_ERR_BT_GAP_XXXX (ESP_ERR_BT_GAP_BASE + 0xYY)
#define ESP_ERR_BT_SDP_BASE (0xf100) // TODO: move base address to esp_err.h
enum {
BT_SCAN_MODE_NONE,
BT_SCAN_MODE_CONNECTABLE,
BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE
}; // enumerations of bt_scan_mode_t
};
typedef uint16_t bt_scan_mode_t;
esp_err_t esp_bt_gap_set_scan_mode(bt_scan_mode_t mode);

View File

@@ -55,8 +55,8 @@ esp_err_t esp_bt_sdp_remove_record_by_user(void *user_data);
/**********************************************************************************************/
/**********************************************************************************************/
/* API into SDP for local service database updates */
/* these APIs are indended to be called in callback function in the context of stack task,
/* API into SDP for local service database updates
* these APIs are indended to be called in callback function in the context of stack task,
* to handle BT_SDP_CREATE_RECORD_USER_EVT and BT_SDP_REMOVE_RECORD_USER_EVT
*/