[riot-notifications] [RIOT-OS/RIOT] U8g2: Refactoring and minor fixes (#10693)

Petr notifications at github.com
Thu Jan 3 18:06:51 CET 2019


pvyleta commented on this pull request.



>  uint8_t u8x8_byte_riotos_hw_i2c(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr)
 {
-    static uint8_t buffer[255];
-    static uint8_t index;
+    static uint8_t buffer[32]; /* u8g2/u8x8 will never send more than 32 bytes between START_TRANSFER and END_TRANSFER */
+    static size_t index;
+
+    const u8x8_riotos_t u8x8_riot_ptr = u8g2->user_ptr;
+
+    // Check that user_ptr is correctly set
+    if (NULL == u8x8_riot_ptr) {

Agreed.

-- 
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/10693#discussion_r245067633
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190103/ed2b7e0e/attachment.html>


More information about the notifications mailing list