X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=hw2%2Ftimer_dma.h;h=41370fbe7e5ceb9e257f254b8eb76a10538162f5;hb=16ad7d215971b9bbd79007f7c334c4f8d9659c49;hp=cf672d04603f6ccb2a721365ab41ea0f0116740a;hpb=016f9302e4a8fba1c55fee31dcb2662b370a9298;p=~andy%2Fcsm213a-hw diff --git a/hw2/timer_dma.h b/hw2/timer_dma.h index cf672d0..41370fb 100644 --- a/hw2/timer_dma.h +++ b/hw2/timer_dma.h @@ -27,12 +27,19 @@ typedef struct tdma_t tdma_t; void tdma_init(void); /* Open */ -tdma_t *tdma_open(tdma_chan_t chan, PinName pin, PinMode mode); +tdma_t *tdma_open(tdma_chan_t chan, int alt, PinName pin, PinMode mode); /* Flush/Wait */ -void tdma_reset(tdma_t *port); +void tdma_start(tdma_t *port); +void tdma_stop(tdma_t *port, int wait); int tdma_stamp(tdma_t *port, uint64_t *time); +/* Time */ +uint64_t tdma_time(void); + +/* Debug print */ +void tdma_debug(tdma_t *port); + #ifdef __cplusplus } #endif