⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dtmftone.h

📁 一个滤波器和一个音效处理程序 TI 的CCS 编译器编程。
💻 H
字号:
/* ***********************************************************
* THIS PROGRAM IS PROVIDED "AS IS". TI MAKES NO WARRANTIES OR
* REPRESENTATIONS, EITHER EXPRESS, IMPLIED OR STATUTORY, 
* INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS 
* FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR 
* COMPLETENESS OF RESPONSES, RESULTS AND LACK OF NEGLIGENCE. 
* TI DISCLAIMS ANY WARRANTY OF TITLE, QUIET ENJOYMENT, QUIET 
* POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY 
* INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE PROGRAM OR 
* YOUR USE OF THE PROGRAM.
*
* IN NO EVENT SHALL TI BE LIABLE FOR ANY SPECIAL, INCIDENTAL, 
* CONSEQUENTIAL OR INDIRECT DAMAGES, HOWEVER CAUSED, ON ANY 
* THEORY OF LIABILITY AND WHETHER OR NOT TI HAS BEEN ADVISED 
* OF THE POSSIBILITY OF SUCH DAMAGES, ARISING IN ANY WAY OUT 
* OF THIS AGREEMENT, THE PROGRAM, OR YOUR USE OF THE PROGRAM. 
* EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF 
* REMOVAL OR REINSTALLATION, COMPUTER TIME, LABOR COSTS, LOSS 
* OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF 
* USE OR INTERRUPTION OF BUSINESS. IN NO EVENT WILL TI'S 
* AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF 
* YOUR USE OF THE PROGRAM EXCEED FIVE HUNDRED DOLLARS 
* (U.S.$500).
*
* Unless otherwise stated, the Program written and copyrighted 
* by Texas Instruments is distributed as "freeware".  You may, 
* only under TI's copyright in the Program, use and modify the 
* Program without any charge or restriction.  You may 
* distribute to third parties, provided that you transfer a 
* copy of this license to the third party and the third party 
* agrees to these terms by its first use of the Program. You 
* must reproduce the copyright notice and any other legend of 
* ownership on each copy or partial copy, of the Program.
*
* You acknowledge and agree that the Program contains 
* copyrighted material, trade secrets and other TI proprietary 
* information and is protected by copyright laws, 
* international copyright treaties, and trade secret laws, as 
* well as other intellectual property laws.  To protect TI's 
* rights in the Program, you agree not to decompile, reverse 
* engineer, disassemble or otherwise translate any object code 
* versions of the Program to a human-readable form.  You agree 
* that in no event will you alter, remove or destroy any 
* copyright notice included in the Program.  TI reserves all 
* rights not specifically granted under this license. Except 
* as specifically provided herein, nothing in this agreement 
* shall be construed as conferring by implication, estoppel, 
* or otherwise, upon you, any license or other right under any 
* TI patents, copyrights or trade secrets.
*
* You may not use the Program in non-TI devices.
* ********************************************************* */
/***********************************************************************
**  File Name:    DTMFTone.h
**  Part Number:  TLV320AIC10/11EVM-SW-00103
************************************************************************
**  Copyright (c) Texas Instruments, Inc. 2000
************************************************************************
**
**  Release History:
**     Version      Date          Engr          Description
**      1.00     10-11-2000    Wendy X Fang   Original Release
**
************************************************************************
**
**  Function:
**      This is the head file of DTMF tone generator -- DTMFTone.c,
**      which defines all variables and sine tables used by DTMFTone.c.
**
***********************************************************************/

/***********************************************************************
**  Define Statements (McBSP0 Used for TX DTMF Tone)
***********************************************************************/
#define McBSP0_DRR2  (*(volatile unsigned int *)0x0020)
#define McBSP0_DRR1  (*(volatile unsigned int *)0x0021)
#define McBSP0_DXR2  (*(volatile unsigned int *)0x0022)
#define McBSP0_DXR1  (*(volatile unsigned int *)0x0023)

/***********************************************************************
**  Global Varaibles that are Used for DTMF Tone Generation (Analog Output)
***********************************************************************/
unsigned int  ToneCount = 0;        /* DTMF tone interval counter */
unsigned int  ToneIndex = 0;        /* index or number for a tone */
unsigned int  s697      = 0;        /* index for freuqncy=697 tone */
unsigned int  s770      = 0;        /* index for freuqncy=770 tone */
unsigned int  s852      = 0;        /* index for freuqncy=852 tone */
unsigned int  s941      = 0;        /* index for freuqncy=941 tone */
unsigned int  s1209     = 0;        /* index for freuqncy=1209 tone */
unsigned int  s1336     = 0;        /* index for freuqncy=1336 tone */
unsigned int  s1477     = 0;        /* index for freuqncy=1477 tone */

int           ToneWave  = 0;        /* DTMF tone */
int           ToneHi    = 0;        /* high frequency in a DTMF tone */ 
int           ToneLo    = 0;        /* low frequency in a DTMF tone  */

int    f1477[23] =
{     0,   6349,  10621,  11419,   8482,   2771,  -3847,  -9207,
 -11555, -10123,  -5381,   1122,   7258,  11012,  11177,   7678,
   1668,  -4887,  -9844, -11581,  -9530,  -4362,   2233 }; 
 
 int    f1336[23] =
{     0,   5803,  10045,  11585,  10008,   5740,     -7,  -5866,
 -10081, -11584,  -9972,  -5676,    146,   5928,  10117,  11583,
  9934,    5613,   -218,  -5991, -10152, -11582,  -9897 };

int    f1209[23] =
{     0,   5296,   9420,  11461,  10966,   8046,   3346,  -2095,
  -7072, -10484, -11578, -10110,  -6406,  -1285,   4120,   8614,
  11203,  11313,   8921,   4555,   -818,  -6010,  -9873 };

int    f941[23]  =
{     0,   4184,   7803,  10369,  11535,  11144,   9238,   6103,
   2135,  -2122,  -6092,  -9240, -11140, -11536, -10375,  -7814,
  -4197,     -1,   4172,   7793,  10363,  11534,  11148 };

int    f852[23]  =
{     0,   3804,   7186,   9772,  11273,  11525,  10498,   8307,
   5195,   1506,  -2349,  -5944,  -8880, -10830, -11580, -11046,
  -9286,  -6497,  -2987,    855,   4601,   7837,  10204 };
   
int    f770[23]  =
{     0,   3450,   6587,   9126,  10837,  11565,  11243,   9902,
   7661,   4726,   1362,  -2126,  -5421,  -8224, -10280, -11405,
 -11494, -10540,  -8630,  -5936,  -2704,    773,   4180 };
   
int    f697[23]  =
{     0,   3131,   6030,   8479,  10297,  11349,  11555,  10901,
   9436,   7268,   4559,   1511,  -1650,  -4688,  -7377,  -9517,
 -10949, -11564, -11320, -10232,  -8383,  -5909,  -2995 };

/***********************************************************************
**  End of File -- DTMFTone.h
***********************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -