diff options
author | Paul Selkirk <paul@psgd.org> | 2017-02-19 19:23:18 -0500 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2017-02-19 19:23:18 -0500 |
commit | e9011a1ae42333fdcbebf9b85ced6ea942f3547c (patch) | |
tree | 344d7139300c440e5879ec6a2855bb1c97367f69 /stm-fpgacfg.c | |
parent | 742cbe3d4090d62ee5f871e487ce88145d12c04e (diff) |
Remove unnecessary delays in flash code.
Diffstat (limited to 'stm-fpgacfg.c')
-rw-r--r-- | stm-fpgacfg.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/stm-fpgacfg.c b/stm-fpgacfg.c index 1f15f88..d3a9aec 100644 --- a/stm-fpgacfg.c +++ b/stm-fpgacfg.c @@ -96,15 +96,6 @@ int fpgacfg_erase_sectors(int num) { if (num > N25Q128_NUM_SECTORS || num < 0) num = N25Q128_NUM_SECTORS; while (num) { - int timeout = 200; /* times 10ms = 2 seconds timeout */ - while (timeout--) { - int i = n25q128_get_wip_flag(&fpgacfg_ctx); - if (i < 0) return 0; - if (! i) break; - HAL_Delay(10); - } - if (! timeout) return 0; - if (! n25q128_erase_sector(&fpgacfg_ctx, num - 1)) { return -1; } |