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/11894/head
Kyle Kearney 2019-09-23 16:50:36 -07:00 committed by adbridge
parent 1647f21b8d
commit 8c82524517
1 changed files with 2 additions and 2 deletions

View File

@ -145,11 +145,11 @@ void flash_init(Qspi &qspi)
// Zero out status register to attempt to clear block protection bits
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);
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);
TEST_ASSERT_EQUAL(QSPI_STATUS_OK, ret);