4 led blink - 2, 4 led blin k - 2 – IEI Integration AFL2-W21-H61 User Manual
Page 52
AFL2-W21A/AB-H61
P a g e 33
LED_ModeSet.LED_14 = LED_DispMode_BLNK;
//B
LED_ModeSet.LED_15 = LED_DispMode_BLNK;
//Set Structure: Enable blinking of IC
LED_Blinking_Type.BLNK_TYPE = LED_BLNK_ON;
LIGHTBAR_BLNK_Settings(hSMB_Dev, LED_Blinking_Set);
//Set LED blinking
settings.
LIGHTBAR_LED_ModeSet(hSMB_Dev, LED_ModeSet)
//Set LED Operation
Mode.
LIGHTBAR_BLNK_Type(hSMB_Dev, LED_Blinking_Type);
//Enable LED Blinking.
}
2.4.4.4 LED Blin k - 2
{
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_Gen;
//R
LED_ModeSet.LED_01 = LED_DispMode_Gen;
//G
LED_ModeSet.LED_02 = LED_DispMode_Gen;
//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