
Application Programming Interface (API)
©
2008 Microchip Technology Inc.
DS70332A-page 21
DTMFDetection
Description
The
DTMFDetection
function should be invoked by the user application after every
10 ms to process the received samples. This function returns the state of the DTMF
detection. The user application reads the digit based on the state information returned
by the
DTMFDetection
function. The function returns any of the following states:
Include
None.
Prototype
int
DTMFDet(dtmfdet_sHandle *pDTMFDet, int *pSamplesBuffer, int
*Digit)
;
Arguments
pDTMFDet
Handle to an instance of DTMF Detection.
pSamplesBuffer
Pointer to input buffer.
Digit
Pointer to store the detected digit.
Return Value
Process State/Type
Remarks
None.
Code Example
dtmfdet_sHandle CH1;
int inSignal[80];
int Digit,State;
State = DTMFDetection(&CH1,&inSignal[0],&Digit);
Table 3-1:
DTMF Detection State
Frame
Type
Symbolic Representation
Description
0
VALID_DIGIT_FRAME
A valid DTMF digit is just detected.
1
POSSIBLE_DIGIT_FRAME
This signal may represent a DTMF tone (first
detection) yet to make the final decision.
2
DIGIT_DETECTED
A valid digit is detected.
3
TONE_SHAPE_TEST
This frame indicates the silence period immediately
after a DTMF digit (may be separation between two
digits).
4
PAUSE_AFTER_DIGIT_FRAME
This state indicates the Pause frame after a DTMF
tone.
5
BUFFER_DELAY
This state indicates no operation frame (The input
samples are taken and stored in the system buffer).
6
NOT_A_DIGIT_FRAME
This frame is not a part of a DTMF digit.
-1
ERROR_FRAME
This state indicates an error in the frame processing
operation (possibly wrong arguments).
Содержание dsPIC DSC DTMF
Страница 1: ...2008 Microchip Technology Inc DS70332A dsPIC DSC DTMF DETECTION LIBRARY USER S GUIDE...
Страница 4: ...dsPIC DSC DTMF Detection Library User s Guide DS70332A page iv 2008 Microchip Technology Inc NOTES...
Страница 26: ...dsPIC DSC DTMF Detection Library User s Guide DS70332A page 22 2008 Microchip Technology Inc NOTES...
Страница 30: ...dsPIC DSC DTMF Detection Library User s Guide DS70332A page 26 2008 Microchip Technology Inc NOTES...