OVMS3-idf/components/bt/bluedroid/stack/gap/gap_api.c
Tian Hao adada3f67e component/bt : modify header files to avoid conflict
1. add the L1 include path with a prefix, such like osi/list.h, stack/a2d_api.h and etc.
2. modify component, only bluedroid/api/include/api is export to another component and application,
   other include path just for bluedroid used
3. put bluedroid/include into common/include/common, so the root directory of bluedroid have no include path.
4. modify doxygen to use esp_bt.h and redirect to
component/bt/bluedroid/api/include/api/

fix compile
2018-04-26 19:32:06 +08:00

76 lines
2.2 KiB
C

/******************************************************************************
*
* Copyright (C) 2009-2013 Broadcom Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************/
#include <string.h>
#include "common/bt_target.h"
//#include "bt_utils.h"
#include "gap_int.h"
tGAP_CB gap_cb;
/*******************************************************************************
**
** Function GAP_SetTraceLevel
**
** Description This function sets the trace level for GAP. If called with
** a value of 0xFF, it simply returns the current trace level.
**
** Returns The new or current trace level
**
*******************************************************************************/
UINT8 GAP_SetTraceLevel (UINT8 new_level)
{
if (new_level != 0xFF) {
gap_cb.trace_level = new_level;
}
return (gap_cb.trace_level);
}
/*******************************************************************************
**
** Function GAP_Init
**
** Description Initializes the control blocks used by GAP.
**
** This routine should not be called except once per
** stack invocation.
**
** Returns Nothing
**
*******************************************************************************/
void GAP_Init(void)
{
memset (&gap_cb, 0, sizeof (tGAP_CB));
#if defined(GAP_INITIAL_TRACE_LEVEL)
gap_cb.trace_level = GAP_INITIAL_TRACE_LEVEL;
#else
gap_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */
#endif
#if GAP_CONN_INCLUDED == TRUE
gap_conn_init();
#endif
#if BLE_INCLUDED == TRUE && GATTS_INCLUDED == TRUE
gap_attr_db_init();
#endif
}