beep when GPS ready
[protos/xbee-avr.git] / i2c_protocol.h
1 /*
2  *  Copyright Droids Corporation (2009)
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: i2c_protocol.h,v 1.6 2009-11-08 17:24:33 zer0 Exp $
19  *
20  */
21
22 #ifndef _I2C_PROTOCOL_H_
23 #define _I2C_PROTOCOL_H_
24
25 /* load the timer for i2c protocol */
26 void i2c_protocol_init(void);
27
28 /* dump i2c debug infos (stats) */
29 void i2c_protocol_debug(void);
30
31 /* wait that all received status have been updated once */
32 void i2cproto_wait_update(void);
33
34 void i2c_recvevent(uint8_t *buf, int8_t size);
35 void i2c_recvbyteevent(uint8_t hwstatus, uint8_t i, uint8_t c);
36 void i2c_sendevent(int8_t size);
37
38 /* control the led of another board (debug) */
39 int8_t i2c_led_control(uint8_t addr, uint8_t led, uint8_t state);
40
41 /* latest received imuboard_status. Access with care as it can be modified in
42  * the i2c timer. */
43 struct i2c_ans_imuboard_status imuboard_status;
44
45 #endif