[riot-notifications] [RIOT-OS/RIOT] cpu/sam0: re-work i2c driver (#7588)

lebrush notifications at github.com
Fri Sep 22 14:07:07 CEST 2017


lebrush commented on this pull request.



>  
 /**
  * @brief Array holding one pre-initialized mutex for each I2C device
  */
-static mutex_t locks[] = {
-#if I2C_0_EN
-    [I2C_0] = MUTEX_INIT,
-#endif
-#if I2C_1_EN
-    [I2C_1] = MUTEX_INIT,
-#endif
-#if I2C_2_EN
-    [I2C_2] = MUTEX_INIT
-#endif
-#if I2C_3_EN
-    [I2C_3] = MUTEX_INIT
-#endif
-};
+static mutex_t locks[I2C_NUMOF];

It's a good options, but I think this syntax is only GCC compliant

-- 
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/7588#discussion_r140476840
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170922/35d0f1c2/attachment.html>


More information about the notifications mailing list