kopia lustrzana https://github.com/espressif/esp-idf
commponent bt:1.add bt_prf_act.c file for the state machine
2.add the bt_app_api.h file 3.modified the bt_prf_task.c==>added the free & start task functionpull/111/merge
rodzic
6a5f5400f0
commit
65445b21dd
|
@ -66,7 +66,49 @@ void bt_prf_task_start_up(void)
|
|||
fixed_queue_register_dequeue(bt_profile_msg_queue, bt_profile_msg_ready);
|
||||
}
|
||||
|
||||
|
||||
void btu_task_shut_down(void)
|
||||
{
|
||||
fixed_queue_unregister_dequeue(bt_profile_msg_queue);
|
||||
|
||||
bt_prf_free_core();
|
||||
}
|
||||
|
||||
|
||||
void bt_prf_StartUp(void)
|
||||
{
|
||||
bt_profile_msg_queue = fixed_queue_new(SIZE_MAX);
|
||||
if (bt_profile_msg_queue == NULL)
|
||||
goto error_exit;
|
||||
|
||||
return;
|
||||
|
||||
error_exit:;
|
||||
LOG_ERROR("%s Unable to allocate resources for bt_workqueue\n", __func__);
|
||||
bt_prf_ShutDown();
|
||||
|
||||
}
|
||||
|
||||
void bt_prf_ShutDown(void)
|
||||
{
|
||||
|
||||
btu_task_shut_down();
|
||||
|
||||
//thread_free(bt_workqueue_thread);
|
||||
vTaskDelete(xProfileTaskHandle);
|
||||
vQueueDelete(xProfileQueue);
|
||||
|
||||
bt_profile_msg_queue = NULL;
|
||||
|
||||
// bt_workqueue_thread = NULL;
|
||||
xProfileTaskHandle = NULL;
|
||||
xProfileQueue = 0;
|
||||
}
|
||||
|
||||
|
||||
void bt_prf_free_core(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
****************************************************************************************
|
||||
*
|
||||
* @file bt_profile_act.c
|
||||
*
|
||||
* @brief Application entry point
|
||||
*
|
||||
* Copyright (C) Espressif 2016
|
||||
* Created by Yulong at 2016/10/13
|
||||
*
|
||||
*
|
||||
****************************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include "bt_defs.h"
|
||||
#include "fixed_queue.h"
|
||||
|
||||
#ifndef BT_PRF_TASK_H__
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
****************************************************************************************
|
||||
*
|
||||
* @file bt_app_api.h
|
||||
*
|
||||
* @brief Application entry point
|
||||
*
|
||||
* Copyright (C) Espressif 2016
|
||||
* Created by Yulong at 2016/10/13
|
||||
*
|
||||
*
|
||||
****************************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
Ładowanie…
Reference in New Issue