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 function
This commit is contained in:
parent
6a5f5400f0
commit
65445b21dd
4 changed files with 79 additions and 1 deletions
|
@ -66,7 +66,49 @@ void bt_prf_task_start_up(void)
|
||||||
fixed_queue_register_dequeue(bt_profile_msg_queue, bt_profile_msg_ready);
|
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)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
17
components/bt/bluedroid/profiles/core/bt_profile_act.c
Normal file
17
components/bt/bluedroid/profiles/core/bt_profile_act.c
Normal file
|
@ -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 <stddef.h>
|
||||||
|
#include "bt_defs.h"
|
||||||
#include "fixed_queue.h"
|
#include "fixed_queue.h"
|
||||||
|
|
||||||
#ifndef BT_PRF_TASK_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
|
||||||
|
*
|
||||||
|
*
|
||||||
|
****************************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue