2 turn on led - multiple, 2 tu rn o n led - m u ltip le – IEI Integration AFL2-W21-H61 User Manual
Page 49
AFL2-W21A/AB-H61
P a g e 30
HANDLE hSMB_Dev = LIGHTBAR_DriverInit();//Init SMBAPI driver and get device Handle.
LIGHTBAR_DeviceInit(hSMB_Dev);//Init Target device
//Set LED level information.
LEDCOLOR.R_LEVEL = 7;
LEDCOLOR.G_LEVEL = 7;
LEDCOLOR.B_LEVEL = 7;
//Set LED Address
LEDCOLOR.LED_Info.Main_Addr = 0xC0;
LEDCOLOR.LED_Info.R_LN = 0x00;
LEDCOLOR.LED_Info.G_LN = 0x01;
LEDCOLOR.LED_Info.B_LN = 0x02;
If(LIGHTBAR_Brightness_Single(hSMB_Dev, LEDCOLOR, 1) == False){
//Error message
}
LIGHTBAR_DeviceClose(hSMB_Dev);
//Close Device.
LIGHTBAR_DriverUninit(hSMB_Dev);
//Close Driver Handle
delete LEDCOLOR;
}
2.4.4.2 Tu rn o n LED - m u ltip le
{
//Define Data structure
PLED_PWM_INFO LEDCOLOR = (PLED_PWM_INFO)malloc(sizeof(LED_PWM_INFO) * 4);
HANDLE hSMB_Dev = LIGHTBAR_DriverInit();//Init SMBAPI driver and get device Handle.
LIGHTBAR_DeviceInit(hSMB_Dev);//Init Target device
LEDCOLOR [0].LED_Info.Main_Addr = 0xD0;
LEDCOLOR [0].LED_Info.R_LN = 0x02;
LEDCOLOR [0].LED_Info.G_LN = 0x03;
LEDCOLOR [0].LED_Info.B_LN = 0x04;
LEDCOLOR [0].R_LEVEL = 7;