AT24XX: Correct address calculation in Multi-Block-Read
This commit is contained in:
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);
|
||||
|
Loading…
Reference in New Issue
Block a user