summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon/src/codewheel.h
diff options
context:
space:
mode:
Diffstat (limited to 'digital/beacon/src/codewheel.h')
-rw-r--r--digital/beacon/src/codewheel.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/digital/beacon/src/codewheel.h b/digital/beacon/src/codewheel.h
new file mode 100644
index 00000000..a0ff00bd
--- /dev/null
+++ b/digital/beacon/src/codewheel.h
@@ -0,0 +1,40 @@
+/* codewheel.h */
+/* Codewheel sensors management. {{{
+ *
+ * Copyright (C) 2012 Florent Duchon
+ *
+ * APBTeam:
+ * Web: http://apbteam.org/
+ * Email: team AT apbteam DOT org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+
+#ifndef _CODEWHEEL_H
+#define _CODEWHEEL_H
+
+#define CODEWHEEL_CPR 499
+
+/* This function initializes the codewheel optical sensors and associated interrupt */
+void codewheel_init(void);
+
+/* This function returns the wheel position */
+uint16_t codewheel_get_value(void);
+
+/* This function resets the wheel position */
+void codewheel_reset(void);
+
+#endif