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

Function list_leds

bsp/efm32/dev_led.c:171–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169#include <finsh.h>
170
171void list_leds(void)
172{
173 rt_uint8_t i;
174
175 rt_kprintf(" led \t port \t pin \t state\n");
176 rt_kprintf(" -----\t -----\t -----\t -----\n");
177
178 for (i = 0; i < LEDS_MAX_NUMBER; i++)
179 {
180#if defined(EFM32_G8XX_STK)
181 rt_kprintf(" %d \t %x \t %x \t %x \n",
182 i, leds_list[i][0], leds_list[i][1], rt_hw_led_state(i));
183#elif (defined(EFM32_GXXX_DK) || defined(EFM32GG_DK3750))
184 rt_uint16_t leds;
185
186 leds = DVK_getLEDs();
187 rt_kprintf(" %d \t FPGA \t FPGA \t %x \n",
188 i, (leds & (1 << i))? 1 : 0);
189#endif
190 }
191}
192FINSH_FUNCTION_EXPORT(list_leds, list all the LEDs.)
193
194void set_led(rt_uint32_t led, rt_uint32_t state)

Callers

nothing calls this directly

Calls 3

rt_kprintfFunction · 0.85
rt_hw_led_stateFunction · 0.85
DVK_getLEDsFunction · 0.50

Tested by

no test coverage detected