beautypg.com

Maxim Integrated 73M1866B/73M1966B Reference Driver User Manual

Page 63

background image

UG_1x66B_015

73M1866B/73M1966B Reference Driver User Guide

Rev. 2.7

63

The following example code illustrates a reading of a line voltage IET table entry.

M1966_MEASURE_UPDATE_t

read;

int ret;

read.row = 5; /* read row 5 of voltage IET table */
read.action = M1966_MEASURE_ACTION_GET; /* request for GET operation */
read.entity = M1966_MEASURE_ENTITY_VOLTAGE; /* measuring entity= voltage */

ret = ioctl (fd, M1966_MEASURE_UPDATE, &read);
if (ret < 0)
printf (“Failed to read voltage IET entry”);
else {
printf (“\nReading voltage IET table entry row: %d”, read.row);
printf (“\nInterval min: %d”, read.interval_min);
printf (“\nInterval max: %d”, read.interval_max);
printf (“\nEvent : 0x%08X”, read.event);
}