Skip to content

Commit 8c82524

Browse files
Kyle Kearneyadbridge
authored andcommitted
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.
1 parent 1647f21 commit 8c82524

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TESTS/mbed_hal/qspi/qspi_test_utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ void flash_init(Qspi &qspi)
145145
// Zero out status register to attempt to clear block protection bits
146146
uint8_t blanks[QSPI_STATUS_REG_SIZE] = {0};
147147

148-
qspi.cmd.build(0x06);
148+
qspi.cmd.build(QSPI_CMD_WREN);
149149
ret = qspi_command_transfer(&qspi.handle, qspi.cmd.get(), NULL, 0, NULL, 0);
150150
TEST_ASSERT_EQUAL(QSPI_STATUS_OK, ret);
151151

152-
qspi.cmd.build(0x01);
152+
qspi.cmd.build(QSPI_CMD_WRSR);
153153
ret = qspi_command_transfer(&qspi.handle, qspi.cmd.get(), blanks, 1, NULL, 0);
154154
TEST_ASSERT_EQUAL(QSPI_STATUS_OK, ret);
155155

0 commit comments

Comments
 (0)