X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Fcommon%2Fi2c_commands.h;h=d08e58023a7940fdf62fca7d1caf4cf05f888718;hp=49cdb8e87e202dfe8cdaa46050e695f435e3a40b;hb=c5092ef0e45256f7e5ff2ceea8e1aa1cb33027db;hpb=4fb57a4dab8bd564445e824696a2dab470af8628 diff --git a/projects/microb2010/common/i2c_commands.h b/projects/microb2010/common/i2c_commands.h index 49cdb8e..d08e580 100644 --- a/projects/microb2010/common/i2c_commands.h +++ b/projects/microb2010/common/i2c_commands.h @@ -28,13 +28,13 @@ #define I2C_COBBOARD_ADDR 2 #define I2C_BALLBOARD_ADDR 3 -#define I2C_LEFT_SIDE 0 -#define I2C_RIGHT_SIDE 1 -#define I2C_AUTO_SIDE 2 -#define I2C_CENTER_SIDE 3 +#define I2C_LEFT_SIDE 0 +#define I2C_RIGHT_SIDE 1 +#define I2C_AUTO_SIDE 2 +#define I2C_CENTER_SIDE 3 -#define I2C_COLOR_RED 0 -#define I2C_COLOR_GREEN 1 +#define I2C_COLOR_YELLOW 0 +#define I2C_COLOR_BLUE 1 #define I2C_COB_BLACK 0 #define I2C_COB_WHITE 1 @@ -80,6 +80,21 @@ struct i2c_cmd_cobboard_set_mode { uint8_t mode; }; +#define I2C_CMD_BALLBOARD_SET_MODE 0x10 + +struct i2c_cmd_ballboard_set_mode { + struct i2c_cmd_hdr hdr; + +#define I2C_BALLBOARD_MODE_OFF 0x00 +#define I2C_BALLBOARD_MODE_HARVEST 0x01 +#define I2C_BALLBOARD_MODE_EJECT 0x02 +#define I2C_BALLBOARD_MODE_PREP_L_FORK 0x03 +#define I2C_BALLBOARD_MODE_TAKE_L_FORK 0x04 +#define I2C_BALLBOARD_MODE_PREP_R_FORK 0x05 +#define I2C_BALLBOARD_MODE_TAKE_R_FORK 0x06 + uint8_t mode; +}; + /****/ /* requests and their answers */ /****/