From af60ab915440edb8664f4d68ce9e59ee9a0cc27f Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Wed, 16 May 2012 22:56:41 +0200 Subject: digital/beacon: add codewheel timer task --- digital/beacon/src/codewheel.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'digital/beacon/src/codewheel.h') 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 -- cgit v1.2.3