| 169 | #include <finsh.h> |
| 170 | |
| 171 | void 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 | } |
| 192 | FINSH_FUNCTION_EXPORT(list_leds, list all the LEDs.) |
| 193 | |
| 194 | void set_led(rt_uint32_t led, rt_uint32_t state) |
nothing calls this directly
no test coverage detected