Led Light

>w## Notice > * please include the header file "bwsdk_api.h" when you need to use the LED `#include "bwsdk_api.h"` >i## Data Structure ```#define RF_LED_RED 0x80 ///< control bitmask of RF RED LED #define RF_LED_YELLOW 0x40 ///< control bitmask of RF YELLOW LED #define RF_LED_GREEN 0x20 ///< control bitmask of RF GREEN LED #define RF_LED_BLUE 0x10 ///< control bitmask of RF BLUE LED ``` >i## SpSysLedOn ### Prototype `int SpSysLedOn(unsigned char ucLedOnMsk);` ### Function * turn on the ucLedOnMsk specified Led ### Parameter |Name|Type|description| |-|-|-| |ucLedOnMsk|unsigned char|Led mask : RF_LED_RED,RF_LED_YELLOW,RF_LED_GREEN,RF_LED_BLUE| ### Retval |Value|Type|Description| |-|-|-| |0|int|SUCCESS| |<0|int|Fail| >i## SpSysLedOff ### Prototype `int SpSysLedOff(unsigned char ucLedOffMsk);` ### Function * turn off the ucLedOffMsk specified Led ### Parameter |Name|Type|description| |-|-|-| |ucLedOffMsk|unsigned char|Led mask : RF_LED_RED,RF_LED_YELLOW,RF_LED_GREEN,RF_LED_BLUE| ### Retval |Value|Type|Description| |-|-|-| |0|int|SUCCESS| |<0|int|Fail| >i## SpSysLedFlash ### Prototype `int SpSysLedFlash(unsigned char ucLedFlshMsk, unsigned int uiOnMs, unsigned int uiOffMs);` ### Function * flash the ucLedFlshMsk specified Led ### Parameter |Name|Type|description| |-|-|-| |ucLedFlshMsk|unsigned char|Led mask : RF_LED_RED,RF_LED_YELLOW,RF_LED_GREEN,RF_LED_BLUE| |uiOnMs|unsigned int|turn ont the Led time| |uiOffMs|unsigned int|turn off the Led time| ### Retval |Value|Type|Description| |-|-|-| |0|int|SUCCESS| |<0|int|Fail| >s## Example ``` ///< turn on the red Led int iRet = 0; iRet = SpSysLedOn(RF_LED_RED); if (!iRet) { DelayMs(500); } ///< turn off the red Led iRet = SpSysLedOff(RF_LED_RED | RF_LED_YELLOW | RF_LED_GREEN | RF_LED_BLUE); ///< flash the green Led iRet = SpSysLedFlash(RF_LED_GREEN, 750, 250); ```