diff options
| author | Keith Packard <keithp@keithp.com> | 2009-10-30 16:39:15 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2009-10-30 16:39:15 -0700 |
| commit | 7b14c3e609749f4fc00dbd660541375048535218 (patch) | |
| tree | f541994c38eb4df935bd0113cf948742d8ef8bdf /src/ao_dma.c | |
| parent | 690fc263516d8beb6b24e86fbcd6588f42ce4e5c (diff) | |
Initial packet bits. Just testing transmission
Diffstat (limited to 'src/ao_dma.c')
| -rw-r--r-- | src/ao_dma.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ao_dma.c b/src/ao_dma.c index a4d45f14..704108e6 100644 --- a/src/ao_dma.c +++ b/src/ao_dma.c @@ -102,11 +102,13 @@ ao_dma_trigger(uint8_t id) } void -ao_dma_abort(uint8_t id) +ao_dma_abort(uint8_t id, uint8_t reason) { uint8_t mask = (1 << id); DMAARM = 0x80 | mask; DMAIRQ &= ~mask; + *(ao_dma_done[id]) |= reason; + ao_wakeup(ao_dma_done[id]); } void @@ -122,7 +124,7 @@ ao_dma_isr(void) interrupt 8 DMAIF = 0; /* Clear the completed ID */ DMAIRQ = ~mask; - *(ao_dma_done[id]) = 1; + *(ao_dma_done[id]) |= AO_DMA_DONE; ao_wakeup(ao_dma_done[id]); break; } |
