summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-08-28 18:05:10 -0700
committerKeith Packard <keithp@keithp.com>2012-08-28 23:00:22 -0700
commitf2d919a2147025daa332957cda6d91959e4731ab (patch)
treee04b09baaa1aaa1c0d4287b81d14ba36ec37e097 /src
parent31b42b99edbb976534ac432c07e218f13d1f5f9b (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/cc1111/ao_aes.c6
1 files changed, 3 insertions, 3 deletions
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;
}