diff options
author | Keith Packard <keithp@keithp.com> | 2014-08-17 20:57:16 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-08-17 20:57:16 -0700 |
commit | 1530c24cc75cdf9ba87c7e153ff28bf7beb4384c (patch) | |
tree | dd5dd9d6cd1aadca2194fc6de670093912ff5b35 /src/cc1111 | |
parent | 80e20b241359452028298567c76b2f644da5ad23 (diff) |
cc1111: Wait for internal flash write to complete
This ensures that we don't try to start another write too soon.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/cc1111')
-rw-r--r-- | src/cc1111/ao_intflash.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cc1111/ao_intflash.c b/src/cc1111/ao_intflash.c index 632e2a85..eb3535c6 100644 --- a/src/cc1111/ao_intflash.c +++ b/src/cc1111/ao_intflash.c @@ -129,6 +129,8 @@ ao_intflash_write_aligned(uint16_t pos, __xdata void *d, uint16_t len) __reentra nop _endasm; } + __critical while (!ao_intflash_dma_done) + ao_sleep(&ao_intflash_dma_done); } static void |