summaryrefslogtreecommitdiff
path: root/commandline/i2c-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'commandline/i2c-util.c')
-rw-r--r--commandline/i2c-util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/commandline/i2c-util.c b/commandline/i2c-util.c
index 8033d12..f8aa18d 100644
--- a/commandline/i2c-util.c
+++ b/commandline/i2c-util.c
@@ -156,6 +156,21 @@ static int usbOpenDevice(usb_dev_handle ** device, int vendor, char *vendorName,
return errorCode;
}
+void i2c_getopt(int argc, char **argv)
+{
+ int opt;
+ while ((opt = getopt(argc, argv, "c:d:")) != EOF) {
+ switch (opt) {
+ case 'c':
+ bit_scl = atoi(optarg);
+ break;
+ case 'd':
+ bit_sda = atoi(optarg);
+ break;
+ }
+ }
+}
+
unsigned char get_status()
{
unsigned char buffer[8];