From: Keith Packard Date: Mon, 18 Aug 2014 03:57:16 +0000 (-0700) Subject: cc1111: Wait for internal flash write to complete X-Git-Tag: 1.4.9.3~9 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=1530c24cc75cdf9ba87c7e153ff28bf7beb4384c 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 --- 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