MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_hw_led_state

Function rt_hw_led_state

bsp/efm32/dev_led.c:124–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124rt_uint8_t rt_hw_led_state(rt_uint8_t num)
125{
126 RT_ASSERT(num < LEDS_MAX_NUMBER);
127
128#if defined(EFM32_G8XX_STK)
129 return (rt_uint8_t)GPIO_PinInGet(leds_list[num][0], leds_list[num][1]);
130#elif (defined(EFM32_GXXX_DK) || defined(EFM32GG_DK3750))
131 return ((DVK_getLEDs() & (rt_uint16_t)(1 << num)) >> num);
132#endif
133
134}
135
136/***************************************************************************//**
137 * @brief

Callers 1

list_ledsFunction · 0.85

Calls 2

GPIO_PinInGetFunction · 0.85
DVK_getLEDsFunction · 0.50

Tested by

no test coverage detected