ini
[aversive.git] / modules / devices / encoders / encoders_microb / encoders_microb.h
1 /*  
2  *  Copyright Droids Corporation, Microb Technology, Eirbot (2005)
3  * 
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  *
18  *  Revision : $Id: encoders_microb.h,v 1.4.4.1 2006-11-26 21:06:04 zer0 Exp $
19  *
20  */
21
22 #ifndef _ENCODERS_MICROB_H_
23 #define _ENCODERS_MICROB_H_
24
25 /** 
26  * Initialisation of encoders, variables
27  */
28 void encoders_microb_init(void);
29
30 /** 
31  * Update encoders values, need to be done quite often
32  * (Fmax_encoders/64). First, encoders 0 2 4 6 are read, and at next call
33  * encoders 1 3 5 7. 
34  * 
35  * \param dummy : a (void *) pointer that is not used. It is here according
36  *                to the encoders interface.
37  */
38 void encoders_microb_manage(void * dummy);
39
40 /** Extract encoder value.
41  *
42  * \param data : a (void *) that is casted in (uint8_t) containing the number
43  *               of the encoder to be read.
44  */
45 int32_t encoders_microb_get_value(void * data);
46
47 /** Set an encoder value
48  *
49  * \param data : a (void *) that is casted in (uint8_t) containing the number
50  *               of the encoder to be read.
51  * \param v    : the value
52  */
53 void encoders_microb_set_value(void * data, int32_t c);
54
55 #endif