beautypg.com

3 led blink - 1, 3 led blin k - 1 – IEI Integration AFL2-W21-H61 User Manual

Page 51

background image

AFL2-W21A/AB-H61

P a g e 32

LIGHTBAR_DeviceClose(hSMB_Dev);

//Close Device.

LIGHTBAR_DriverUninit(hSMB_Dev);

//Close Driver Handle

delete LEDCOLOR;

}

2.4.4.3 LED Blin k - 1

{

PLED_MODE_SETTINGS

LED_ModeSet =

(PLED_MODE_SETTINGS)malloc(sizeof(LED_MODE_SETTINGS));

PLED_BLNK_SET

LED_Blinking_Set = (P LED_BLNK_SET)malloc(sizeof(LED_BLNK_SET));

PLED_BLNK_TYPE

LED_Blinking_Type =

(PLED_BLNK_TYPE)malloc(sizeof(LED_BLNK_TYPE));

// Set Structure: Set Broadcast address

LED_ModeSet.Main_Addr = 0xD0;

LED_Blinking_Set.Main_Addr = 0xD0;

LED_Blinking_Type.Main_Addr = 0xD0;

//Set Structure: Set blinking settings.

LED_Blinking_Set.BLNK_Freq = 0x07;

//300ms

LED_Blinking_Set.BLNK_DutCyc = 0x80;

//50:50

//Set Structure: Set each LED operation mode.

LED_ModeSet.LED_00 = LED_DispMode_BLNK;

//R

LED_ModeSet.LED_01 = LED_DispMode_BLNK;

//G

LED_ModeSet.LED_02 = LED_DispMode_BLNK;

//B

LED_ModeSet.LED_03 = LED_DispMode_BLNK;

//R

LED_ModeSet.LED_04 = LED_DispMode_BLNK;

//G

LED_ModeSet.LED_05 = LED_DispMode_BLNK;

//B

LED_ModeSet.LED_06 = LED_DispMode_BLNK;

//R

LED_ModeSet.LED_07 = LED_DispMode_BLNK;

//G

LED_ModeSet.LED_08 = LED_DispMode_BLNK;

//B

LED_ModeSet.LED_09 = LED_DispMode_BLNK;

//R

LED_ModeSet.LED_10 = LED_DispMode_BLNK;

//G

LED_ModeSet.LED_11 = LED_DispMode_BLNK;

//B

LED_ModeSet.LED_12 = LED_DispMode_BLNK;

//R

LED_ModeSet.LED_13 = LED_DispMode_BLNK;

//G