
2.4.3.2 _LED_INFO
Syntax: typedef struct _LED_INFO {
UCHAR Main_Addr; //Main address
UCHAR R_LN; //Red list number
UCHAR G_LN; //Green list number
UCHAR B_LN; //Blue list number
} LED_INFO, *PLED_INFO;
Parameters:
Main_Addr – The target LED IC address on the physical circuit
:
UCHAR(BYTE)
。
R_LN
、
G_LN
、
B_LN – The LED code on the IC.
:
UCHAR(BYTE)
。
Remarks: Call this function to send information control packets and use the information in the
packets to control LED. The structure contains the target LED IC address on the
physical circuit and the LED code on the IC.
2.4.4 Programming Example
An example program is provided below. Please modify it by the language you use.
{
PLED_PWM_INFO LEDCOLOR = new _LED_PWM_INFO;//Define Data structure
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){