summaryrefslogtreecommitdiff
path: root/i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'i2c.c')
-rw-r--r--i2c.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/i2c.c b/i2c.c
index 02e5812..fc9d48a 100644
--- a/i2c.c
+++ b/i2c.c
@@ -4,12 +4,13 @@
#include <sys/ioctl.h>
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
+#include <glib.h>
#define I2C_BUS "/dev/i2c-3"
-int I2C_Write(int address, int value) {
+int I2C_Write(gulong address, guchar value) {
struct i2c_smbus_ioctl_data argswrite;
@@ -29,7 +30,7 @@ int I2C_Write(int address, int value) {
}
-int I2C_Read(int address) {
+guchar I2C_Read(gulong address) {
union i2c_smbus_data data;
struct i2c_smbus_ioctl_data argsread;