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

Function rt_hw_led_on

bsp/efm32/dev_led.c:52–66  ·  view source on GitHub ↗

Private variables ---------------------------------------------------------*/ Private function prototypes -----------------------------------------------*/ Private functions ---------------------------------------------------------*/ / * @brief * Turn on a LED * * @details * * @note * * @param[in] num * LED number * ********************************************************************

Source from the content-addressed store, hash-verified

50 *
51 ******************************************************************************/
52void rt_hw_led_on(rt_uint8_t num)
53{
54 RT_ASSERT(num < LEDS_MAX_NUMBER);
55
56#if defined(EFM32_G8XX_STK)
57 GPIO_PinOutSet(leds_list[num][0], leds_list[num][1]);
58#elif (defined(EFM32_GXXX_DK) || defined(EFM32GG_DK3750))
59{
60 rt_uint16_t leds;
61
62 leds = DVK_getLEDs() | (rt_uint16_t)(1 << num);
63 DVK_setLEDs(leds);
64}
65#endif
66}
67
68/***************************************************************************//**
69 * @brief

Callers 2

rt_led_thread_entryFunction · 0.70
dev_led.cFile · 0.70

Calls 3

GPIO_PinOutSetFunction · 0.85
DVK_getLEDsFunction · 0.50
DVK_setLEDsFunction · 0.50

Tested by

no test coverage detected