[riot-notifications] [RIOT-OS/RIOT] sys/arduino: Added SPI interface (#12118)

Marian Buschsieweke notifications at github.com
Sun Sep 8 10:19:11 CEST 2019


maribu commented on this pull request.



> +     * @brief   Transfer a single byte of data
+     * @param[in]   data        Byte to send
+     * @return  The received byte
+     */
+    uint8_t transfer(uint8_t data) {
+        transfer(&data, sizeof(data));
+        return data;
+    }
+
+    /**
+     * @brief   Transfer two bytes of data
+     * @param[in]       data        The two bytes to send
+     * @return  The received two bytes
+     */
+    uint16_t transfer16(uint16_t data) {
+        transfer(&data, sizeof(data));

I'll check the Arduino implementation on the byteorder here. Thanks for pointing that out.

`bitOrder` is about which bit is first send over the wire. I think today it safe to assune msb first. But we can add lsb first later, if a use case still popa up

-- 
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/12118#discussion_r321997013
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190908/57735cd8/attachment.htm>


More information about the notifications mailing list