beautypg.com

2 mapi_diorw(), Mapi_diorw() – Maxim Integrated 78M6612 M-API Library User Manual

Page 36

background image

78M6612 M-API Library User Guide

UG_6612_036

36

Rev. 1.00

4.7.2 MAPI_DIORW()

Purpose

Perform the Read/Write operation of/to the DIO.

Synopsis

void MAPI_DIORW ( enum SIGNAL_TYPE Signal,

unsigned char *Value,

uint8_t OP );

Where:
enum SIGNAL_TYPE {ACTIVEB, ALARM, FAULTB, READYB, RELAY1B,

RELAY2B, SAG, WATTPULSE,

AC_OK, PFC_CTRL, PFC_OK, PFC_ON, Q183_ON,

UNUSED1, UNUSED2, UNUSED3};

Also where OP = (READ/ 0, WRITE = 1

Parameters

OP: Input parameter.

0 = read, 1 = write.

Value: Input parameter (OP=0)/ Output parameter (OP=1)..
Read the value of the specified signal (OP=0) or write (OP=1) to it (assuming pin
direction is output). There is no checking of pin direction.

Signal: Input parameter
Value is one of: ACTIVEB, ALARM, FAULTB, READYB, RELAY1B,

RELAY2B, SAG, WATTPULSE,

AC_OK, PFC_CTRL, PFC_OK, PFC_ON, Q183_ON,
UNUSED1, UNUSED2, UNUSED3

Return Codes None.