14 miscellaneous channel setting apis, 1 m1x66_setringcadence, Miscellaneous channel setting apis – Maxim Integrated 73M1866B/73M1966B FXOAPI User Manual
Page 38: M1x66_setringcadence

73M1866B/73M1966B FXOAPI User Guide
UG_1x66B_046
38
Rev. 2.1
2.14 Miscellaneous Channel Setting APIs
2.14.1 M1x66_SetRingCadence
Description
Set the ring cadence parameter for ring qualification process. The driver can be programmed to filter and
qualify incoming ring by discarding spurious signals that can be caused by line noises or distortions.
When set with these cadence parameters the driver will evaluate each incoming ring cycle based on
these parameters and emits an M1x66_EVENT_QUALIFIED_RING event only when the ring cadence
matches at the specified number of cycles.
The ring cadence parameter consists of the frequency, cycle duration, period-1 “on”, period-1 “off”,
period-2 “on”, period-2 “off”, and number of cycles. This last parameter (number of cycle) is the number
of ring cycles matched before the ring is qualified. The sum of the period-1 “on”, period-1 “off”, period-2
“on” and period-2 “off” must be equal to the cycle duration parameter.
Remark
The system is defaulted to ring cadence screening disabled upon startup. Enabling or disabling the filter
using this API will not affect the behavior of the ring detection events (M1x66_EVENT_RING_START and
M1x66_EVENT_RING_END
). The application may chose to ignore these two events if the qualified ring
event is preferred. To turn off this filter the same API can be used with the frequency or cycle duration
parameter equal ZERO.
Prototype
int M1x66_SetRingCadence (
M1x66_HANDLE channel,
unsigned int frequency,
unsigned int cycleDuration,
unsigned int periodOneOn,
unsigned int periodOneOff,
unsigned int periodTwoOn,
unsigned int periodTwoOff,
unsigned int numOfCycles );
Parameters
Data Type
Name
Description
M1x66_HANDLE Channel
Channel handle obtained from FXO open channel.
unsigned int frequency
Ring frequency to be detected.
unsigned int cycleDuration
Duration of the cadence cycle (in milliseconds).
unsigned int periodOneOn
Period-1 “On” duration (in milliseconds).
Unsigned int periodOneOff
Period-1 “Off” duration (in milliseconds).
Unsigned int periodTwoOn
Period-2 “On” duration (in milliseconds).
Unsigned int periodTwoOff
Period-2 “Off” duration (in milliseconds).
Unsigned int numOfCycles
Detect at the end of this cycle number (1 – 5).
Return Values
Data Type
Description
M1x66_RET
M1x66_SUCCESS – Successful.
M1x66_FAILED – Failure.