[riot-notifications] [RIOT-OS/RIOT] nrf52: Implement EasyDMA-based SPI peripheral implemenation (#14057)

Koen Zandberg notifications at github.com
Tue May 12 12:08:42 CEST 2020


@bergzand commented on this pull request.



> +void spi_transfer_bytes(spi_t bus, spi_cs_t cs, bool cont,
+                        const void *out, void *in, size_t len)
+{
+    const uint8_t *out_buf = out;
+    uint8_t *in_buf = in;
+
+    assert(out_buf || in_buf);
+
+    if (cs != SPI_CS_UNDEF) {
+        gpio_clear((gpio_t)cs);
+    }
+
+    /* Enable the workaround when the length is only 1 byte */
+#ifdef CPU_MODEL_NRF52832XXAA
+    size_t _len = len;
+    if (_len == 1) {

That doesn't work in this case because `spi_conf_t::ppi` is only available when the workaround is compiled in. Unless you want me to add a dummy function for `_enable_workaround`

-- 
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/14057#discussion_r423618142
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200512/0d794835/attachment-0001.htm>


More information about the notifications mailing list