RaspberrPi project source code
guowenxue
2024-04-11 69b42a43ca4b2d93be203c34f6b45f5de1e32a15
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)