pattern.c
void vSetLed( int16_t LED, int16_t R, int16_t G, int16_t B )
{
    if ( ( LED < NUMBER_OF_LEDS ) && ( LED >= 0 ) )
    {
        /* Saturate each color channel. */
        G = ( G < 0 ) * 0 + ( G > 255 ) * 255 + ( ( G >= 0 ) && ( G <= 255 ) ) * G;
        R = ( R < 0 ) * 0 + ( R > 255 ) * 255 + ( ( R >= 0 ) && ( R <= 255 ) ) * R;
        B = ( B < 0 ) * 0 + ( B > 255 ) * 255 + ( ( B >= 0 ) && ( B <= 255 ) ) * B;

        ucLeds[ LED ][ GRN ] = G;
        ucLeds[ LED ][ RED ] = R;
        ucLeds[ LED ][ BLU ] = B;
    }
}
/**
  * @brief  Sets the RGB value for an led.
  * @retval None
  */
@brief  Sets the RGB value for an led.
@retval None
@brief Sets the RGB value for an led . @retval None
void vSetLed( int16_t LED, int16_t R, int16_t G, int16_t B )
{
    if ( ( LED < NUMBER_OF_LEDS ) && ( LED >= 0 ) )
    {
        G = ( G < 0 ) * 0 + ( G > 255 ) * 255 + ( ( G >= 0 ) && ( G <= 255 ) ) * G;
        R = ( R < 0 ) * 0 + ( R > 255 ) * 255 + ( ( R >= 0 ) && ( R <= 255 ) ) * R;
        B = ( B < 0 ) * 0 + ( B > 255 ) * 255 + ( ( B >= 0 ) && ( B <= 255 ) ) * B;
        ucLeds[ LED ][ GRN ] = G;
        ucLeds[ LED ][ RED ] = R;
        ucLeds[ LED ][ BLU ] = B;
    }
}
void vSetLed ( int16_t LED , int16_t R , int16_t G , int16_t B ) { if ( ( LED < NUMBER_OF_LEDS ) && ( LED >= 0 ) ) { G = ( G < 0 ) * 0 + ( G > 255 ) * 255 + ( ( G >= 0 ) && ( G <= 255 ) ) * G ; R = ( R < 0 ) * 0 + ( R > 255 ) * 255 + ( ( R >= 0 ) && ( R <= 255 ) ) * R ; B = ( B < 0 ) * 0 + ( B > 255 ) * 255 + ( ( B >= 0 ) && ( B <= 255 ) ) * B ; ucLeds [ LED ] [ GRN ] = G ; ucLeds [ LED ] [ RED ] = R ; ucLeds [ LED ] [ BLU ] = B ; } }
@brief  Sets the RGB value for an led.
@brief Sets the RGB value for an led .
/* Saturate each color channel. */