[FL-1796] Disable bluetooth (#703)
* bt: add authentication for all characteristics * bt: app_ble cleanup * bt: add start and stop advertising API * bt: rework application with start and stop advertising API * bt: support f7 target * bt: f7 target remove unused files * bt: stop advertising in bt debug application * bt: fix bt status bar update * bt: change bluetooth On Off order
This commit is contained in:
		| @@ -4,7 +4,6 @@ | ||||
| #include <stm32wbxx.h> | ||||
| #include <shci.h> | ||||
| #include <cmsis_os2.h> | ||||
| #include <app_ble.h> | ||||
| #include <gap.h> | ||||
|  | ||||
| void furi_hal_bt_init() { | ||||
| @@ -14,10 +13,22 @@ void furi_hal_bt_init() { | ||||
|     APPE_Init(); | ||||
| } | ||||
|  | ||||
| bool furi_hal_bt_start_app() { | ||||
| bool furi_hal_bt_init_app() { | ||||
|     return gap_init(); | ||||
| } | ||||
|  | ||||
| void furi_hal_bt_start_advertising() { | ||||
|     if(gap_get_state() == GapStateIdle) { | ||||
|         gap_start_advertising(); | ||||
|     } | ||||
| } | ||||
|  | ||||
| void furi_hal_bt_stop_advertising() { | ||||
|     if(furi_hal_bt_is_alive()) { | ||||
|         gap_stop_advertising(); | ||||
|     } | ||||
| } | ||||
|  | ||||
| void furi_hal_bt_dump_state(string_t buffer) { | ||||
|     BleGlueStatus status = APPE_Status(); | ||||
|     if (status == BleGlueStatusStarted) { | ||||
| @@ -41,7 +52,7 @@ void furi_hal_bt_dump_state(string_t buffer) { | ||||
| } | ||||
|  | ||||
| bool furi_hal_bt_is_alive() { | ||||
|     return APPE_Status() == BleGlueStatusStarted; | ||||
|     return gap_get_state() > GapStateIdle; | ||||
| } | ||||
|  | ||||
| bool furi_hal_bt_wait_startup() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user