#ifndef TIMER_DMA_H #define TIMER_DMA_H #include #include #include #ifdef __cplusplus extern "C" { #endif /* Sizes */ #define TDMA_NUM_CHAN 4 /* DMA Channels */ typedef enum { TDMA_CHAN0, TDMA_CHAN1, TDMA_CHAN2, TDMA_CHAN3, } tdma_chan_t; /* Port */ typedef struct tdma_t tdma_t; /* Open */ tdma_t *tdma_open(tdma_chan_t chan, int alt, PinName pin, PinMode mode); /* Flush/Wait */ 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 #endif