From: Andy Spencer Date: Sat, 15 Mar 2014 22:17:50 +0000 (+0000) Subject: Fix rising/falling edge capture X-Git-Url: http://pileus.org/git/?p=~andy%2Fcsm213a-hw;a=commitdiff_plain;h=b9d96ef717d6223d9b6ac9d8a844f40a61bdd756 Fix rising/falling edge capture --- diff --git a/hw2/timer_dma.c b/hw2/timer_dma.c index a5eb78e..36fdc97 100644 --- a/hw2/timer_dma.c +++ b/hw2/timer_dma.c @@ -89,7 +89,7 @@ tdma_t *tdma_open(tdma_chan_t chan, int alt, PinName pin, PinMode mode) pin >= PTC0 ? TDMA_REQ_PTC : pin >= PTA0 ? TDMA_REQ_PTA : 0; - int irqc = mode == PullUp ? 1 : 2; + int irqc = mode == PullDown ? 1 : 2; // Initialize global registers tdma_init();