/ * @brief * Toggle the state of a LED * * @details * * @note * * @param[in] num * LED number * ******************************************************************************/
| 106 | * |
| 107 | ******************************************************************************/ |
| 108 | void rt_hw_led_toggle(rt_uint8_t num) |
| 109 | { |
| 110 | RT_ASSERT(num < LEDS_MAX_NUMBER); |
| 111 | |
| 112 | #if defined(EFM32_G8XX_STK) |
| 113 | GPIO_PinOutToggle(leds_list[num][0], leds_list[num][1]); |
| 114 | #elif (defined(EFM32_GXXX_DK) || defined(EFM32GG_DK3750)) |
| 115 | { |
| 116 | rt_uint16_t leds; |
| 117 | |
| 118 | leds = DVK_getLEDs() ^ (rt_uint16_t)(1 << num); |
| 119 | DVK_setLEDs(leds); |
| 120 | } |
| 121 | #endif |
| 122 | } |
| 123 | |
| 124 | rt_uint8_t rt_hw_led_state(rt_uint8_t num) |
| 125 | { |
no test coverage detected