cbt_bt_sig.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:7k
源码类别:

MTK

开发平台:

C++ Builder

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*****************************************************************************
  36.  *
  37.  * Filename:
  38.  * ---------
  39.  *   cbt_bt_sig.h
  40.  *
  41.  * Project:
  42.  * --------
  43.  *   Maui META APP
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *  CBT 200 signalling function header
  48.  *
  49.  * Author:
  50.  *  Andy Ueng (mtk00490)
  51.  *
  52.  *============================================================================
  53.  *             HISTORY
  54.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  55.  *------------------------------------------------------------------------------
  56.  * $Revision$
  57.  * $Modtime$
  58.  * $Log$
  59.  *
  60.  *------------------------------------------------------------------------------
  61.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  62.  *============================================================================
  63.  ****************************************************************************/
  64. #ifndef  _CBT_BT_SIG_H_
  65. #define  _CBT_BT_SIG_H_
  66. #ifndef  _CBT_COMMON_H_
  67. #include "cbt_common.h"
  68. #endif
  69. #ifndef  _BTT_COMMON_H_
  70. #include "btt_common.h"
  71. #endif
  72. //----------------------------------------------------------------------------
  73. typedef enum
  74. {
  75.     CBT_BT_MPR_NOMINAL_POWER_CURRENT = 0,
  76.     CBT_BT_MPR_NOMINAL_POWER_AVERAGE,
  77.     CBT_BT_MPR_NOMINAL_POWER_MIN,
  78.     CBT_BT_MPR_NOMINAL_POWER_MAX,
  79.     CBT_BT_MPR_LEAKAGE_POWER_CURRENT,
  80.     CBT_BT_MPR_LEAKAGE_POWER_AVERAGE,
  81.     CBT_BT_MPR_LEAKAGE_POWER_MIN,
  82.     CBT_BT_MPR_LEAKAGE_POWER_MAX,
  83.     CBT_BT_MPR_PEAK_POWER_CURRENT,
  84.     CBT_BT_MPR_PEAK_POWER_AVERAGE,
  85.     CBT_BT_MPR_PEAK_POWER_MIN,
  86.     CBT_BT_MPR_PEAK_POWER_MAX,
  87.     CBT_BT_MPR_PACKET_TIMING_CURRENT,
  88.     CBT_BT_MPR_PACKET_TIMING_AVERAGE,
  89.     CBT_BT_MPR_PACKET_TIMING_MIN,
  90.     CBT_BT_MPR_PACKET_TIMING_MAX,
  91.     CBT_BT_MPR_FREQ_ACCURACY_CURRENT,
  92.     CBT_BT_MPR_FREQ_ACCURACY_AVERAGE,
  93.     CBT_BT_MPR_FREQ_ACCURACY_MIN,
  94.     CBT_BT_MPR_FREQ_ACCURACY_MAX,
  95.     CBT_BT_MPR_FREQ_DRIFT_CURRENT,
  96.     CBT_BT_MPR_FREQ_DRIFT_AVERAGE,
  97.     CBT_BT_MPR_FREQ_DRIFT_MIN,
  98.     CBT_BT_MPR_FREQ_DRIFT_MAX,
  99.     CBT_BT_MPR_MAX_DRIFT_RATE_CURRENT,
  100.     CBT_BT_MPR_MAX_DRIFT_RATE_AVERAGE,
  101.     CBT_BT_MPR_MAX_DRIFT_RATE_MIN,
  102.     CBT_BT_MPR_MAX_DRIFT_RATE_MAX,
  103.     CBT_BT_MPR_AVERAGE_FREQ_DEVIATION_CURRENT,
  104.     CBT_BT_MPR_AVERAGE_FREQ_DEVIATION_AVERAGE,
  105.     CBT_BT_MPR_AVERAGE_FREQ_DEVIATION_MIN,
  106.     CBT_BT_MPR_AVERAGE_FREQ_DEVIATION_MAX,
  107.     CBT_BT_MPR_MIN_FREQ_DEVIATION_CURRENT,
  108.     CBT_BT_MPR_MIN_FREQ_DEVIATION_AVERAGE,
  109.     CBT_BT_MPR_MIN_FREQ_DEVIATION_MIN,
  110.     CBT_BT_MPR_MIN_FREQ_DEVIATION_MAX,
  111.     CBT_BT_MPR_MAX_FREQ_DEVIATION_CURRENT,
  112.     CBT_BT_MPR_MAX_FREQ_DEVIATION_AVERAGE,
  113.     CBT_BT_MPR_MAX_FREQ_DEVIATION_MIN,
  114.     CBT_BT_MPR_MAX_FREQ_DEVIATION_MAX,
  115.     CBT_BT_MPR_BURSTS_OUT_OF_TOLERANCE_POWER,
  116.     CBT_BT_MPR_BURSTS_OUT_OF_TOLERANCE_TIMING,
  117.     CBT_BT_MPR_BURSTS_OUT_OF_TOLERANCE_MODULATION,
  118.     CBT_BT_MPR_NUM
  119. }E_CBT_BT_MPR;
  120. typedef enum
  121. {
  122.     CBT_BT_MOD_FREQ_ACCURACY_CURRENT,
  123.     CBT_BT_MOD_FREQ_ACCURACY_AVERAGE,
  124.     CBT_BT_MOD_FREQ_ACCURACY_MIN,
  125.     CBT_BT_MOD_FREQ_ACCURACY_MAX,
  126.     CBT_BT_MOD_FREQ_DRIFT_CURRENT,
  127.     CBT_BT_MOD_FREQ_DRIFT_AVERAGE,
  128.     CBT_BT_MOD_FREQ_DRIFT_MIN,
  129.     CBT_BT_MOD_FREQ_DRIFT_MAX,
  130.     CBT_BT_MOD_MAX_DRIFT_RATE_CURRENT,
  131.     CBT_BT_MOD_MAX_DRIFT_RATE_AVERAGE,
  132.     CBT_BT_MOD_MAX_DRIFT_RATE_MIN,
  133.     CBT_BT_MOD_MAX_DRIFT_RATE_MAX,
  134.     CBT_BT_MOD_AVERAGE_FREQ_DEVIATION_CURRENT,
  135.     CBT_BT_MOD_AVERAGE_FREQ_DEVIATION_AVERAGE,
  136.     CBT_BT_MOD_AVERAGE_FREQ_DEVIATION_MIN,
  137.     CBT_BT_MOD_AVERAGE_FREQ_DEVIATION_MAX,
  138.     CBT_BT_MOD_MIN_FREQ_DEVIATION_CURRENT,
  139.     CBT_BT_MOD_MIN_FREQ_DEVIATION_AVERAGE,
  140.     CBT_BT_MOD_MIN_FREQ_DEVIATION_MIN,
  141.     CBT_BT_MOD_MIN_FREQ_DEVIATION_MAX,
  142.     CBT_BT_MOD_MAX_FREQ_DEVIATION_CURRENT,
  143.     CBT_BT_MOD_MAX_FREQ_DEVIATION_AVERAGE,
  144.     CBT_BT_MOD_MAX_FREQ_DEVIATION_MIN,
  145.     CBT_BT_MOD_MAX_FREQ_DEVIATION_MAX,
  146.     CBT_BT_MOD_AVERAGE_BURST_POWER,
  147.     CBT_BT_MOD_BURST_OUT_OF_TOLERANCE,
  148.     CBT_BT_MOD_NUM
  149. }E_CBT_BT_MOD_T;
  150. //----------------------------------------------------------------------------
  151. // general
  152. extern bool cbt_sig_bt_init(S_CBT_T *cbt, bool bReset);
  153. extern bool cbt_sig_bt_close(S_CBT_T *cbt);
  154. extern bool cbt_sig_bt_config_downlink_power(S_CBT_T *cbt, double d_dn_power);
  155. // connection control
  156. extern bool cbt_sig_bt_config_slave_parameter(S_CBT_T *cbt, unsigned short ch);
  157. extern bool cbt_sig_bt_config_address(S_CBT_T *cbt, AnsiString as_bd_addr);
  158. extern bool cbt_sig_bt_config_inquiry(S_CBT_T *cbt, S_BTT_INQUIRY s_inquiry);
  159. extern bool cbt_sig_bt_inquiry(S_CBT_T *cbt);
  160. extern bool cbt_sig_bt_connect_test(S_CBT_T *cbt);
  161. extern bool cbt_sig_bt_query_state(S_CBT_T *cbt, E_BTT_STATE_T* e_state);
  162. extern bool cbt_sig_bt_release(S_CBT_T *cbt);
  163. // MPR measurement
  164. extern bool cbt_sig_bt_config_mpr(S_CBT_T *cbt, S_BTT_POWER bt_mpr);
  165. // modulation measurement
  166. extern bool cbt_sig_bt_config_mod(S_CBT_T *cbt, S_BTT_MOD bt_mod);
  167. extern bool cbt_sig_bt_read_average_freq_error(S_CBT_T *cbt, double* freq_err);
  168. #endif