All pastes #70570 Raw Edit

Something

public text v1 · immutable
#70570 ·published 2006-06-24 13:28 UTC
rendered paste body
#include <fcntl.h>
#include "linux/i2c.h"
#include "linux/i2c-dev.h"
#include <stdio.h>

int main(int argc, char *argv[]) {
 int xo=0;
 int yo=14;
 int fd = open("/dev/i2c/0", O_RDWR);
 ioctl(fd, I2C_SLAVE_FORCE, 0x6a);
 i2c_smbus_write_word_data(fd, 0x00, xo);
 i2c_smbus_write_word_data(fd, 0x02, yo);
 close(fd);
}