mirror of https://github.com/ARMmbed/mbed-os.git
Remove hard-coded instruction ids from QSPI Tests
Replace with macros from the test flash_config header, consistent with how most commands are built in this test.pull/11531/head
parent
60e4d14577
commit
cc4d428f3f
|
@ -145,11 +145,11 @@ void flash_init(Qspi &qspi)
|
||||||
// Zero out status register to attempt to clear block protection bits
|
// Zero out status register to attempt to clear block protection bits
|
||||||
uint8_t blanks[QSPI_STATUS_REG_SIZE] = {0};
|
uint8_t blanks[QSPI_STATUS_REG_SIZE] = {0};
|
||||||
|
|
||||||
qspi.cmd.build(0x06);
|
qspi.cmd.build(QSPI_CMD_WREN);
|
||||||
ret = qspi_command_transfer(&qspi.handle, qspi.cmd.get(), NULL, 0, NULL, 0);
|
ret = qspi_command_transfer(&qspi.handle, qspi.cmd.get(), NULL, 0, NULL, 0);
|
||||||
TEST_ASSERT_EQUAL(QSPI_STATUS_OK, ret);
|
TEST_ASSERT_EQUAL(QSPI_STATUS_OK, ret);
|
||||||
|
|
||||||
qspi.cmd.build(0x01);
|
qspi.cmd.build(QSPI_CMD_WRSR);
|
||||||
ret = qspi_command_transfer(&qspi.handle, qspi.cmd.get(), blanks, 1, NULL, 0);
|
ret = qspi_command_transfer(&qspi.handle, qspi.cmd.get(), blanks, 1, NULL, 0);
|
||||||
TEST_ASSERT_EQUAL(QSPI_STATUS_OK, ret);
|
TEST_ASSERT_EQUAL(QSPI_STATUS_OK, ret);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue