[riot-notifications] [RIOT-OS/RIOT] Driver for AT24CXXX EEPROM (#11929)

fabian18 notifications at github.com
Mon Jul 29 23:19:25 CEST 2019


fabian18 commented on this pull request.



> +    page 5: 320-383
+    page 6: 384-447
+    page 7: 448-511
+    page 8: 512-575
+    ...
+ */
+static inline void _position_to_address_words(uint8_t addr[AT24CXXX_ADDR_LEN],
+                                              uint32_t pos)
+{
+    uint16_t a = pos & 0xFFFF;
+
+    addr[0] = (a & 0xFF00) >> 8;
+    addr[1] = a & 0x00FF;
+}
+
+static int _read_byte(const at24cxxx_t *dev, uint32_t pos)

How about `_read_byte()` calling `i2c_read_reg()`, while it also polls for the EEPROM to respond.

-- 
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/11929#discussion_r308442531
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190729/54357400/attachment.htm>


More information about the notifications mailing list