summaryrefslogtreecommitdiff
path: root/openpicc/application/tc_cdiv.h
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-11 19:24:37 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-11 19:24:37 +0000
commit1dfa375abb95c59830c38697c53fa9a6794a9fb9 (patch)
treeffa43c6bcfe4662c6e73baf1668b85b097b9028f /openpicc/application/tc_cdiv.h
parent9d397dfbbea03968384b9a1b0ae121b6ba256806 (diff)
Add code modules for tc_fdt, tc_cdiv_sync, tc_cdiv, ssc_picc
Almost all of these have not been checked yet, I just copied them over and hot-fixed compile time errors F.e. all ssc usb code has been removed git-svn-id: https://svn.openpcd.org:2342/trunk@323 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/tc_cdiv.h')
-rw-r--r--openpicc/application/tc_cdiv.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/openpicc/application/tc_cdiv.h b/openpicc/application/tc_cdiv.h
new file mode 100644
index 0000000..d5744f9
--- /dev/null
+++ b/openpicc/application/tc_cdiv.h
@@ -0,0 +1,27 @@
+#ifndef _TC_CDIV_H
+#define _TC_CDIV_H
+
+#include "openpicc.h"
+#include <sys/types.h>
+#include <lib_AT91SAM7.h>
+
+static AT91PS_TCB tcb;
+
+extern void tc_cdiv_phase_add(int16_t inc);
+extern void tc_cdiv_set_divider(u_int16_t div);
+
+static inline void tc_cdiv_phase_inc(void)
+{
+ tc_cdiv_phase_add(1);
+}
+
+static inline void tc_cdiv_phase_dec(void)
+{
+ tc_cdiv_phase_add(-1);
+}
+
+extern void tc_cdiv_print(void);
+extern void tc_cdiv_init(void);
+extern void tc_cdiv_fini(void);
+
+#endif
personal git repositories of Harald Welte. Your mileage may vary