summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon/src/codewheel.h
diff options
context:
space:
mode:
authorFlorent Duchon2012-05-16 22:56:41 +0200
committerFlorent Duchon2012-12-24 17:47:56 +0100
commitaf60ab915440edb8664f4d68ce9e59ee9a0cc27f (patch)
tree05aa93e1860bf4174a3ea6a4b553dd14bbbfa2ce /digital/beacon/src/codewheel.h
parentbc1ca9a4c44e019638adc51af66db1a578c851b6 (diff)
digital/beacon: add codewheel timer task
Diffstat (limited to 'digital/beacon/src/codewheel.h')
-rw-r--r--digital/beacon/src/codewheel.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/digital/beacon/src/codewheel.h b/digital/beacon/src/codewheel.h
index 5846c2e5..b2a4abff 100644
--- a/digital/beacon/src/codewheel.h
+++ b/digital/beacon/src/codewheel.h
@@ -27,7 +27,7 @@
#define _CODEWHEEL_H
#define CODEWHEEL_CPR 499
-
+#define CODEWHEEL_TIMER_TASK_PERIOD 10L
typedef enum
{
CODEWHEEL_INIT,
@@ -39,6 +39,7 @@ typedef struct
{
TCodewheel_state state;
uint16_t rebase_offset;
+ uint16_t time;
} codewheel_s;
/* This function initializes the codewheel optical sensors and associated interrupt */
@@ -68,4 +69,13 @@ float codewheel_convert_angle_raw2degrees(uint16_t raw_value);
/* This function converts the angle value from row format to radians */
float codewheel_convert_angle_raw2radians(uint16_t raw_value);
+/* Task for turn time measurment */
+void codewheel_timer_task(void);
+
+/* This function start the codewheel timer task */
+void start_codewheel_timer_task(void);
+
+/* This function stop the codewheel timer task */
+void stop_codewheel_timer_task(void);
+
#endif