mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
commponant bt:change bt_app_main to app_main
This commit is contained in:
parent
af9b08d863
commit
f68c8dd687
@ -28,7 +28,7 @@
|
||||
|
||||
#define WX_AIRSYNC_CFG 1
|
||||
#define BUT_PROFILE_CFG 0
|
||||
#define HIDD_LE_PROFILE_CFG 0
|
||||
#define HIDD_LE_PROFILE_CFG 1
|
||||
|
||||
/*
|
||||
* Type Definition
|
||||
|
@ -55,7 +55,7 @@ static bool app_cpu_started = false;
|
||||
static void do_global_ctors(void);
|
||||
static void main_task(void* args);
|
||||
extern void ets_setup_syscalls(void);
|
||||
extern void bt_app_main(void);
|
||||
extern void app_main(void);
|
||||
|
||||
extern int _bss_start;
|
||||
extern int _bss_end;
|
||||
@ -166,7 +166,7 @@ static void do_global_ctors(void)
|
||||
|
||||
static void main_task(void* args)
|
||||
{
|
||||
bt_app_main();
|
||||
app_main();
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
|
@ -256,7 +256,7 @@ static void bt_app_dm_upstreams_evt(UINT16 event, char *p_param)
|
||||
|
||||
#if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
|
||||
/* Enable local privacy */
|
||||
BTA_DmBleConfigLocalPrivacy(BLE_LOCAL_PRIVACY_ENABLED);
|
||||
//BTA_DmBleConfigLocalPrivacy(BLE_LOCAL_PRIVACY_ENABLED);
|
||||
do {
|
||||
const controller_t *controller = controller_get_interface();
|
||||
char bdstr[18];
|
||||
@ -374,7 +374,7 @@ static void bt_app_general_alarm_process(TIMER_LIST_ENT *p_tle)
|
||||
/*set connectable,discoverable, pairable and paired only modes of local device*/
|
||||
tBTA_DM_DISC disc_mode = BTA_DM_BLE_GENERAL_DISCOVERABLE;
|
||||
tBTA_DM_CONN conn_mode = BTA_DM_BLE_CONNECTABLE;
|
||||
//BTA_DmSetVisibility(disc_mode, conn_mode, (UINT8)BTA_DM_NON_PAIRABLE, (UINT8)BTA_DM_CONN_ALL);
|
||||
BTA_DmSetVisibility(disc_mode, conn_mode, (UINT8)BTA_DM_NON_PAIRABLE, (UINT8)BTA_DM_CONN_ALL);
|
||||
|
||||
gatts_server_test();
|
||||
//gattc_client_test();
|
||||
|
@ -1,6 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "bt.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "string.h"
|
||||
|
||||
|
||||
extern void bte_main_boot_entry(void *);
|
||||
@ -15,8 +19,9 @@ void pingTask(void *pvParameters)
|
||||
}
|
||||
}
|
||||
|
||||
void bt_app_main()
|
||||
void app_main()
|
||||
{
|
||||
bt_controller_init();
|
||||
xTaskCreatePinnedToCore(&pingTask, "pingTask", 2048, NULL, 5, NULL, 0);
|
||||
bt_app_task_start_up();
|
||||
bte_main_boot_entry(bt_app_core_start);
|
||||
|
Loading…
x
Reference in New Issue
Block a user