Adm led functions – ProSoft Technology MVI69-ADM User Manual
Page 176

Application Development Function Library - ADM API
MVI-ADM ♦ 'C' Programmable
Developer's Guide
'C' Programmable Application Development Module
Page 176 of 342
ProSoft Technology, Inc.
February 20, 2013
7.7
ADM LED Functions
ADM_SetLed
Syntax
int ADM_SetLed(ADMHANDLE adm_handle, ADM_INTERFACE *adm_interface_ptr, int led,
int state);
Parameters
adm_handle
Handle returned by previous call to ADM_Open
adm_interface_ptr
Pointer to the interface structure
led
Specifies which of the user LED indicators is being addressed
state
Specifies whether the LED will be turned on or off
Description
ADM_SetLed allows an application to turn the user LED indicators on and off.
adm_handle must be a valid handle returned from ADM_Open.
led must be set to ADM_LED_USER1, ADM_LED_USER2 or
ADM_LED_STATUS for User LED 1, User LED 2 or Status LED, respectively.
state must be set to ADM_LED_OK, ADM_LED_FAULT to turn the Status LED
green or red, respectively. For User LED 1 and User LED 2 state must be set to
ADM_LED_OFF or ADM_LED_ON to turn the indicator On or Off, respectively.
Return Value
ADM_SUCCESS
The LED has successfully been set.
ADM_ERR_NOACCESS
adm_handle does not have access
ADM_ERR_BADPARAM
led or state is invalid.
Example
ADMHANDLE adm_handle;
/* Set Status LED OK, turn User LED 1 off and User LED 2 on */
ADM_SetLed(adm_handle, interface_ptr, ADM_LED_STATUS, ADM_LED_OK);
ADM_SetLed(adm_handle, interface_ptr, ADM_LED_USER1, ADM_LED_OFF);
ADM_SetLed(adm_handle, interface_ptr, ADM_LED_USER2, ADM_LED_ON);