Gpio support – Maxim Integrated 73M1866B/73M1966B Reference Driver User Manual
Page 11

UG_1x66B_015
73M1866B/73M1966B Reference Driver User Guide
Rev. 2.7
11
The application is responsible for building up the IET using the IET table update IOCTL –
M1966_MEASURE_UPDATE
. This IOCTL can be used to create/update or to read back the current table
entry (see
2.2.3.2 Measurement Procedure
The driver is responsible for reading the raw value required at a given sample rate from the device. The
result is computed and averaged over a specified number of those previously read values, and then
compare to the interval and event table (IET) described below. Based on these comparisons dedicated
events may be sent to the application.
The driver compares the calculated average of the reading value with the lower and upper bound
threshold in each IET table entry. If the value falls in between the ranges and it is the first transition into
these new ranges the specific application defined event (4) will be sent to the application. The lower and
upper bound ranges are expressed in milliamps for current intensity, or in volts for line voltage.
2.2.3.3 Management of the Procedure
Controlling the operation of this current/voltage measurement is exclusively done by the application layer.
The application layer uses the M1966_MEASURE_START and M1966_MEASURE_STOP to start and stop
the measurement, respectively. The M1966_MEASURE_STOP simply stops the measurement and
requires no additional parameter, while M1966_MEASURE_START starts the measuring process and it
consists of two parameters:
1. Sample time interval.
2. Average sample count.
The sample time interval is the time interval between two consecutive reading samples expressed in
milliseconds, and the average sample count is the number of reading samples to be used for average
calculation. Any one of these parameters can be ZERO indicates a no change. The application layer can
adjust one or both parameters anytime using M1966_MEASURE_START.
2.2.3.4 Even Handling
The driver emits the M1966_LINE_STATE event when line state condition changes from one interval to
another. The application is expected to receive the notification and can request for the event from the
driver using the M1966_GET_EVENT IOCTL. Refer to
for details on how to get notified and to
retrieve the event from the driver’s queue. The following supporting data will accompany the line state
event:
1. The state of the FXO channel – on or off-hook.
2. Line current or line voltage.
3. IET row index.
4. Application defined event.
2.2.4 GPIO Support
Three General Purpose I/O pins (GPIOs) pins can be managed independently and used for carrying input
or output signal to and from the 1906 device. If used as input, signal transition on the pin can be detected
and trigger interrupt to the host CPU. The driver provides the ability to program each GPIO pin as input
or output port, the ability to read and write data to the GPIO pin as well as generating interrupt event
correspond the signal transition. Section 6.7 describes the GPIO related IOCTL.
Note: The GPIO feature exists only on the 73M1906B 32-Pin QFN package.