Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*****************************************************************************
- *
- * MODULE: JN-AN-1217
- *
- * COMPONENT: app_led.c
- *
- * DESCRIPTION: DK4 DR1175 Led interface (White Led)
- *
- ***************************************************************************/
- #ifndef APP_LED_H_
- #define APP_LED_H_
- /****************************************************************************/
- /*** Include files ***/
- /****************************************************************************/
- #include "drv_leds.h"
- /****************************************************************************/
- /*** Macro Definitions ***/
- /****************************************************************************/
- #define SWITCH1_LED_GREEN (16) //DIO_16 = D1 on Generic Expansion board
- #define SWITCH1_LED_RED (13) //DIO_13 = D2 on Generic Expansion board
- #define SWITCH2_LED_GREEN (0) //DIO_0 = D3 on Generic Expansion board
- #define SWITCH2_LED_RED (1) //DIO_1 = D4 on Generic Expansion board
- #define SWITCH3_LED_GREEN (3) //DIO_3 = D3 on Carrier board
- #define SWITCH3_LED_RED (2) //DIO_2 = D6 on Carrier board
- #define SWITCH4_LED_GREEN (DO_0_PIN) //DO_0
- #define SWITCH4_LED_RED (DO_1_PIN) //DO_1
- #define NUMBER_OF_LED (8)
- #define LED_D1 SWITCH1_LED_GREEN
- #define LED_D2 SWITCH1_LED_RED
- #define LED_D3 SWITCH2_LED_GREEN
- #define LED_D4 SWITCH2_LED_RED
- #define LED_D3_C SWITCH3_LED_GREEN
- #define LED_D6_C SWITCH3_LED_RED
- /****************************************************************************/
- /*** Type Definitions ***/
- /****************************************************************************/
- /****************************************************************************/
- /*** Exported Functions ***/
- /****************************************************************************/
- PUBLIC void APP_LED_vInitialize(void);
- PUBLIC void APP_LED_vSetLevel(DRV_LEDS_teLedLevel_t eLedLevel);
- PUBLIC void APP_LED_vTurnOn(uint8_t u8LedPin);
- PUBLIC void APP_LED_vTurnOff(uint8_t u8LedPin);
- PUBLIC void APP_LED_vBlink(
- uint8_t u8LedPin,
- int16_t i16BlinkDuration,
- uint16_t u16Cycle,
- fnCbAfterBlink fnCallback,
- void *pParams
- );
- PUBLIC void APP_LED_vBlinkAlternately(
- int16_t i16BlinkDuration,
- uint16_t u16Cycle,
- fnCbAfterBlink fnCallback,
- void *pParams
- );
- PUBLIC void APP_LED_vStopBlinkLed(uint8_t u8LedPin);
- PUBLIC void APP_LED_vStopBlinkAllLeds(void);
- /****************************************************************************/
- /*** External Variables ***/
- /****************************************************************************/
- /****************************************************************************/
- /****************************************************************************/
- /****************************************************************************/
- #endif /* APP_LED_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement