Gpio support – Maxim Integrated 73M1822/73M1922 Control Module User Manual

Page 11

Advertising
background image

UG_1x22_053

73M1822/73M1922 Control Module User Guide

Rev. 1.0

11

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 M1X22_MEASURE_START and M1X22_MEASURE_STOP to start and stop
the measurement, respectively. The simply stops the measurement and requires no additional
parameter, while M1X22_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 M1X22_MEASURE_START.

2.2.3.4

Even Handling

The driver emits the M1X22_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 M1X22_GET_EVENT IOCTL. Refer to

Section 5

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 modem channel – on or off-hook.

2. Line current or line voltage.

3. IET row index.

4. Application defined event.

2.2.4 GPIO Support

Four General Purpose I/O pins (GPIOs) pins can be managed independently and used for carrying input
or output signal to and from the 73M1x22 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 certain 73M1x22 device packages.

Advertising