/**
 * \file   plat_led.h
 *
 *  \brief 
 *
*/
/*
 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
 */

#ifndef _PLAT_LED_H
#define _PLAT_LED_H
/* ========================================================================== */
/*                             Include Files                                  */
/* ========================================================================== */

/* ========================================================================== */
/*                           Macros & Typedefs                                */
/* ========================================================================== */
#define NOLED   0x00
#define ALLLED  0x3F
#define LED5G	0x01
#define LED5R	0x02
#define LED5B	0x04
#define LED5O	LED5B
#define LED6G	0x08
#define LED6R	0x10
#define LED6B	0x20
#define LED6O	LED6B

#define  LED_I2C_SALVE_ADDR   0x60

/* ========================================================================== */
/*                         Structures and Enums                               */
/* ========================================================================== */

/* ========================================================================== */
/*                            Global Variables Declarations                   */
/* ========================================================================== */

/* ========================================================================== */
/*                          Function Declarations                             */
/* ========================================================================== */
/**
 * \brief   Routine to Intialize LEDs on the board
 *
 *
 *
 * \return  None.
 *
 **/
void LEDInit();

/**
 * \brief   Sets the specified LED to ON position  
 *
 * \param   led -     LED number Range{1 - 8}
 *
 *
 * \return  None.
 *
 **/
void LEDDIGOUTOn(unsigned char led);

/**
 * \brief   Sets the specified LED to OFF position  
 *
 * \param   led -     LED number Range{1 - 8}
 *
 *
 * \return  None.
 *
 **/
void LEDDIGOUTOff(unsigned char led);

/**
 * \brief   Sets multiple LEDs at a single shot  
 *
 * \param   led_val - bitwise representation of LED values
 *
 *
 * \return  None.
 *
 **/ 
void LEDDIGOUTSetVal(unsigned char led_val);

/**
 * \brief   Set/Reset LEDs connected to GPIO pins
 *
 * \param   instance - GPIO instance number
 * \param   pinNumber - GPIO pin number
 * \param   bitValue - GPIO bit value [ 0/1 ]  
 *
 *
 * \return  None.
 *
 **/ 
void LEDGPIOSetVal(unsigned int instance, unsigned int pinNumber,
                    unsigned int bitValue);
        
/**
 * \brief   Set/Reset Run LED on the board
 *
 * \param   ledFlag  ON/OFF flag  0-OFF 1-ON
 *
 *
 * \return  None
 *
 **/         
void LEDDriveRun(unsigned char ledFlag);
/**
 * \brief   Set/Reset Error LED on the board
 *
 * \param   ledFlag  ON/OFF flag  0-OFF 1-ON
 *
 *
 * \return  None
 *
 **/ 
void LEDDriveError(unsigned char ledFlag);
/**
 * \brief   Set reset activity LED 0 on the baord
 *
 * \param   ledFlag  ON/OFF flag  0-OFF 1-ON
 *
 *
 * \return  None
 *
 **/ 
void LEDDriveACT0(unsigned char ledFlag);
/**
 * \brief   Set reset activity LED 1 on the baord
 *
 * \param   ledFlag  ON/OFF flag  0-OFF 1-ON
 *
 *
 * \return  None
 *
 **/ 
void LEDDriveACT1(unsigned char ledFlag);
/**
 * \brief   Set/reset Tri color LEDs on the board
 *
 * \param   ledFlags  LED specification
 *
 *
 * \return  None
 *
 **/ 
void LEDDriveTriColorLeds(unsigned int ledFlags);

#endif //_PLAT_LED_H
