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

Function rt_hw_led_off

bsp/efm32/dev_led.c:80–94  ·  view source on GitHub ↗

/ * @brief * Turn off a LED * * @details * * @note * * @param[in] num * LED number * ******************************************************************************/

Source from the content-addressed store, hash-verified

78 *
79 ******************************************************************************/
80void rt_hw_led_off(rt_uint8_t num)
81{
82 RT_ASSERT(num < LEDS_MAX_NUMBER);
83
84#if defined(EFM32_G8XX_STK)
85 GPIO_PinOutClear(leds_list[num][0], leds_list[num][1]);
86#elif (defined(EFM32_GXXX_DK) || defined(EFM32GG_DK3750))
87{
88 rt_uint16_t leds;
89
90 leds = DVK_getLEDs() & ~(rt_uint16_t)(1 << num);
91 DVK_setLEDs(leds);
92}
93#endif
94}
95
96/***************************************************************************//**
97 * @brief

Callers 1

dev_led.cFile · 0.70

Calls 3

GPIO_PinOutClearFunction · 0.85
DVK_getLEDsFunction · 0.50
DVK_setLEDsFunction · 0.50

Tested by

no test coverage detected