Lumidigm M-Series M3xx Modules Mechanical Integration Guide, PLT-02217, Rev. A.0
December 2014
Page 18 of 28
3.5.2
GPIO Controls
User LEDs can be turned on/off on for M31x products. Sample code follows. “First”
corresponds to the MH7 control, “Second” corresponds to the MH9 control. These controls
are GPIO ports on a Xilinx part; 3.3V for VOH. “ON” means the output is low; when an LED
is connected between this port and 5V, current will flow. Note that the forward voltage
drop of a red LED (0.7V) is not adequate for the output to turn the LED fully off in the HI
state; an additional diode drop in series is recommended.
uchar mask = 0x00;
rc = V100_Get_GPIO(pDev, mask);
// Get the mask
mask = 0x01;
// First on 0001
rc = V100_Set_GPIO(pDev, mask);
Sleep(500);
mask = 0x00;
rc = V100_Set_GPIO(pDev, mask);
// Turn off All
mask = 0x02;
// Second on 0010
rc = V100_Set_GPIO(pDev, mask);
Sleep(500);
mask = 0x00;
rc = V100_Set_GPIO(pDev, mask);
// Turn off All
mask = 0x03;
// First and Second on 0011
rc = V100_Set_GPIO(pDev, mask);
Sleep(500);
mask = 0x00;
rc = V100_Set_GPIO(pDev, mask);
// Turn off All
Содержание Lumidigm M Series
Страница 28: ...hidglobal com...