]> Pileus Git - ~andy/csm213a-hw/blobdiff - hw2/timer_dma.h
Refactor main into separate files
[~andy/csm213a-hw] / hw2 / timer_dma.h
index cf672d04603f6ccb2a721365ab41ea0f0116740a..cfc174bb58921ccdbccb343801f01c2fb0f76042 100644 (file)
@@ -24,15 +24,19 @@ typedef enum {
 typedef struct tdma_t tdma_t;
 
 /* Open */
-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