Fix callback type.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 23 May 2011 16:36:49 +0000 (16:36 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 23 May 2011 16:36:49 +0000 (16:36 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4915 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/drv/dac.h

index bfa53c316579f56e0edf5d246f5f44d1b6a53daa..c720f756521257e5c93ec6b2eb8f493112731c1d 100644 (file)
@@ -66,7 +66,7 @@ typedef void (*DmaConversionBufFunc_t) (struct Dac *dac, void *buf, size_t len);
 typedef bool (*DmaConversionIsFinished_t) (struct Dac *dac);
 typedef void (*DmaStartStreamingFunc_t) (struct Dac *dac, void *buf, size_t len, size_t slice_len);
 typedef void (*DmaStopFunc_t) (struct Dac *dac);
-typedef void (*DmaCallbackFunc_t) (struct Dac *dac);
+typedef void (*DmaCallbackFunc_t) (struct Dac *dac, void *_buf, size_t len);
 
 typedef struct DacContext
 {
@@ -77,7 +77,7 @@ typedef struct DacContext
        DmaConversionIsFinished_t isFinished;
        DmaStartStreamingFunc_t start;
        DmaStopFunc_t stop;
-       DmaCallbackFunc_t *callback;
+       DmaCallbackFunc_t callback;
        size_t slice_len;
 
        DB(id_t _type);
@@ -131,7 +131,7 @@ INLINE bool dac_dmaIsFinished(Dac *dac)
 /*
  * \param slicelen Must be a divisor of len, ie. len % slicelen == 0.
  */
-INLINE void dac_dmaStartStreaming(Dac *dac, void *buf, size_t len, size_t slice_len, DmaCallbackFunc_t *callback)
+INLINE void dac_dmaStartStreaming(Dac *dac, void *buf, size_t len, size_t slice_len, DmaCallbackFunc_t callback)
 {
        ASSERT(dac->ctx.start);
        ASSERT(len % slice_len == 0);