weak pack
[aversive.git] / projects / microb2010 / mainboard / 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 void i2c_protocol_init(void);
26 void i2c_protocol_debug(void);
27
28 void i2cproto_wait_update(void);
29 void i2c_poll_slaves(void *dummy);
30
31 void i2c_recvevent(uint8_t *buf, int8_t size);
32 void i2c_recvbyteevent(uint8_t hwstatus, uint8_t i, uint8_t c);
33 void i2c_sendevent(int8_t size);
34
35 int8_t i2c_set_color(uint8_t addr, uint8_t color);
36 int8_t i2c_led_control(uint8_t addr, uint8_t led, uint8_t state);
37
38 int8_t i2c_cobboard_set_mode(uint8_t mode);
39 int8_t i2c_cobboard_pack(uint8_t side);
40 int8_t i2c_cobboard_pack_weak(uint8_t side);
41 int8_t i2c_cobboard_autoharvest(uint8_t side);
42 int8_t i2c_cobboard_deploy(uint8_t side);
43 int8_t i2c_cobboard_autoharvest_nomove(uint8_t side);
44 int8_t i2c_cobboard_deploy_nomove(uint8_t side);
45
46 int8_t i2c_ballboard_set_mode(uint8_t mode);
47
48 #endif