[FL-580] Prepare BLE for certification (#376)

* api-hal-bt: separate bt init to core init and app start

* bt: add continuous TX and RX tests

* bt: finish rx test on Back button click

* api-hal-bt: check core 2 started, same f4 and f5 implementation

* bt: refactoring, move hopping test logic to main thread

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
gornekich
2021-03-11 12:31:07 +03:00
committed by GitHub
parent b920248693
commit 0af6c9882e
13 changed files with 601 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
#include "main.h"
#include "app_entry.h"
#include "app_common.h"
#include "dbg_trace.h"
#include "ble.h"
@@ -158,7 +159,11 @@ bool APP_BLE_Init() {
// Register the hci transport layer to handle BLE User Asynchronous Events
HciUserEvtProcessId = osThreadNew(HciUserEvtProcess, NULL, &HciUserEvtProcess_attr);
// Starts the BLE Stack on CPU2
if (SHCI_C2_BLE_Init( &ble_init_cmd_packet ) != SHCI_Success) {
return (SHCI_C2_BLE_Init( &ble_init_cmd_packet ) == SHCI_Success);
}
bool APP_BLE_Start() {
if (APPE_Status() != BleGlueStatusStarted) {
return false;
}
// Initialization of HCI & GATT & GAP layer

View File

@@ -18,6 +18,7 @@ typedef enum {
} APP_BLE_ConnStatus_t;
bool APP_BLE_Init();
bool APP_BLE_Start();
APP_BLE_ConnStatus_t APP_BLE_Get_Server_Connection_Status();