mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
AT24XX: Correct address calculation in Multi-Block-Read
This commit is contained in:
committed by
Gregory Nutt
parent
624601dc2b
commit
4d9c41fd57
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user