mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/at2[45]: EEPROMs can be written byte-wise
See-Also: https://github.com/RIOT-OS/RIOT/pull/17683#discussion_r815362737
This commit is contained in:
parent
52ea93ef03
commit
d764e037bf
@ -41,6 +41,7 @@ static int _mtd_at24cxxx_init(mtd_dev_t *mtd)
|
||||
mtd->pages_per_sector = 1;
|
||||
mtd->sector_count = DEV(mtd)->params.eeprom_size /
|
||||
DEV(mtd)->params.page_size;
|
||||
mtd->write_size = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,7 @@ static int mtd_at25xxx_init(mtd_dev_t *dev)
|
||||
dev->pages_per_sector = 1;
|
||||
dev->page_size = mtd_at25xxx->params->page_size;
|
||||
dev->sector_count = mtd_at25xxx->params->size / mtd_at25xxx->params->page_size;
|
||||
dev->write_size = 1;
|
||||
return 0;
|
||||
}
|
||||
return -EIO;
|
||||
|
Loading…
Reference in New Issue
Block a user