From 993287af6132924f952d2368d45fec2882e79a8b Mon Sep 17 00:00:00 2001 From: snake Date: Thu, 22 Sep 2016 16:40:31 +0800 Subject: [PATCH 1/8] add btdm_controller 1st --- components/bt/bt.c | 117 +++++++++++++++++++++++++++++ components/bt/component.mk | 25 ++++++ components/bt/include/bt.h | 30 ++++++++ components/bt/lib/libbtdm_app.a | Bin 0 -> 61822 bytes components/esp32/cpu_start.c | 8 +- components/esp32/include/soc/soc.h | 6 +- components/esp32/lib | 2 +- 7 files changed, 183 insertions(+), 5 deletions(-) create mode 100644 components/bt/bt.c create mode 100644 components/bt/component.mk create mode 100644 components/bt/include/bt.h create mode 100644 components/bt/lib/libbtdm_app.a diff --git a/components/bt/bt.c b/components/bt/bt.c new file mode 100644 index 0000000000..4b623ca20f --- /dev/null +++ b/components/bt/bt.c @@ -0,0 +1,117 @@ +// 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 +#include +#include + +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "freertos/queue.h" +#include "freertos/semphr.h" +#include "freertos/xtensa_api.h" +#include "freertos/portmacro.h" +#include "esp_types.h" +#include "esp_system.h" +#include "esp_intr.h" +#include "esp_attr.h" +#include "bt.h" + +#if CONFIG_BT_ENABLED + +static bt_app_startup_cb_t app_startup_cb; +static void *app_startup_ctx; + +#define BT_DEBUG(...) +#define BT_API_CALL_CHECK(info, api_call, ret) \ +do{\ + esp_err_t __err = (api_call);\ + if ((ret) != __err) {\ + BT_DEBUG("%s %d %s ret=%d\n", __FUNCTION__, __LINE__, (info), __err);\ + return __err;\ + }\ +} while(0) + +extern void btdm_controller_init(void); +extern void API_osi_funcs_register(void *osi_funcs); + +struct osi_funcs_t { + xt_handler (*_set_isr)(int n, xt_handler f, void *arg); + void (*_ints_on)(unsigned int mask); + void (*_interrupt_disable)(void); + void (*_interrupt_restore)(void); + void (*_task_yield)(void); + void *(*_semphr_create)(uint32_t max, uint32_t init); + void *(*_semphr_give_from_isr)(void *semphr, void *hptw); + void *(*_semphr_take)(void *semphr, uint32_t block_time); + esp_err_t (* _read_efuse_mac)(uint8_t mac[6]); +}; + +static portMUX_TYPE global_int_mux = portMUX_INITIALIZER_UNLOCKED; + +static inline void IRAM_ATTR interrupt_disable(void) +{ + portENTER_CRITICAL(&global_int_mux); +} + +static inline void IRAM_ATTR interrupt_restore(void) +{ + portEXIT_CRITICAL(&global_int_mux); +} + +static inline void *IRAM_ATTR semphr_take_wrapped(void *semphr, uint32_t block_time) +{ + return (void *)xSemaphoreTake(semphr, block_time); +} + +static struct osi_funcs_t osi_funcs = { + ._set_isr = xt_set_interrupt_handler, + ._ints_on = xt_ints_on, + ._interrupt_disable = interrupt_disable, + ._interrupt_restore = interrupt_restore, + ._task_yield = vPortYield, + ._semphr_create = xQueueCreateCountingSemaphore, + ._semphr_give_from_isr = (void *)xQueueGiveFromISR, + ._semphr_take = semphr_take_wrapped, + ._read_efuse_mac = system_efuse_read_mac, +}; + +static void bt_controller_task(void *pvParam) +{ + API_osi_funcs_register(&osi_funcs); + btdm_controller_init(); +} + + +static void bt_init_task(void *pvParameters) +{ + xTaskCreatePinnedToCore(bt_controller_task, "btControllerTask", BT_CONTROLLER_TASK_STACK_SIZE, NULL, BT_CONTROLLER_TASK_PRIO, NULL, 0); + + if (app_startup_cb) + app_startup_cb(app_startup_ctx); + + vTaskDelete(NULL); +} + + +esp_err_t esp_bt_startup(bt_app_startup_cb_t cb, void *ctx) +{ + app_startup_cb = cb; + app_startup_ctx = ctx; + + xTaskCreatePinnedToCore(bt_init_task, "btInitTask", BT_INIT_TASK_STACK_SIZE, NULL, BT_INIT_TASK_PRIO, NULL, 0); + + return ESP_OK; +} +#endif diff --git a/components/bt/component.mk b/components/bt/component.mk new file mode 100644 index 0000000000..110d022672 --- /dev/null +++ b/components/bt/component.mk @@ -0,0 +1,25 @@ +# +# Component Makefile +# + +#COMPONENT_ADD_INCLUDEDIRS := + +CURRENT_DIR=$(IDF_PATH)/components/bt + +COMPONENT_ADD_INCLUDEDIRS := ./include + +CFLAGS += -Wno-error=unused-label -Wno-error=return-type -Wno-error=missing-braces -Wno-error=pointer-sign -Wno-error=parentheses + +LIBS := btdm_app + +COMPONENT_ADD_LDFLAGS := -lbt -L$(abspath lib) \ + $(addprefix -l,$(LIBS)) \ + $(LINKER_SCRIPTS) + + +ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS)) +$(COMPONENT_LIBRARY): $(ALL_LIB_FILES) + +COMPONENT_SRCDIRS := ./ + +include $(IDF_PATH)/make/component_common.mk diff --git a/components/bt/include/bt.h b/components/bt/include/bt.h new file mode 100644 index 0000000000..04bb466c45 --- /dev/null +++ b/components/bt/include/bt.h @@ -0,0 +1,30 @@ +#ifndef __BT_H__ +#define __BT_H__ + +#include "freertos/FreeRTOS.h" +#include "esp_err.h" + +#define BT_TASK_PRIO_MAX (configMAX_PRIORITIES) +#define BT_TASK_PRIO_MIN (0) + +/* bt init */ +#define BT_INIT_TASK_PRIO (BT_TASK_PRIO_MAX-1) +#define BT_INIT_TASK_STACK_SIZE (2048) +/* controller */ +#define BT_CONTROLLER_TASK_PRIO (BT_TASK_PRIO_MAX-3) +#define BT_CONTROLLER_TASK_STACK_SIZE (4096) + +typedef void (* bt_app_startup_cb_t)(void *param); + +esp_err_t esp_bt_startup(bt_app_startup_cb_t cb, void *ctx); + +typedef struct vhci_host_callback { + void (*notify_host_send_available)(void); + int (*notify_host_recv)(uint8_t *data, uint16_t len); +} vhci_host_callback_t; + +extern bool API_vhci_host_check_send_available(void); +extern void API_vhci_host_send_packet(uint8_t *data, uint16_t len); +extern void API_vhci_host_register_callback(const vhci_host_callback_t *callback); + +#endif /* __BT_H__ */ diff --git a/components/bt/lib/libbtdm_app.a b/components/bt/lib/libbtdm_app.a new file mode 100644 index 0000000000000000000000000000000000000000..4c93a93b0fcdbb1548a7bf6b00c616a3a645a944 GIT binary patch literal 61822 zcmY$iNi0gvu;bEKKm~>-<|d}briO-w3JL~bDP&SX!O+au0xYbMz{SA8;LE_kwu*XK zn~8zJM2UgHauRMF)W^U8!twVQ7(h6+kAWfc6az!G%SB1QQi1yGUHqN03|!-~q| za}zW3AbOJX^Gb^Hb8=FPAliz`GYdej%dL!0%Fi!hNX<-(Pb|n}D2fNmfVkG5f$dCA34HxZcwE@7N5$VtJjB{x1JITM#u zX-Ou!tJ8DxlM-{{GxJK~i%SxVN*IdbQH1gfP(@NQixZP_KyiemtSGg(B)cXjtHYtjx_%Da}bOhWZ2~ zQjn8|jR#7_X&}Rrph>YPz6i|ENrgoRgb&W(&=4<5Gm1|wE+|SZF3yCR3dwXu@x_(J z$$2H9AjvFYC`-#pEY66}O$B9l2peopQ9P8BlA2eNnO4aF6G$yeECvMxL>iW!Av|zG zF9XF-acW))1DI8mnp_59K{8KT8Zr-5YJinNEd{eNvQbeySR9lqKqU{DlaXIs0?8Qh zAj{$t%Mvqlz%hra1T0yQn4Fzj0*)$#W>{3kCnx6QBqb(iGl1$Ta51Bo53a0WHI#t` zY7J#*U|?oqqM%@D1R_CoR03DMtB)HaBO?P0Ffzn3Ab1Q6YZMq57?>FtOuz~>7{nNa z8O$6Rc$j2AfJHz=Km$WUNCQKHM*~9wh!4YNjtqg{|MT!fu&!keQcZQ(qHy4j!UI-@ ziJ$*BEx*7cbwGh(B`0@BEN7U-|Hk+KYhE5uVDRKYa!e#g<8Kh{$4J;f$@db)EkU78qPXrsW zg2TYz%Y<116DEVy&*W(Q{-4Ja90wC-K}05g23ZC6(hLqBB?V28uqFq{U`9qz+EDxl zjR7-923^L+zyB394k##m0Vx25JOe{?R8*9$jg1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_HNyOm*dRX04WI^DG*lc^Z-e+CaZvh9L=p$D z$!CK!p5{WuK@F*;P&TOX1ZsT2!hZu)93%!}!@?h2jzP;VP&vg2WrNZgj16vlL&ZU9 z9wrXz48ho-aV8iW-1dN~2aN;4#KCrf3PxCG2FeDT4`qWoRlCDcst+Fd9c zG-eMoA2db}V}r^;7#mc^!Pubm4P%4a889}e9EPz$uYaC(X;I+F@aZuiYiG#{>7#q~C zgRw#7IE)Qy-@(}6wYyMrz-xD*Y|uJRn3^4+juBM+2on1O5*t(>z|@1zv4pX|AgKW@ zZ-R+~_PM~=ptCk%Y!zk(1{m7_iEV?#_CR8XAh8pW*r2>d3j<6D zY{>u{T)?FcWClnVsFMj|!+I|0=7Hou>OgrLRNf$~n*$xo1j)nf1&w!u^nm7eK;j_t zKpkQb8-zh}APnkQf@qlgKy@mtLkLm_GY=#VVuQ*hkoXxc$leOjT3nD`kQ}If2DRNl z=7HP^Qm4m^eeH1^bX*an288pOA?G51*dPot14M(`UobX^znqzY0aT8G*dPp(1C3dO z+yHZ5ivZ-TB9Qx#$GdBxgDW7tApD-0fguMLm`HMz>% literal 0 HcmV?d00001 diff --git a/components/esp32/cpu_start.c b/components/esp32/cpu_start.c index 85f4ace512..45a4bcec3c 100644 --- a/components/esp32/cpu_start.c +++ b/components/esp32/cpu_start.c @@ -48,6 +48,9 @@ static void IRAM_ATTR call_user_start_cpu1(); static void IRAM_ATTR user_start_cpu1(void); extern void ets_setup_syscalls(void); extern esp_err_t app_main(void *ctx); +#if CONFIG_BT_ENABLED +extern void bt_app_main(void *param); +#endif extern int _bss_start; extern int _bss_end; @@ -161,7 +164,10 @@ void user_start_cpu0(void) #if CONFIG_WIFI_ENABLED && CONFIG_WIFI_AUTO_STARTUP #include "esp_wifi.h" - esp_wifi_startup(app_main, NULL); + esp_wifi_startup(app_main, NULL); +#elif CONFIG_BT_ENABLED +#include "bt.h" + esp_bt_startup(bt_app_main, NULL); #else app_main(NULL); #endif diff --git a/components/esp32/include/soc/soc.h b/components/esp32/include/soc/soc.h index 0b8cdfecba..4ffdfb069e 100755 --- a/components/esp32/include/soc/soc.h +++ b/components/esp32/include/soc/soc.h @@ -260,14 +260,14 @@ /************************************************************************************************************* * Intr num Level Type PRO CPU usage APP CPU uasge * 0 1 extern level WMAC Reserved - * 1 1 extern level BT/BLE Host Reserved + * 1 1 extern level BT/BLE Host VHCI Reserved * 2 1 extern level FROM_CPU FROM_CPU * 3 1 extern level TG0_WDT Reserved * 4 1 extern level WBB - * 5 1 extern level Reserved + * 5 1 extern level BT Controller * 6 1 timer FreeRTOS Tick(L1) FreeRTOS Tick(L1) * 7 1 software Reserved Reserved - * 8 1 extern level Reserved + * 8 1 extern level BLE Controller * 9 1 extern level * 10 1 extern edge Internal Timer * 11 3 profiling diff --git a/components/esp32/lib b/components/esp32/lib index 9f26b9a190..ab3c510e51 160000 --- a/components/esp32/lib +++ b/components/esp32/lib @@ -1 +1 @@ -Subproject commit 9f26b9a190e6a6ca42656685df9287253badfa46 +Subproject commit ab3c510e51f312d919df6830efbc04c6de9cfd2a From db407074f12923e70297ffca52a523e080b824b4 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 22 Sep 2016 17:52:07 +0800 Subject: [PATCH 2/8] components/bt: remove binary library --- components/bt/lib/libbtdm_app.a | Bin 61822 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 components/bt/lib/libbtdm_app.a diff --git a/components/bt/lib/libbtdm_app.a b/components/bt/lib/libbtdm_app.a deleted file mode 100644 index 4c93a93b0fcdbb1548a7bf6b00c616a3a645a944..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 61822 zcmY$iNi0gvu;bEKKm~>-<|d}briO-w3JL~bDP&SX!O+au0xYbMz{SA8;LE_kwu*XK zn~8zJM2UgHauRMF)W^U8!twVQ7(h6+kAWfc6az!G%SB1QQi1yGUHqN03|!-~q| za}zW3AbOJX^Gb^Hb8=FPAliz`GYdej%dL!0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iEV?#_CR8XAh8pW*r2>d3j<6D zY{>u{T)?FcWClnVsFMj|!+I|0=7Hou>OgrLRNf$~n*$xo1j)nf1&w!u^nm7eK;j_t zKpkQb8-zh}APnkQf@qlgKy@mtLkLm_GY=#VVuQ*hkoXxc$leOjT3nD`kQ}If2DRNl z=7HP^Qm4m^eeH1^bX*an288pOA?G51*dPot14M(`UobX^znqzY0aT8G*dPp(1C3dO z+yHZ5ivZ-TB9Qx#$GdBxgDW7tApD-0fguMLm`HMz>% From bc256cc36d2d5cf9f3a2a5968063db2d8160a30b Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 22 Sep 2016 17:54:19 +0800 Subject: [PATCH 3/8] components/bt: add library as submodule --- .gitmodules | 3 +++ components/bt/lib | 1 + 2 files changed, 4 insertions(+) create mode 160000 components/bt/lib diff --git a/.gitmodules b/.gitmodules index 1a0e6b94f1..df40848261 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "components/esptool_py/esptool"] path = components/esptool_py/esptool url = https://github.com/themadinventor/esptool.git +[submodule "components/bt/lib"] + path = components/bt/lib + url = https://github.com/espressif/esp32-bt-lib.git diff --git a/components/bt/lib b/components/bt/lib new file mode 160000 index 0000000000..3bee5393a9 --- /dev/null +++ b/components/bt/lib @@ -0,0 +1 @@ +Subproject commit 3bee5393a9dd84f53b7b28d5cb2479649f2cf838 From c6e1d0b30a0ded74459b211cf14772cbab9904a5 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 22 Sep 2016 18:36:23 +0800 Subject: [PATCH 4/8] Kconfig: make WiFi and BT mutually exclusive Also move memory map options from top-level Kconfig to esp32/Kconfig. --- Kconfig | 32 ---------------------- components/bt/Kconfig | 26 +++++++++--------- components/esp32/Kconfig | 58 +++++++++++++++++++++++++++++++++++++--- 3 files changed, 68 insertions(+), 48 deletions(-) diff --git a/Kconfig b/Kconfig index 58ce77b2b5..73770a79a6 100644 --- a/Kconfig +++ b/Kconfig @@ -19,38 +19,6 @@ config PYTHON help The executable name/path that is used to run python. On some systems Python 2.x may need to be invoked as python2. - -config MEMMAP_BT - bool "Reserve space for Bluetooth stack" - default "n" - help - The Bluetooth stack uses memory that cannot be used as generic memory anymore. This - reserves the space for that within the memory map of the compiled binary. - -config MEMMAP_SMP - bool "Reserve memory for two cores" - default "y" - help - The ESP32 contains two cores. If you plan to only use one, you can disable this item - to save some memory. (ToDo: Make this automatically depend on unicore support) - -config MEMMAP_TRACEMEM - bool "Use TRAX tracing feature" - default "n" - help - The ESP32 contains a feature which allows you to trace the execution path the processor - has taken through the program. This is stored in a chunk of 32K (16K for single-processor) - of memory that can't be used for general purposes anymore. Disable this if you do not know - what this is. - -config MEMMAP_SPISRAM - bool "Use external SPI SRAM chip as main memory" - default "n" - help - The ESP32 can control an external SPI SRAM chip, adding the memory it contains to the - main memory map. Enable this if you have this hardware and want to use it in the same - way as on-chip RAM. - endmenu source "$COMPONENT_KCONFIGS_PROJBUILD" diff --git a/components/bt/Kconfig b/components/bt/Kconfig index 90ef1f3eb6..ab163efc61 100644 --- a/components/bt/Kconfig +++ b/components/bt/Kconfig @@ -3,21 +3,21 @@ visible if MEMMAP_BT config BT_ENABLED - bool "Enable low-level BT stack" - depends on MEMMAP_BT + bool + depends on ESP32_ENABLE_STACK_BT help This compiles in the low-level BT stack. -config BT_BTLE - bool "Enable BTLE" - depends on BT_ENABLED - help - This compiles BTLE support - -config BT_BT - bool "Enable classic BT" - depends on BT_ENABLED - help - This enables classic BT support +#config BT_BTLE +# bool "Enable BTLE" +# depends on BT_ENABLED +# help +# This compiles BTLE support +# +#config BT_BT +# bool "Enable classic BT" +# depends on BT_ENABLED +# help +# This enables classic BT support endmenu diff --git a/components/esp32/Kconfig b/components/esp32/Kconfig index 0ad32756e8..c649a0e317 100644 --- a/components/esp32/Kconfig +++ b/components/esp32/Kconfig @@ -20,13 +20,65 @@ config ESP32_DEFAULT_CPU_FREQ_MHZ default 160 if ESP32_DEFAULT_CPU_FREQ_160 default 240 if ESP32_DEFAULT_CPU_FREQ_240 -config WIFI_ENABLED - bool "Enable low-level WiFi stack" +choice ESP32_WIFI_OR_BT + prompt "Select stack to enable (WiFi or BT)" + default ESP32_ENABLE_WIFI + help + Temporarily, WiFi and BT stacks can not be used at the same time. + Select which stack to enable. + +config ESP32_ENABLE_STACK_WIFI + bool "WiFi" + select WIFI_ENABLED if ESP32_ENABLE_STACK_WIFI +config ESP32_ENABLE_STACK_BT + bool "BT" + select MEMMAP_BT if ESP32_ENABLE_STACK_BT + select BT_ENABLED if ESP32_ENABLE_STACK_BT +config ESP32_ENABLE_STACK_NONE + bool "None" +endchoice + +config MEMMAP_BT + bool + depends on ESP32_ENABLE_STACK_BT + help + The Bluetooth stack uses memory that cannot be used as generic memory anymore. This + reserves the space for that within the memory map of the compiled binary. + This option is required to enable BT stack. + Temporarily, this option is not compatible with WiFi stack. + +config MEMMAP_SMP + bool "Reserve memory for two cores" default "y" + help + The ESP32 contains two cores. If you plan to only use one, you can disable this item + to save some memory. (ToDo: Make this automatically depend on unicore support) + +config MEMMAP_TRACEMEM + bool "Use TRAX tracing feature" + default "n" + help + The ESP32 contains a feature which allows you to trace the execution path the processor + has taken through the program. This is stored in a chunk of 32K (16K for single-processor) + of memory that can't be used for general purposes anymore. Disable this if you do not know + what this is. + +config MEMMAP_SPISRAM + bool "Use external SPI SRAM chip as main memory" + default "n" + help + The ESP32 can control an external SPI SRAM chip, adding the memory it contains to the + main memory map. Enable this if you have this hardware and want to use it in the same + way as on-chip RAM. + +config WIFI_ENABLED + bool + default "y" + depends on ESP32_ENABLE_STACK_WIFI help This compiles in the low-level WiFi stack. - Temporarily, this option requires that FreeRTOS runs in single core mode. + Temporarily, this option is not compatible with BT stack. config WIFI_AUTO_STARTUP bool "Start WiFi with system startup" From 5383af1e2edc4ae955d84e25c4da81d3904fbf88 Mon Sep 17 00:00:00 2001 From: wangmengyang Date: Thu, 22 Sep 2016 21:15:54 +0800 Subject: [PATCH 5/8] BLE ADV Demo --- examples/04_ble_adv/LICENSE | 202 +++++++++++++++++++++++++ examples/04_ble_adv/Makefile | 9 ++ examples/04_ble_adv/README.rst | 6 + examples/04_ble_adv/main/app_bt.c | 203 ++++++++++++++++++++++++++ examples/04_ble_adv/main/component.mk | 10 ++ 5 files changed, 430 insertions(+) create mode 100644 examples/04_ble_adv/LICENSE create mode 100644 examples/04_ble_adv/Makefile create mode 100644 examples/04_ble_adv/README.rst create mode 100755 examples/04_ble_adv/main/app_bt.c create mode 100644 examples/04_ble_adv/main/component.mk diff --git a/examples/04_ble_adv/LICENSE b/examples/04_ble_adv/LICENSE new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/examples/04_ble_adv/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/examples/04_ble_adv/Makefile b/examples/04_ble_adv/Makefile new file mode 100644 index 0000000000..cea72c6f02 --- /dev/null +++ b/examples/04_ble_adv/Makefile @@ -0,0 +1,9 @@ +# +# This is a project Makefile. It is assumed the directory this Makefile resides in is a +# project subdirectory. +# + +PROJECT_NAME := ble_adv + +include $(IDF_PATH)/make/project.mk + diff --git a/examples/04_ble_adv/README.rst b/examples/04_ble_adv/README.rst new file mode 100644 index 0000000000..5e9ff15c5c --- /dev/null +++ b/examples/04_ble_adv/README.rst @@ -0,0 +1,6 @@ +ESP-IDF ble_advertising app +==================== + +This is a BLE advertising demo with virtual HCI interface. Send Reset/ADV_PARAM/ADV_DATA/ADV_ENABLE HCI command for BLE advertising. + + diff --git a/examples/04_ble_adv/main/app_bt.c b/examples/04_ble_adv/main/app_bt.c new file mode 100755 index 0000000000..8449accd64 --- /dev/null +++ b/examples/04_ble_adv/main/app_bt.c @@ -0,0 +1,203 @@ +#include +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "bt.h" +#include + +#define HCI_H4_CMD_PREAMBLE_SIZE (4) + +/* HCI Command opcode group field(OGF) */ +#define HCI_GRP_HOST_CONT_BASEBAND_CMDS (0x03 << 10) /* 0x0C00 */ +#define HCI_GRP_BLE_CMDS (0x08 << 10) + +#define HCI_RESET (0x0003 | HCI_GRP_HOST_CONT_BASEBAND_CMDS) +#define HCI_BLE_WRITE_ADV_ENABLE (0x000A | HCI_GRP_BLE_CMDS) +#define HCI_BLE_WRITE_ADV_PARAMS (0x0006 | HCI_GRP_BLE_CMDS) +#define HCI_BLE_WRITE_ADV_DATA (0x0008 | HCI_GRP_BLE_CMDS) + +#define HCIC_PARAM_SIZE_WRITE_ADV_ENABLE (1) +#define HCIC_PARAM_SIZE_BLE_WRITE_ADV_PARAMS (15) +#define HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA (31) + +#define BD_ADDR_LEN (6) /* Device address length */ +typedef uint8_t bd_addr_t[BD_ADDR_LEN]; /* Device address */ + +#define UINT16_TO_STREAM(p, u16) {*(p)++ = (uint8_t)(u16); *(p)++ = (uint8_t)((u16) >> 8);} +#define UINT8_TO_STREAM(p, u8) {*(p)++ = (uint8_t)(u8);} +#define BDADDR_TO_STREAM(p, a) {int ijk; for (ijk = 0; ijk < BD_ADDR_LEN; ijk++) *(p)++ = (uint8_t) a[BD_ADDR_LEN - 1 - ijk];} +#define ARRAY_TO_STREAM(p, a, len) {int ijk; for (ijk = 0; ijk < len; ijk++) *(p)++ = (uint8_t) a[ijk];} + +enum { + H4_TYPE_COMMAND = 1, + H4_TYPE_ACL = 2, + H4_TYPE_SCO = 3, + H4_TYPE_EVENT = 4 +}; + +static uint8_t hci_cmd_buf[128]; + +/* + * @brief: BT controller callback function, used to notify the upper layer that + * controller is ready to receive command + */ +static void controller_rcv_pkt_ready(void) +{ + printf("controller rcv pkt ready\n"); +} + +/* + * @brief: BT controller callback function, to transfer data packet to upper + * controller is ready to receive command + */ +static int host_rcv_pkt(uint8_t *data, uint16_t len) +{ + printf("host rcv pkt: "); + for (uint16_t i=0; i 0) { + if (data_len > HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA) + data_len = HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA; + + UINT8_TO_STREAM (buf, data_len); + + ARRAY_TO_STREAM (buf, p_data, data_len); + } + return HCI_H4_CMD_PREAMBLE_SIZE + HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA + 1; +} + +static void hci_cmd_send_reset(void) +{ + uint16_t sz = make_cmd_reset (hci_cmd_buf); + API_vhci_host_send_packet(hci_cmd_buf, sz); +} + +static void hci_cmd_send_ble_adv_start(void) +{ + uint16_t sz = make_cmd_ble_set_adv_enable (hci_cmd_buf, 1); + API_vhci_host_send_packet(hci_cmd_buf, sz); +} + +static void hci_cmd_send_ble_set_adv_param(void) +{ + uint16_t adv_intv_min = 256; // 160ms + uint16_t adv_intv_max = 256; // 160ms + uint8_t adv_type = 0; // connectable undirected advertising (ADV_IND) + uint8_t own_addr_type = 0; // Public Device Address + uint8_t peer_addr_type = 0; // Public Device Address + uint8_t peer_addr[6] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85}; + uint8_t adv_chn_map = 0x07; // 37, 38, 39 + uint8_t adv_filter_policy = 0; // Process All Conn and Scan + + uint16_t sz = make_cmd_ble_set_adv_param(hci_cmd_buf, + adv_intv_min, + adv_intv_max, + adv_type, + own_addr_type, + peer_addr_type, + peer_addr, + adv_chn_map, + adv_filter_policy); + API_vhci_host_send_packet(hci_cmd_buf, sz); +} + +static void hci_cmd_send_ble_set_adv_data(void) +{ + char *adv_name = "ESP-BLE-HELLO"; + uint8_t name_len = (uint8_t)strlen(adv_name); + uint8_t adv_data[31] = {0x02, 0x01, 0x06, 0x0, 0x09}; + uint8_t adv_data_len; + + adv_data[3] = name_len + 1; + for (int i=0; i Date: Fri, 23 Sep 2016 10:48:55 +0800 Subject: [PATCH 6/8] 1. clean up the macro. 2. change component/bt/lib url to use new lib --- components/bt/bt.c | 28 ++-- components/bt/include/bt.h | 39 ++++-- components/bt/lib | 2 +- components/esp32/include/esp_task.h | 8 +- examples/04_ble_adv/LICENSE | 202 ---------------------------- examples/04_ble_adv/main/app_bt.c | 3 +- 6 files changed, 52 insertions(+), 230 deletions(-) delete mode 100644 examples/04_ble_adv/LICENSE diff --git a/components/bt/bt.c b/components/bt/bt.c index 4b623ca20f..efb6d34ee3 100644 --- a/components/bt/bt.c +++ b/components/bt/bt.c @@ -24,12 +24,18 @@ #include "freertos/portmacro.h" #include "esp_types.h" #include "esp_system.h" +#include "esp_task.h" #include "esp_intr.h" #include "esp_attr.h" #include "bt.h" #if CONFIG_BT_ENABLED +/* not for user call, so don't put to include file */ +extern void btdm_osi_funcs_register(void *osi_funcs); +extern void btdm_controller_init(void); + + static bt_app_startup_cb_t app_startup_cb; static void *app_startup_ctx; @@ -43,9 +49,6 @@ do{\ }\ } while(0) -extern void btdm_controller_init(void); -extern void API_osi_funcs_register(void *osi_funcs); - struct osi_funcs_t { xt_handler (*_set_isr)(int n, xt_handler f, void *arg); void (*_ints_on)(unsigned int mask); @@ -60,17 +63,17 @@ struct osi_funcs_t { static portMUX_TYPE global_int_mux = portMUX_INITIALIZER_UNLOCKED; -static inline void IRAM_ATTR interrupt_disable(void) +static void IRAM_ATTR interrupt_disable(void) { portENTER_CRITICAL(&global_int_mux); } -static inline void IRAM_ATTR interrupt_restore(void) +static void IRAM_ATTR interrupt_restore(void) { portEXIT_CRITICAL(&global_int_mux); } -static inline void *IRAM_ATTR semphr_take_wrapped(void *semphr, uint32_t block_time) +static void * IRAM_ATTR semphr_take_wrapper(void *semphr, uint32_t block_time) { return (void *)xSemaphoreTake(semphr, block_time); } @@ -83,23 +86,24 @@ static struct osi_funcs_t osi_funcs = { ._task_yield = vPortYield, ._semphr_create = xQueueCreateCountingSemaphore, ._semphr_give_from_isr = (void *)xQueueGiveFromISR, - ._semphr_take = semphr_take_wrapped, + ._semphr_take = semphr_take_wrapper, ._read_efuse_mac = system_efuse_read_mac, }; static void bt_controller_task(void *pvParam) { - API_osi_funcs_register(&osi_funcs); + btdm_osi_funcs_register(&osi_funcs); btdm_controller_init(); } static void bt_init_task(void *pvParameters) { - xTaskCreatePinnedToCore(bt_controller_task, "btControllerTask", BT_CONTROLLER_TASK_STACK_SIZE, NULL, BT_CONTROLLER_TASK_PRIO, NULL, 0); + xTaskCreatePinnedToCore(bt_controller_task, "btControllerTask", ESP_TASK_BT_CONTROLLER_STACK, NULL, ESP_TASK_BT_CONTROLLER_PRIO, NULL, 0); - if (app_startup_cb) - app_startup_cb(app_startup_ctx); + if (app_startup_cb) { + app_startup_cb(app_startup_ctx); + } vTaskDelete(NULL); } @@ -110,7 +114,7 @@ esp_err_t esp_bt_startup(bt_app_startup_cb_t cb, void *ctx) app_startup_cb = cb; app_startup_ctx = ctx; - xTaskCreatePinnedToCore(bt_init_task, "btInitTask", BT_INIT_TASK_STACK_SIZE, NULL, BT_INIT_TASK_PRIO, NULL, 0); + xTaskCreatePinnedToCore(bt_init_task, "btInitTask", ESP_TASK_BT_INIT_STACK, NULL, ESP_TASK_BT_INIT_PRIO, NULL, 0); return ESP_OK; } diff --git a/components/bt/include/bt.h b/components/bt/include/bt.h index 04bb466c45..991b9a13f5 100644 --- a/components/bt/include/bt.h +++ b/components/bt/include/bt.h @@ -4,27 +4,40 @@ #include "freertos/FreeRTOS.h" #include "esp_err.h" -#define BT_TASK_PRIO_MAX (configMAX_PRIORITIES) -#define BT_TASK_PRIO_MIN (0) - -/* bt init */ -#define BT_INIT_TASK_PRIO (BT_TASK_PRIO_MAX-1) -#define BT_INIT_TASK_STACK_SIZE (2048) -/* controller */ -#define BT_CONTROLLER_TASK_PRIO (BT_TASK_PRIO_MAX-3) -#define BT_CONTROLLER_TASK_STACK_SIZE (4096) - typedef void (* bt_app_startup_cb_t)(void *param); esp_err_t esp_bt_startup(bt_app_startup_cb_t cb, void *ctx); +/* @breif: vhci_host_callback + * used for vhci call host function to notify what host need to do + * + * notify_host_send_available: notify host can send packet to controller + * notify_host_recv: notify host that controller has packet send to host + */ typedef struct vhci_host_callback { + void (*notify_host_send_available)(void); int (*notify_host_recv)(uint8_t *data, uint16_t len); } vhci_host_callback_t; -extern bool API_vhci_host_check_send_available(void); -extern void API_vhci_host_send_packet(uint8_t *data, uint16_t len); -extern void API_vhci_host_register_callback(const vhci_host_callback_t *callback); +/* @breif: API_vhci_host_check_send_available + * used for check actively if the host can send packet to controller or not. + * return true for ready to send, false means cannot send packet + */ +bool API_vhci_host_check_send_available(void); + +/* @breif: API_vhci_host_send_packet + * host send packet to controller + * param data is the packet point, the param len is the packet length + * return void + */ +void API_vhci_host_send_packet(uint8_t *data, uint16_t len); + +/* @breif: API_vhci_host_register_callback + * register the vhci referece callback, the call back + * struct defined by vhci_host_callback structure. + * param is the vhci_host_callback type variable + */ +void API_vhci_host_register_callback(const vhci_host_callback_t *callback); #endif /* __BT_H__ */ diff --git a/components/bt/lib b/components/bt/lib index 3bee5393a9..6c9a6de656 160000 --- a/components/bt/lib +++ b/components/bt/lib @@ -1 +1 @@ -Subproject commit 3bee5393a9dd84f53b7b28d5cb2479649f2cf838 +Subproject commit 6c9a6de656262113a0aab63907d6871a64e00fae diff --git a/components/esp32/include/esp_task.h b/components/esp32/include/esp_task.h index 6d98bf1983..58458106fa 100644 --- a/components/esp32/include/esp_task.h +++ b/components/esp32/include/esp_task.h @@ -43,6 +43,11 @@ #define ESP_TASK_WPS_PRIO (ESP_TASK_PRIO_MIN + 2) #define ESP_TASK_WPS_STACK 2048 +/* Bt contoller Task */ +/* controller */ +#define ESP_TASK_BT_CONTROLLER_PRIO (ESP_TASK_PRIO_MAX - 1) +#define ESP_TASK_BT_CONTROLLER_STACK 4096 + /* idf task */ #define ESP_TASKD_EVENT_PRIO (ESP_TASK_PRIO_MAX - 5) #define ESP_TASKD_EVENT_STACK CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE @@ -50,5 +55,6 @@ #define ESP_TASK_WIFI_STARTUP_STACK 4096 #define ESP_TASK_TCPIP_PRIO (ESP_TASK_PRIO_MAX - 7) #define ESP_TASK_TCPIP_STACK 2048 - +#define ESP_TASK_BT_INIT_PRIO (ESP_TASK_PRIO_MAX - 7) +#define ESP_TASK_BT_INIT_STACK 2048 #endif diff --git a/examples/04_ble_adv/LICENSE b/examples/04_ble_adv/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/examples/04_ble_adv/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/examples/04_ble_adv/main/app_bt.c b/examples/04_ble_adv/main/app_bt.c index 8449accd64..011cf0c715 100755 --- a/examples/04_ble_adv/main/app_bt.c +++ b/examples/04_ble_adv/main/app_bt.c @@ -110,8 +110,9 @@ static uint16_t make_cmd_ble_set_adv_data(uint8_t *buf, uint8_t data_len, uint8_ memset(buf, 0, HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA); if (p_data != NULL && data_len > 0) { - if (data_len > HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA) + if (data_len > HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA) { data_len = HCIC_PARAM_SIZE_BLE_WRITE_ADV_DATA; + } UINT8_TO_STREAM (buf, data_len); From 7b79e4c9ae3ee550868c578e63aa1b1cb0e8e005 Mon Sep 17 00:00:00 2001 From: snake Date: Fri, 23 Sep 2016 11:02:46 +0800 Subject: [PATCH 7/8] add .h license header --- components/bt/include/bt.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/bt/include/bt.h b/components/bt/include/bt.h index 991b9a13f5..f8b7a8a0fd 100644 --- a/components/bt/include/bt.h +++ b/components/bt/include/bt.h @@ -1,3 +1,17 @@ +// 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 __BT_H__ #define __BT_H__ From 6bb5a93221c4a4a74d0e4fea719ce35493630749 Mon Sep 17 00:00:00 2001 From: snake Date: Fri, 23 Sep 2016 14:54:30 +0800 Subject: [PATCH 8/8] add 'extern C' in header files --- components/bt/include/bt.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/bt/include/bt.h b/components/bt/include/bt.h index f8b7a8a0fd..8511aabdf8 100644 --- a/components/bt/include/bt.h +++ b/components/bt/include/bt.h @@ -18,6 +18,11 @@ #include "freertos/FreeRTOS.h" #include "esp_err.h" +#ifdef __cplusplus +extern "C" { +#endif + + typedef void (* bt_app_startup_cb_t)(void *param); esp_err_t esp_bt_startup(bt_app_startup_cb_t cb, void *ctx); @@ -54,4 +59,8 @@ void API_vhci_host_send_packet(uint8_t *data, uint16_t len); */ void API_vhci_host_register_callback(const vhci_host_callback_t *callback); +#ifdef __cplusplus +} +#endif + #endif /* __BT_H__ */