aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spiflash_n25q128.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/spiflash_n25q128.c b/spiflash_n25q128.c
index 728db7e..0c2abd7 100644
--- a/spiflash_n25q128.c
+++ b/spiflash_n25q128.c
@@ -356,6 +356,12 @@ int n25q128_write_data(struct spiflash_ctx *ctx, uint32_t offset, const uint8_t
*/
}
+ /*
+ * Wait until last write finishes.
+ */
+
+ if (! _wait_while_wip(ctx, 1000)) return -7;
+
return 1;
}