Thirdparty/eta_ai_bsp/src/eta_bsp_led.c
/***************************************************************************/
/**
 *
 * EtaBspLedsValueSet - Set multiple LEDs based on the passed value.
 *
 * @param ui8Value value to set LEDs to.
 *
 ******************************************************************************/
Set multiple LEDs based on the passed value.
@param ui8Value value to set LEDs to.
Set multiple LEDs based on the passed value . @param ui8Value value to set LEDs to .
void
EtaBspLedsValueSet(uint8_t ui8Value)
{
    uint32_t ui32Set;
    ui32Set = (REG_GPIO_DATA_OUT.V | ETA_BS_LED_MASK);
#if ETA_BSP_LED_POLARITY_LOW_IS_ON
    ui8Value = ~ui8Value;
#endif
    ui32Set &= (((ui8Value & 0x1) << ETA_BSP_LED0) |
                (((ui8Value & 0x2) >> 1) << ETA_BSP_LED1) |
                (((ui8Value & 0x4) >> 2) << ETA_BSP_LED2) |
                (((ui8Value & 0x8) >> 3) << ETA_BSP_LED3) |
                (((ui8Value & 0x10) >> 4) << ETA_BSP_LED4));
    REG_GPIO_DATA_OUT.V = ui32Set;
}
void EtaBspLedsValueSet ( uint8_t ui8Value ) { uint32_t ui32Set ; ui32Set = ( REG_GPIO_DATA_OUT . V | ETA_BS_LED_MASK ) ; #if ETA_BSP_LED_POLARITY_LOW_IS_ON ui8Value = ~ ui8Value ; #endif ui32Set &= ( ( ( ui8Value & 0x1 ) << ETA_BSP_LED0 ) | ( ( ( ui8Value & 0x2 ) >> 1 ) << ETA_BSP_LED1 ) | ( ( ( ui8Value & 0x4 ) >> 2 ) << ETA_BSP_LED2 ) | ( ( ( ui8Value & 0x8 ) >> 3 ) << ETA_BSP_LED3 ) | ( ( ( ui8Value & 0x10 ) >> 4 ) << ETA_BSP_LED4 ) ) ; REG_GPIO_DATA_OUT . V = ui32Set ; }
EtaBspLedsValueSet - Set multiple LEDs based on the passed value.
EtaBspLedsValueSet - Set multiple LEDs based on the passed value .