RaspberrPi project source code
Guo Wenxue
2024-07-06 f67df94069569d193ee2cc8d70dd9747cc2574a4
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)