at75c1222 ETC-unknow, at75c1222 Datasheet - Page 38

no-image

at75c1222

Manufacturer Part Number
at75c1222
Description
Manufacturer
ETC-unknow
Datasheet
Ioctl Method
Synopsis
Description
38
AT75C1222
This code checks if a DTMF digit has been detected. The time-out is 5 ms.
The ioctl() function manipulates the underlying device parameters of the tones device.
“fd” is the file descriptor upon which ioctl() will act. It should be related to the /dev/tones
virtual file.
“request” defines which predefined command to send to the tones device. Some com-
mands may require additional arguments which are stored or received in the buffer
pointed to by “argp”. The ioct() requests supported by the tones device driver are
described below:
The fields and the values to be written are those defined in the section “Low Level Inter-
face” on page 5.
retval = select(df+1, &rfds, NULL, NULL, &tv); /* df supposed to be a file
descriptor related to /dev/tones */
if (retval > 0)
else
#include <sys/ioctl.h>
int ioctl(int fd, int request, char *argp);
DTMFDET_CONFIG: This command is used to configure the characteristics of the
DTMF detector. An additional parameter is used as defined below:
struct dtmfdet_args{
};
DTMFDET_START: This command is sent to start the DTMF detection immediately.
There is no additional argument.
DTMFDET_STOP: This command is sent to stop the DTMF detection immediately.
There is no additional argument.
TONEGEN_CONFIG: This command is used to configure the characteristics of the
arbitrary tone signals. An additional parameter is used as defined below:
struct tonegen_args{
printf("DTMF digit detected.\n");
printf("No DTMF digit detected within 5 s.\n");
unsigned short lowthres;
unsigned short highthres;
unsigned short lowrel;
unsigned short highrel;
unsigned short postwist;
unsigned short negtwist;
unsigned short duration;
unsigned short silence;
unsigned short cosw1;
unsigned short sinw1;
unsigned short lev1;
unsigned short cosw2;
unsigned short sinw2;
unsigned short lev2;
unsigned short signal_len;
unsigned short silence_len;
2664A–INTAP–07/02

Related parts for at75c1222