RaspberrPi project source code
guowenxue
2024-03-14 b3dc672c57aa5374fcd1ba1da5321d6c63d68e0f
modules/at24c.c
@@ -335,6 +335,8 @@
     * or it will over write the start bytes of this page  */
    if( offset%eeprom->pagesize )
        bytes = eeprom->pagesize - offset%eeprom->pagesize;
    else
        bytes = len>eeprom->pagesize? eeprom->pagesize : len;
    /* Write max one page at a time */
    while(len > 0)