src/bsp.c
static void code_color(uint8_t *ptr, uint8_t *color)
{
	uint8_t i;
    for (i = 0u; i < 8u; i++)
    {
        if ((*color) & ((uint8_t)1u << i)) {
            *(ptr + i) = TIM2_T1H;
        } else {
            *(ptr + i) = TIM2_T0H;
        }
    }
}
/**
 * @brief Code 8-bit color data with PWM values for TIM2
 * 
 * @param ptr       Pointer to byte array
 * @param color     Pointer to color 8-bit data
 */
@brief Code 8-bit color data with PWM values for TIM2

@param ptr       Pointer to byte array
@param color     Pointer to color 8-bit data
@brief Code 8 - bit color data with PWM values for TIM2 @param ptr Pointer to byte array @param color Pointer to color 8 - bit data
static void code_color(uint8_t *ptr, uint8_t *color)
{
	uint8_t i;
    for (i = 0u; i < 8u; i++)
    {
        if ((*color) & ((uint8_t)1u << i)) {
            *(ptr + i) = TIM2_T1H;
        } else {
            *(ptr + i) = TIM2_T0H;
        }
    }
}
static void code_color ( uint8_t * ptr , uint8_t * color ) { uint8_t i ; for ( i = 0u ; i < 8u ; i ++ ) { if ( ( * color ) & ( ( uint8_t ) 1u << i ) ) { * ( ptr + i ) = TIM2_T1H ; } else { * ( ptr + i ) = TIM2_T0H ; } } }
@brief Code 8-bit color data with PWM values for TIM2
@brief Code 8 - bit color data with PWM values for TIM2