We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6efba38 commit b4a9f1dCopy full SHA for b4a9f1d
drivers/flash/flash_sam0.c
@@ -454,6 +454,13 @@ flash_sam0_get_parameters(const struct device *dev)
454
return &flash_sam0_parameters;
455
}
456
457
+static int flash_sam0_get_size(const struct device *dev, uint64_t *size)
458
+{
459
+ *size = (uint64_t)CONFIG_FLASH_SIZE;
460
+
461
+ return 0;
462
+}
463
464
static int flash_sam0_init(const struct device *dev)
465
{
466
#if defined(CONFIG_MULTITHREADING)
@@ -485,6 +492,7 @@ static const struct flash_driver_api flash_sam0_api = {
485
492
.write = flash_sam0_write,
486
493
.read = flash_sam0_read,
487
494
.get_parameters = flash_sam0_get_parameters,
495
+ .get_size = flash_sam0_get_size,
488
496
#ifdef CONFIG_FLASH_PAGE_LAYOUT
489
497
.page_layout = flash_sam0_page_layout,
490
498
#endif
0 commit comments