From 16b40d39d36c7b1d913012f4ddc990fdd5e0abe0 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Sun, 26 Nov 2023 17:19:30 +0100 Subject: [PATCH] ports/mimxrt: Update led driver. --- ports/mimxrt/led.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/ports/mimxrt/led.c b/ports/mimxrt/led.c index 216affa227ec..99876a5d9005 100644 --- a/ports/mimxrt/led.c +++ b/ports/mimxrt/led.c @@ -52,19 +52,7 @@ void led_init(void) { // Turn off LEDs and initialize for (mp_int_t led = 0; led < NUM_LEDS; led++) { const machine_pin_obj_t *led_pin = machine_led_obj[led].led_pin; - - gpio_pin_config_t pin_config = { - .outputLogic = 1U, - .direction = kGPIO_DigitalOutput, - .interruptMode = kGPIO_NoIntmode, - }; - - GPIO_PinInit(led_pin->gpio, led_pin->pin, &pin_config); - - // ALT mode for GPIO is always 5 - IOMUXC_SetPinMux(led_pin->muxRegister, 5U, 0, 0, led_pin->configRegister, - 1U); // Software Input On Field: Input Path is determined by functionality - IOMUXC_SetPinConfig(led_pin->muxRegister, 5U, 0, 0, led_pin->configRegister, 0x10B0U); + mp_hal_pin_output(led_pin); MICROPY_HW_LED_OFF(led_pin); } }