]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
linux: Fix i2c-dev constants
authorDr. Michael Lauer <mickey@vanille-media.de>
Wed, 30 Jun 2021 11:32:10 +0000 (13:32 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 30 Jun 2021 12:18:50 +0000 (14:18 +0200)
This commit enables basic i2c operations (open/read/write/close) from userland.
Further i2c / smbus transfer modes are on the way.

vapi/linux.vapi

index bf6ef9c2bb71bc9fe21a769f01f90f710adcb143..cb580308ff91855bb47c180f6638e2aa4f7f7e75 100644 (file)
@@ -875,7 +875,24 @@ namespace Linux {
     [CCode (cprefix = "I2C_", lower_case_cprefix = "i2c_")]
     namespace I2C {
 
+        [CCode (cheader_filename = "linux/i2c-dev.h")]
+        const int RETRIES;
+        [CCode (cheader_filename = "linux/i2c-dev.h")]
+        const int TIMEOUT;
+        [CCode (cheader_filename = "linux/i2c-dev.h")]
         const int SLAVE;
+        [CCode (cheader_filename = "linux/i2c-dev.h")]
+        const int SLAVE_FORCE;
+        [CCode (cheader_filename = "linux/i2c-dev.h")]
+        const int TENBIT;
+        [CCode (cheader_filename = "linux/i2c-dev.h")]
+        const int FUNCS;
+        [CCode (cheader_filename = "linux/i2c-dev.h")]
+        const int RDWR;
+        [CCode (cheader_filename = "linux/i2c-dev.h")]
+        const int PEC;
+        [CCode (cname = "SMBUS", cheader_filename = "linux/i2c-dev.h")]
+        const int SMBUS_TRANSFER;
 
         [CCode (cprefix = "", lower_case_cprefix = "i2c_smbus_")]
         namespace SMBUS {