Skip to content

Commit

Permalink
tests: flash: erase_blocks: Add support of flash program size > 128
Browse files Browse the repository at this point in the history
Fix failed test for platforms with flash program size > 128 bytes.
Update supported program size to 512 bytes, the highest supported
program size by Zephyr platforms.

Signed-off-by: Andrej Butok <[email protected]>
  • Loading branch information
butok authored and carlescufi committed Aug 1, 2024
1 parent 1243544 commit 7a1c286
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/drivers/flash/erase_blocks/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ LOG_MODULE_REGISTER(test_flash);
DT_MTD_FROM_FIXED_PARTITION(TEST_FLASH_PART_NODE)

static const struct device *flash_controller = DEVICE_DT_GET(TEST_FLASH_CONTROLLER_NODE);
static uint8_t test_write_block[128];
static uint8_t test_read_block[128];
static uint8_t test_write_block[512];
static uint8_t test_read_block[512];

static void test_flash_fill_test_write_block(void)
{
for (uint8_t i = 0; i < sizeof(test_write_block); i++) {
test_write_block[i] = i;
for (size_t i = 0; i < sizeof(test_write_block); i++) {
test_write_block[i] = (uint8_t)i;
}
}

Expand Down

0 comments on commit 7a1c286

Please sign in to comment.