2014-04-10 11:04:02 +01:00
|
|
|
#include "maa.h"
|
2014-04-08 18:43:26 +01:00
|
|
|
|
|
|
|
|
int
|
|
|
|
|
main ()
|
|
|
|
|
{
|
2014-04-11 17:06:24 +01:00
|
|
|
maa::I2CSlave i2c(26, 27);
|
|
|
|
|
|
2014-04-08 18:43:26 +01:00
|
|
|
int addr = 0x62;
|
2014-04-11 17:06:24 +01:00
|
|
|
i2c.address(addr);
|
|
|
|
|
|
2014-04-08 18:43:26 +01:00
|
|
|
char data[2];
|
2014-04-11 17:06:24 +01:00
|
|
|
int ret = i2c.read(data, 2);
|
2014-04-08 18:43:26 +01:00
|
|
|
return ret;
|
|
|
|
|
}
|