summaryrefslogtreecommitdiff
path: root/bsp/k210/driver/dmalock.h
diff options
context:
space:
mode:
authorchunyexixiaoyu <[email protected]>2021-10-14 16:31:46 +0800
committerchunyexixiaoyu <[email protected]>2021-10-14 17:23:25 +0800
commitaa09f2b5c21994ad72a32f16c21b10cbd4a5cfb5 (patch)
treefba9643b627b833ea22d1c55eb249ce251d80502 /bsp/k210/driver/dmalock.h
parent92ea0ec8c7a42cd366c5285c1e55fc7d21dcdf93 (diff)
bsp/k210/:update K210 bsp and base on https://github.com/kendryte/K210-Micropython-OpenMV
Diffstat (limited to 'bsp/k210/driver/dmalock.h')
-rw-r--r--bsp/k210/driver/dmalock.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/bsp/k210/driver/dmalock.h b/bsp/k210/driver/dmalock.h
new file mode 100644
index 0000000000..bca6a0d24a
--- /dev/null
+++ b/bsp/k210/driver/dmalock.h
@@ -0,0 +1,14 @@
+#ifndef __DMALOCK_H
+#define __DMALOCK_H
+
+#include <stdint.h>
+#include <rtdef.h>
+#include <dmac.h>
+
+#define dmalock_sync_take(x,y) _dmalock_sync_take(x, y, __func__)
+
+void dmalock_init(void);
+int _dmalock_sync_take(dmac_channel_number_t *chn, int timeout_ms, const char *name);
+void dmalock_release(dmac_channel_number_t chn);
+
+#endif