[riot-notifications] [RIOT-OS/RIOT] cpu/native: Allow Access to Hardware SPI Bus on Linux (#11352)

benpicco notifications at github.com
Mon Sep 30 17:34:11 CEST 2019


benpicco commented on this pull request.



> +            spi_tf.rx_buf = (uint64_t)in_addr;
+            spi_tf.tx_buf = (uint64_t)out_addr;
+
+            if (ENABLE_DEBUG) {
+                DEBUG("spi_transfer_bytes: -> ");
+                for (size_t i = 0; i < len; i++) {
+                    DEBUG(" %02x", out != NULL ? ((uint8_t *)out)[i] : 0);
+                }
+                DEBUG("\n");
+            }
+
+            if (real_ioctl(fd, SPI_IOC_MESSAGE(1), &spi_tf) < 0) {
+                DEBUG("spi_transfer_bytes: ioctl failed\n");
+            }
+            else {
+                if (ENABLE_DEBUG) {

I can imagine :)
But it looks better with the scaffolding removed once the implementation is working. 

-- 
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/11352#discussion_r329645727
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190930/ce5336f9/attachment.htm>


More information about the notifications mailing list