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

Function rt_hw_led_init

bsp/efm32/dev_led.c:147–163  ·  view source on GitHub ↗

/ * @brief * Initialize the LEDs related GPIO * * @details * * @note * * @return * Error code ******************************************************************************/

Source from the content-addressed store, hash-verified

145 * Error code
146 ******************************************************************************/
147rt_err_t rt_hw_led_init(void)
148{
149#if defined(EFM32_G8XX_STK)
150 rt_uint8_t i;
151
152 /* Configure GPIO */
153 for (i = 0; i < LEDS_MAX_NUMBER; i++)
154 {
155 GPIO_PinModeSet(
156 leds_list[i][0],
157 leds_list[i][1],
158 gpioModePushPull,
159 0);
160 }
161#endif
162 return RT_EOK;
163}
164
165/***************************************************************************//**
166 * Export to FINSH

Callers 1

rt_application_initFunction · 0.70

Calls 1

GPIO_PinModeSetFunction · 0.85

Tested by

no test coverage detected