13 current/voltage measurement apis, 1 m1x66_startmeasurecurrent, 2 m1x66_startmeasurevoltage – Maxim Integrated 73M1866B/73M1966B FXOAPI User Manual

Page 36: Current/voltage measurement apis, M1x66_startmeasurecurrent, M1x66_startmeasurevoltage

Advertising
background image

73M1866B/73M1966B FXOAPI User Guide

UG_1x66B_046

36

Rev. 2.1

2.13 Current/Voltage Measurement APIs

2.13.1 M1x66_StartMeasureCurrent

Description

Start the line current measurement process. This API starts measuring the line current of the specified
channel at a sampling interval time of “sampleTime” with averaging count of “averageSampleCount”.

Prototype

int M1x66_StartMeasureCurrent (

M1x66_HANDLE channel,
unsigned int sampleTime,
unsigned int averageSampleCount );


Parameters

Data Type

Name

Description

M1x66_HANDLE

channel

Channel handle obtained from FXO open channel.

unsigned int

sampleTime

Time interval between two consecutive samples.

unsigned int

averageSampleCount

Sample count for average calculation.


Return Values

Data Type

Description

M1x66_RET

M1x66_SUCCESS – Successfully started.
M1x66_FAILED – Failure.

2.13.2 M1x66_StartMeasureVoltage

Description

Start the line voltage measurement process.

Prototype

int M1x66_StartMeasureVoltage (

M1x66_HANDLE channel,
unsigned int sampleTime,
unsigned int averageSampleCount );


Parameters

Data Type

Name

Description

M1x66_HANDLE

channel

Channel handle obtained from FXO open channel.

unsigned int

sampleTime

Time interval between two consecutive samples.

unsigned int

averageSampleCount

Sample count for average calculation.


Return Values

Data Type

Description

M1x66_RET

M1x66_SUCCESS – Successfully started.
M1x66_FAILED – Failure.

Advertising