From: Dr. Michael Lauer Date: Wed, 30 Jun 2021 11:32:10 +0000 (+0200) Subject: linux: Fix i2c-dev constants X-Git-Tag: 0.53.1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=faa83eb2fe4d6fa9347960a35dd25a9a1b4be771;p=thirdparty%2Fvala.git linux: Fix i2c-dev constants This commit enables basic i2c operations (open/read/write/close) from userland. Further i2c / smbus transfer modes are on the way. --- diff --git a/vapi/linux.vapi b/vapi/linux.vapi index bf6ef9c2b..cb580308f 100644 --- a/vapi/linux.vapi +++ b/vapi/linux.vapi @@ -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 {