forked from espressif/esp-idf
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/btdm_common_api' into 'master'
component/bt : add bt device api 1. add get bd_addr function later, will add other functions reference with bluetooth device. See merge request !380
- Loading branch information
Showing
6 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
|
||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
|
||
#include "esp_bt_device.h" | ||
#include "controller.h" | ||
|
||
const uint8_t *esp_bt_dev_get_address(void) | ||
{ | ||
return controller_get_interface()->get_address()->address; | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
|
||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef __ESP_BT_DEVICE_H__ | ||
#define __ESP_BT_DEVICE_H__ | ||
|
||
#include <stdint.h> | ||
#include <stdbool.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* | ||
* @brief Get bluetooth device address. Must use after "esp_bluedroid_enable". | ||
* | ||
* @return bluetooth device address (six bytes) | ||
*/ | ||
const uint8_t *esp_bt_dev_get_address(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
|
||
#endif /* __ESP_BT_DEVICE_H__ */ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ BT COMMON | |
|
||
Bluetooth DEFINE <esp_bt_defs> | ||
Bluetooth MAIN <esp_bt_main> | ||
Bluetooth DEVICE <esp_bt_device> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
BT DEVICE APIs | ||
=============== | ||
|
||
Overview | ||
-------- | ||
|
||
Bluetooth device reference APIs. | ||
|
||
`Instructions`_ | ||
|
||
Application Example | ||
------------------- | ||
|
||
`Instructions`_ | ||
|
||
.. _Instructions: template.html | ||
|
||
|
||
API Reference | ||
------------- | ||
|
||
Header Files | ||
^^^^^^^^^^^^ | ||
|
||
* `bt/bluedroid/api/include/esp_bt_device.h <https://github.com/espressif/esp-idf/blob/master/components/bt/bluedroid/api/include/esp_bt_device.h>`_ | ||
|
||
|
||
Macros | ||
^^^^^^ | ||
|
||
|
||
Type Definitions | ||
^^^^^^^^^^^^^^^^ | ||
|
||
|
||
Enumerations | ||
^^^^^^^^^^^^ | ||
|
||
|
||
Structures | ||
^^^^^^^^^^ | ||
|
||
|
||
Functions | ||
^^^^^^^^^ | ||
|
||
.. doxygenfunction:: esp_bt_dev_get_address | ||
|
This file contains 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