/******************************************************************************
  Function:
    void APP_ADC_AverageOnLEDs ( void )

   Description:
    Display the magnitude of the ADC value on LEDs.
*/

void APP_ADC_AverageOnLEDs ( void )
{
    /* Convert 10-bit ADC value to 2-bits */
    appData.potValue >>= 8;

    /* Display the magnitude of the ADC value on LEDs.  Use the Board Support
       Package (BSP) library to turn LEDs on and off. */
    switch ( appData.potValue )
    {    
        case 0b00:
        {
            BSP_LEDOn(BSP_LED_3);
            BSP_LEDOff(BSP_LED_4);
            BSP_LEDOff(BSP_LED_5);
            BSP_LEDOff(BSP_LED_6);
            break;
        }

        case 0b01:
        {
            BSP_LEDOn(BSP_LED_3);
            BSP_LEDOn(BSP_LED_4);
            BSP_LEDOff(BSP_LED_5);
            BSP_LEDOff(BSP_LED_6);
            break;
        }

        case 0b10:
        {
            BSP_LEDOn(BSP_LED_3);
            BSP_LEDOn(BSP_LED_4);
            BSP_LEDOn(BSP_LED_5);
            BSP_LEDOff(BSP_LED_6);
            break;
        }        
        case 0b11:
        {
            BSP_LEDOn(BSP_LED_3);
            BSP_LEDOn(BSP_LED_4);
            BSP_LEDOn(BSP_LED_5);
            BSP_LEDOn(BSP_LED_6);
            break;
        }

        default:
        {
            break;
        }
    }
}