📄 dtmf.h
字号:
/*************************************************************
* (C) COPYRIGHT TEXAS INSTRUMENTS, INC. 1996 *
**************************************************************
* Program Name: DTMF tone decoder *
* File Name: dtmf.h *
* File Description: header file for DTMF functions *
* *
* Author: Gunter Schmer *
* Date: 03/24/97 *
* Revision: 3.0 *
* Latest working date: 03/24/97 *
*************************************************************/
#ifndef _DTMF_H
#define _DTMF_H
/* struct to pass channel info to encode functions */
typedef struct
{
int *data; /* ptr to data */
int *oscis; /* ptr to oscillator states */
int toneAttn; /* attenuation of tone */
int toneDura; /* tone duration in 12.75ms increments */
int pauseDura; /* pause duration in 12.75ms increments */
int *phnbr; /* ptr to phone number */
int toneTime; /* remaining tone time */
int pauseTime; /* remaining pause time */
int encStatus; /* status of encoder */
/* 0 - idle */
/* 1 - busy */
} DTMFENCOBJ;
/* struct to pass channel info to decode functions */
typedef struct
{
int *data; /* ptr to data */
int *taps; /* ptr to filter states */
int *energy; /* ptr to energy template */
int *digitptr; /* ptr to digit output array */
int digitlast; /* last detected digit */
int detectstat; /* status of detector */
/* 0 - detector waiting for pause */
/* 1 - detector ready to detect digit */
int err_flags; /* error flags for dtmf checks */
/* b0 - error signal strength */
/* b1 - error reverse twist */
/* b2 - error standard twist */
/* b3 - error row's relative peak */
/* b4 - error col's relative peak */
/* b5 - error row's 2nd harmonic */
/* b6 - error col's 2nd harmonic */
/* b7 - error OVERFLOW of ACCA */
/* b8..b15 are zero */
} DTMFDECOBJ;
/* encode functions */
void dtmfEncode(DTMFENCOBJ *);
void dtmftone(DTMFENCOBJ *, int);
void initoscis(DTMFENCOBJ *);
/* decode functions */
void dtmfDecode(DTMFDECOBJ *);
void gaincntrl(DTMFDECOBJ *);
void goertzel(DTMFDECOBJ *);
extern void dtmfchecks(DTMFDECOBJ *);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -