File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
tests/drivers/flash/common/boards Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1676,11 +1676,19 @@ flash_nor_get_parameters(const struct device *dev)
1676
1676
return & flash_nor_parameters ;
1677
1677
}
1678
1678
1679
+ static int flash_nor_get_size (const struct device * dev , uint64_t * size )
1680
+ {
1681
+ * size = (uint64_t )dev_flash_size (dev );
1682
+
1683
+ return 0 ;
1684
+ }
1685
+
1679
1686
static const struct flash_driver_api spi_nor_api = {
1680
1687
.read = spi_nor_read ,
1681
1688
.write = spi_nor_write ,
1682
1689
.erase = spi_nor_erase ,
1683
1690
.get_parameters = flash_nor_get_parameters ,
1691
+ .get_size = flash_nor_get_size ,
1684
1692
#if defined(CONFIG_FLASH_PAGE_LAYOUT )
1685
1693
.page_layout = spi_nor_pages_layout ,
1686
1694
#endif
Original file line number Diff line number Diff line change 1
1
CONFIG_SPI=y
2
2
CONFIG_SPI_NOR=y
3
3
CONFIG_SOC_FLASH_NRF=n
4
+ CONFIG_TEST_DRIVER_FLASH_SIZE=2097152
You can’t perform that action at this time.
0 commit comments