From: Keith Packard Date: Wed, 29 Aug 2012 01:05:10 +0000 (-0700) Subject: altos: When sharing radio DMA for AES, use it for in instead of out X-Git-Tag: 1.1~62 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=f2d919a2147025daa332957cda6d91959e4731ab altos: When sharing radio DMA for AES, use it for in instead of out We look at the out_done value, but not the in_done value; if we use the radio DMA for out, we would have to use ao_radio_dma_done to check for completion. This way, we can ignore that value and use the existing ao_aes_dma_out_done value. Signed-off-by: Keith Packard --- diff --git a/src/cc1111/ao_aes.c b/src/cc1111/ao_aes.c index 0e32abf6..b1f305ec 100644 --- a/src/cc1111/ao_aes.c +++ b/src/cc1111/ao_aes.c @@ -135,12 +135,12 @@ ao_aes_run(__xdata uint8_t *in, void ao_aes_init(void) { - ao_aes_dma_in = ao_dma_alloc(&ao_aes_dma_in_done); #if DMA_SHARE_AES_RADIO - ao_aes_dma_out = ao_radio_dma; + ao_aes_dma_in = ao_radio_dma; #else - ao_aes_dma_out = ao_dma_alloc(&ao_aes_dma_out_done); + ao_aes_dma_in = ao_dma_alloc(&ao_aes_dma_in_done); #endif + ao_aes_dma_out = ao_dma_alloc(&ao_aes_dma_out_done); S0CON = 0; ENCIE = 1; }