tree: 25b90cd13b01122d778a1d55d814c5b001b88d22 [path history] [tgz]
  1. include/
  2. .gitignore
  3. lib_smogcheck.c
  4. Makefile
  7. smogcheck.c

Smogcheck I2C Library

C library to communicate with I2C bus directly.


  1. The goal of this module is to enable direct I/O operations on I2C bus with minimal overhead. Although i2c-tools has been made available in Chromium OS, it still carries much overhead (as revealed by strace).

  2. The original source code was posted to Linux Kernel Documentation ( and has been modified and adopted here. According to this source, there are two versions of i2c-dev.h, one distributed with the Linux kernel and the other with i2c-tools. This module depends on the kernel version.

  3. The included Makefile creates a C shared library object (.so file), which can then be imported into Python via ctypes for developing new Autotest test cases for I2C devices.

Source for i2c-tools: