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
pull/111/merge
yulong 2016-10-13 04:02:30 -04:00
rodzic 6a5f5400f0
commit 65445b21dd
4 zmienionych plików z 79 dodań i 1 usunięć

Wyświetl plik

@ -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)
{
}

Wyświetl plik

@ -0,0 +1,17 @@
/**
****************************************************************************************
*
* @file bt_profile_act.c
*
* @brief Application entry point
*
* Copyright (C) Espressif 2016
* Created by Yulong at 2016/10/13
*
*
****************************************************************************************
*/

Wyświetl plik

@ -13,6 +13,7 @@
*/
#include <stddef.h>
#include "bt_defs.h"
#include "fixed_queue.h"
#ifndef BT_PRF_TASK_H__

Wyświetl plik

@ -0,0 +1,18 @@
/**
****************************************************************************************
*
* @file bt_app_api.h
*
* @brief Application entry point
*
* Copyright (C) Espressif 2016
* Created by Yulong at 2016/10/13
*
*
****************************************************************************************
*/