Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! fixup! tests/mtd_spi_nor: A…
Browse files Browse the repository at this point in the history
…dded new tests
  • Loading branch information
crasbe committed May 29, 2024
1 parent 6eef8f2 commit b56d5f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/drivers/mtd_spi_nor/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ static void test_mtd_init(void)
/* Revert everything back to the original state */
mtd_spi_acquire(dev);

/* check that the Status Register is writable */
mtd_spi_cmd_read(dev, dev->params->opcode->rdsr, &status_reg, sizeof(status_reg));
if (status_reg & SPI_NOR_STATUS_SRWD) {
status_reg &= !SPI_NOR_STATUS_SRWD;
}

/* Send WREN command to write to the Status Register */
mtd_spi_cmd(dev, dev->params->opcode->wren);
wait_for_write_enable_set(dev);
Expand Down

0 comments on commit b56d5f4

Please sign in to comment.