/**
 * i2c.h: pirate i2c interface, command and data buffering, and data receive callbacks
 * 2014 true
**/

#ifndef __INTERFACE_I2C_H
#define __INTERFACE_I2C_H



// we're using this guy's library because it seems to work
#include "peter_i2c/peter_i2c.h"


#define I2C_BUF_SIZE 			16  	// power of 2

#define I2C_READ 				I2C_Direction_Receiver
#define I2C_WRITE 				I2C_Direction_Transmitter


/* prototypes */
void i2c_init(I2C_TypeDef *i2c, uint32_t speed);



#endif /* __INTERFACE_I2C_H */
