AT24XX: Correct address calculation in Multi-Block-Read

This commit is contained in:
Frank Benkert 2016-03-08 15:31:23 -06:00 committed by Gregory Nutt
parent 624601dc2b
commit 4d9c41fd57

View File

@ -387,7 +387,8 @@ static ssize_t at24c_bread(FAR struct mtd_dev_s *dev, off_t startblock,
}
offset += priv->pagesize;
}
buffer += priv->pagesize;
}
#if CONFIG_AT24XX_MTD_BLOCKSIZE > AT24XX_PAGESIZE
return nblocks / (CONFIG_AT24XX_MTD_BLOCKSIZE / AT24XX_PAGESIZE);