1
0
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:
chrysn 2022-02-27 00:04:37 +01:00
parent 52ea93ef03
commit d764e037bf
2 changed files with 2 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;