]> 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>
Mon, 19 Jul 2021 11:52:41 +0000 (13:52 +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 ead850cd6b633b7133d90922a07baa589065ab76..bb2347e4c5a9a7b0b2df19e4672cbeecdc655b44 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 {