diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-06-01 14:53:12 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-06-01 14:53:12 +0000 |
commit | 5c0d7fa73218e5e4521d9e8c4547df1211109796 (patch) | |
tree | 68982e623366db8cddb91b5ec21847e501efd341 /testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c | |
parent | 78f63bd88dfe86e2d64c57c90387041e582fa285 (diff) | |
download | ChibiOS-5c0d7fa73218e5e4521d9e8c4547df1211109796.tar.gz ChibiOS-5c0d7fa73218e5e4521d9e8c4547df1211109796.tar.bz2 ChibiOS-5c0d7fa73218e5e4521d9e8c4547df1211109796.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9552 35acf78f-673a-0410-8e92-d51de3d6d3f4
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)
|