[riot-notifications] [RIOT-OS/RIOT] cpu/qn908x: Implement blocking SPI support (#15689)

benpicco notifications at github.com
Sun Jan 24 20:13:19 CET 2021

@benpicco commented on this pull request.

> +    return SPI_OK;
+void spi_deinit_pins(spi_t bus)
+    assert(bus < SPI_NUMOF);
+    mutex_lock(&locks[bus]);
+    const spi_conf_t *const conf = &spi_config[bus];
+    /* Disables the SPI block. It must be already idle. */
+    conf->dev->CFG &= ~SPI_CFG_ENABLE_MASK;
+    gpio_init(conf->copi_pin, GPIO_IN);
+    gpio_init(conf->cipo_pin, GPIO_IN);
+    gpio_init(conf->clk_pin, GPIO_IN);

I think there is also no other CPU that implements HW CS, so this didn't come up.

> You are also free to call gpio_init on any of these pins without de-initializing them for this particular CPU,

Well then no further action is needed :) 

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210124/13ea5d17/attachment-0001.htm>

More information about the notifications mailing list