[riot-notifications] [RIOT-OS/RIOT] 16-bits register addressing support (#16711)

benpicco notifications at github.com
Thu Aug 5 15:44:39 CEST 2021


@benpicco commented on this pull request.



>  
     if (flags & (I2C_NOSTART | I2C_ADDR10)) {
         return -EOPNOTSUPP;
     }
 
-    /* the nrf52's TWI device does not support to do two consecutive transfers
-     * without a repeated start condition in between. So we have to put all data
-     * to be transferred into a temporary buffer
-     *
-     * CAUTION: this might become critical when transferring large blocks of
-     *          data as the temporary buffer is allocated on the stack... */
+    /* Resets the TX buffer */
+    memset(tx_buf, 0, sizeof(tx_buf));

That should not be needed, we already overwrite it with `memcpy` and do not transfer more bytes than written to it. 

-- 
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/16711#pullrequestreview-723372725
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210805/2c2801dc/attachment-0001.htm>


More information about the notifications mailing list