From: Keith Packard Date: Wed, 29 Jun 2016 00:12:48 +0000 (-0700) Subject: altos/stm: use 0xff for dma mutex value for allocated mutexes X-Git-Tag: 1.6.5~1^2~21 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=785d2697376ebd20531d22441a60c41bd927b42a altos/stm: use 0xff for dma mutex value for allocated mutexes DMA channels which are 'allocated' can't be shared. Instead of using the value '1' in the related 'mutex', use 0xff which won't match any task. Signed-off-by: Keith Packard --- diff --git a/src/stm/ao_dma_stm.c b/src/stm/ao_dma_stm.c index 298a15b5..93b7fb47 100644 --- a/src/stm/ao_dma_stm.c +++ b/src/stm/ao_dma_stm.c @@ -64,7 +64,7 @@ ao_dma_set_transfer(uint8_t index, if (ao_dma_allocated[index]) { if (ao_dma_mutex[index]) ao_panic(AO_PANIC_DMA); - ao_dma_mutex[index] = 1; + ao_dma_mutex[index] = 0xff; } else ao_mutex_get(&ao_dma_mutex[index]); ao_arch_critical(