diff options
Diffstat (limited to 'testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c')
-rw-r--r-- | testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c b/testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c index bd506f9e8..08e82a9ea 100644 --- a/testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c +++ b/testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c @@ -79,6 +79,7 @@ static THD_FUNCTION(Thread1, arg) { */
int main(void) {
flash_error_t err;
+ uint8_t *addr;
/*
* System initializations.
@@ -127,6 +128,12 @@ int main(void) { if (err != FLASH_ERROR_VERIFY)
chSysHalt("verify non-erase error");
+ /* Memory mapping the device.*/
+ m25qMemoryMap(&m25q, &addr);
+
+ /* Unmapping the device.*/
+ m25qMemoryUnmap(&m25q);
+
/* Reading it back.*/
err = flashRead(&m25q, 0, buffer, 128);
if (err != FLASH_NO_ERROR)
|