]> Pileus Git - ~andy/csm213a-hw/blobdiff - hw2/timer_dma.c
Fix rising/falling edge capture
[~andy/csm213a-hw] / hw2 / timer_dma.c
index a5eb78e211f4fc17420f2d4c4c3751cf27e406f5..36fdc979e567527600268f1c27360c187460041b 100644 (file)
@@ -89,7 +89,7 @@ tdma_t *tdma_open(tdma_chan_t chan, int alt, PinName pin, PinMode mode)
                   pin >= PTC0 ? TDMA_REQ_PTC :\r
                   pin >= PTA0 ? TDMA_REQ_PTA : 0;\r
 \r
-       int irqc = mode == PullUp ? 1 : 2;\r
+       int irqc = mode == PullDown ? 1 : 2;\r
 \r
        // Initialize global registers\r
        tdma_init();\r