Skip to content

Commit

Permalink
ports/mimxrt: Update led driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
iabdalkader committed Nov 26, 2023
1 parent 2e5cf43 commit 16b40d3
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions ports/mimxrt/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 16b40d3

Please sign in to comment.