[riot-notifications] [RIOT-OS/RIOT] stm32/spi : Add check for GPIO_UNDEF (#16625)

Francisco notifications at github.com
Thu Jul 8 09:24:23 CEST 2021


@fjmolinas commented on this pull request.



> +    if (gpio_is_valid(spi_config[bus].mosi_pin)) {
+        gpio_init(spi_config[bus].mosi_pin, GPIO_OUT);
+        gpio_init_af(spi_config[bus].mosi_pin, spi_config[bus].mosi_af);
+    }
+
+    if (gpio_is_valid(spi_config[bus].miso_pin)) {
+        gpio_init(spi_config[bus].miso_pin, GPIO_IN);
+        gpio_init_af(spi_config[bus].miso_pin, spi_config[bus].miso_af);
+    }
+
+    if (gpio_is_valid(spi_config[bus].sclk_pin)) {
+        gpio_init(spi_config[bus].sclk_pin, GPIO_OUT);
+        gpio_init_af(spi_config[bus].sclk_pin, spi_config[bus].sclk_af);
+    }

Ok, dismissing my comment

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16625#discussion_r665936664
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210708/7ad24adc/attachment.htm>


More information about the notifications mailing list