📄 bt_user_config.c
字号:
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* bt_user_config.c
*
* Project:
* --------
* Maui_Software
*
* Description:
* ------------
* The file contains all application feature enable/disable flag for
* bluetooth application feature configuration.
*
* Author:
* -------
* -------
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
#if defined(__BTVCSR_HP__)
#include "kal_release.h" /* Basic data type */
#include "bt_user_config.h"
#include "eint.h"
#if defined(MT6318)
#include "pmic6318_sw.h"
#endif
static kal_uint8 bt_chan;
kal_bool bt_state = LEVEL_LOW; /* interrupt level */
kal_uint8 MMIBT_DEF_MYBTADDR[] = {0x12, 0x34, 0x56, 0x5b, 0x01, 0x02};
kal_uint8 MMIBT_DEF_MYBTFNAME[] = { 'M', 'T', 'K', 'B', 'T', 'D', 'E', 'V', '\0' };
kal_uint8 MMIBT_DEF_TRBTFNAME[] = { 'N', 'o', ' ', 'N', 'a', 'm', 'e', '\0' };
kal_uint32 BT_INQ_TOUT_DUR = 8000; /* Inquiry time out duration : 5 sec */
kal_uint32 BT_RING_TOUT_DUR = 5000; /* Out-of-band Ring inteval : 3 sec */
kal_uint32 BT_CMD_GUARD_TIMER_DUR = 20000; /* Screen Guard Timer duration: 20 sec */
kal_uint32 BT_MAKE_IDLE_STATE_TIMER_DUR = 5000; /* make BT to go back idle state duration: 5 sec */
/* Max number of inquiry result devices */
/* NOTICES!!!! MAX number is 8 */
kal_uint8 CUST_MAX_INQ_NUM = 8;
/* Max number of trusted devices */
/* NOTICES!!!! MAX number is 8 */
kal_uint8 CUST_MAX_TRU_NUM = 8;
kal_uint8 BT_PWRON_MAX_STEPCOUNT = 7;
kal_uint8 BT_TIMEOUT_VALUE = 15; /* in second */
/* kal_uint32 BT_SUPPORTED_PROF = 0x0007; */
kal_uint32 BT_SUPPORTED_PROF = 0x000f;
#ifdef __BT_DEBUG__
/* kal_bool BT_log_status = KAL_FALSE; //BT_DEBUG */
kal_bool BT_log_status = KAL_TRUE; /* BT_DEBUG */
#endif /* __BT_DEBUG__ */
UART_PORT BT_UART_port = BT_UART_PORT;
UARTDCBStruct BT_UARTPort_Setting =
{
UART_BAUD_115200, /* baudrate */
len_8, /* dataBits; */
sb_1, /* stopBits; */
pa_none, /* parity; */
fc_none, /* flow control */
0x11, /* xonChar; */
0x13, /* xoffChar; */
KAL_FALSE
};
/*****************************************************************************
* FUNCTION
* BT_GetPort_Setting
* DESCRIPTION
*
* PARAMETERS
* DCB [?]
* RETURNS
*
*****************************************************************************/
UART_PORT BT_GetPort_Setting(UARTDCBStruct *DCB)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
kal_mem_cpy(DCB, &BT_UARTPort_Setting, sizeof(UARTDCBStruct));
return BT_UART_port;
}
/*****************************************************************************
* FUNCTION
* BT_GetResetGpio
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
*
*****************************************************************************/
kal_uint8 BT_GetResetGpio(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return BT_GPIO_RESET;
}
/*****************************************************************************
* FUNCTION
* BT_GetDscGpio
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
*
*****************************************************************************/
kal_uint8 BT_GetDscGpio(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return BT_GPIO_DSC;
}
/*****************************************************************************
* FUNCTION
* BT_GetPowerGpio
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
*
*****************************************************************************/
kal_uint8 BT_GetPowerGpio(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return BT_GPIO_POWER;
}
/*****************************************************************************
* FUNCTION
* BT_GetDataSelGpio
* DESCRIPTION
*
* PARAMETERS
* void
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -