Ubuntu i2c error

I have been tortured by a tiny bug for a long time. Now I really hope to fix it. They only shows when I boot/turn off my computer, although it doesn't influence anything. when I boot my pc, it usu...

I have been tortured by a tiny bug for a long time. Now I really hope to fix it.

They only shows when I boot/turn off my computer, although it doesn’t influence anything.

  • when I boot my pc, it usually shows:
/dev/nvme1n1p3: clean, **** files, **** blocks
[   5.004707] nvidia-gpu 0000:05:00.3: i2c timeout error e0000000
[   5.004734] ucsi_ccg 0-0008: i2c_transfer failed -110
[   5.004772] ucsi_ccg 0-0008: ucsi_ccg_init failed - -110
  • when I turn off:
[   42.056815] ata2: failed stop FIS RX (-16)
[   43.065169] ata1: failed stop FIS RX (-16)

My configuration: Win 10 Pro + Ubuntu 20.04, RTX 2060s, amd r7-3700x.

I just don’t want to see them everytime when I turn on/off my pc! Is there anyone know how to fix this?

Much appreciate:)

asked Sep 28, 2020 at 16:42

GuoLY96's user avatar

1

I also have this issue in my Windows 10 + Arch Linux. It seems to be a bug in nvidia driver, as discussed in this link. Some nvidia cards don’t have USB Type-C interface, yet still try to load its i2c driver. Hopefully this problem will be fixed in the next version of the driver.

As far as I know, there are two solutions for this problem in the meantime:

  1. You may try to patch your linux kernel, see the link above. If I understand correctly, the patch downgrades level of the error.
  2. You may want to create a file /etc/modprobe.d/blacklist_i2c-nvidia-gpu.conf with these contents: blacklist i2c_nvidia_gpu. This file prevents loading the problematic driver.

Personally, I use method 2, since my card doesn’t have USB-C interface.

answered Nov 6, 2020 at 2:05

dmn's user avatar

dmndmn

2111 silver badge5 bronze badges

2

I am having trouble utilizing the i2c bus on my raspberry pi. I am attempting to use it through Adafruits python module for their Servo driver board. When I run a method using the i2c I get:

IOError: [Errno 2] No such file or directory: ‘/dev/i2c-1’

When I execute i2cdetect -l I get nothing.

When I execute i2cdetect 1 I get:

Error: Could not open file /dev/i2c-1' or/dev/i2c/1′: No such file or directory

(The same happens with 0)

I have tried issuing the command sudo modprobe --first-time i2c-dev

To which I receive:

modprobe: ERROR: could not insert ‘i2c_dev’: Module already in kernel

The results of journalctl | grep modules are in the following image:

journalctl | grep modules

asked Feb 13, 2017 at 5:59

Airfield20's user avatar

Airfield20Airfield20

1211 silver badge4 bronze badges

1

Add the following line to /boot/config.txt

dtparam=i2c_arm=on

Add the following line to /etc/modules

i2c-dev

Reboot

answered Feb 13, 2017 at 9:09

joan's user avatar

joanjoan

68.9k5 gold badges68 silver badges103 bronze badges

6

To enable i2C on the Pi3, do the following:

  1. sudo raspi-config
  2. Choose advanced options
  3. Choose I2C Enable/Disable automatic loading
  4. Follow the prompts to set this to load this automatically
  5. Reboot the Pi

I’d recommend getting the i2C utilities too with:

sudo apt-get install -y i2c-tools

Use:

sudo i2cdetect -y 1

This will display a grid showing what address any devices are using on the i2C bus.

Jacobm001's user avatar

Jacobm001

11.8k7 gold badges45 silver badges56 bronze badges

answered Feb 13, 2017 at 7:45

L H's user avatar

1

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • General Help
  • [SOLVED] Kernel Error: i2c i2c-1

  1. Kernel Error: i2c i2c-1

    Could you advise how to fix this error that is spamming dmesg?

    Code:

    dmesg | grep -i 'i2c'
    [    4.703809] i2c i2c-1: >sendbytes: NAK bailout.
    [    4.919393] i2c i2c-1: >sendbytes: NAK bailout.
    [   25.648747] i2c i2c-3: >nForce2 SMBus adapter at 0x1c00
    [   25.648902] i2c i2c-4: >nForce2 SMBus adapter at 0x1c40
    [   28.852021] i2c i2c-1: >sendbytes: NAK bailout.
    [   34.763800] i2c i2c-1: >sendbytes: NAK bailout.
    [  115.186172] i2c i2c-1: >sendbytes: NAK bailout.
    [  155.371620] i2c i2c-1: >sendbytes: NAK bailout.
    [  175.467669] i2c i2c-1: >sendbytes: NAK bailout.
    [  185.515588] i2c i2c-1: >sendbytes: NAK bailout.
    [  266.027506] i2c i2c-1: >sendbytes: NAK bailout.
    [  316.395464] i2c i2c-1: >sendbytes: NAK bailout.
    [  326.443480] i2c i2c-1: >sendbytes: NAK bailout.
    [  356.587449] i2c i2c-1: >sendbytes: NAK bailout.
    [  376.683411] i2c i2c-1: >sendbytes: NAK bailout.
    [  467.243322] i2c i2c-1: >sendbytes: NAK bailout.
    [  477.291291] i2c i2c-1: >sendbytes: NAK bailout.
    [  527.563267] i2c i2c-1: >sendbytes: NAK bailout.
    [  547.697548] i2c i2c-1: >sendbytes: NAK bailout.
    [  587.883196] i2c i2c-1: >sendbytes: NAK bailout.
    [  607.979189] i2c i2c-1: >sendbytes: NAK bailout.
    [  618.027281] i2c i2c-1: >sendbytes: NAK bailout.
    [  688.529339] i2c i2c-1: >sendbytes: NAK bailout.
    [  698.571137] i2c i2c-1: >sendbytes: NAK bailout.
    [  738.827097] i2c i2c-1: >sendbytes: NAK bailout.
    [  748.843090] i2c i2c-1: >sendbytes: NAK bailout.
    [  768.971100] i2c i2c-1: >sendbytes: NAK bailout.
    [  789.067094] i2c i2c-1: >sendbytes: NAK bailout.
    [  869.591344] i2c i2c-1: >sendbytes: NAK bailout.
    [  919.935081] i2c i2c-1: >sendbytes: NAK bailout.
    [  940.043082] i2c i2c-1: >sendbytes: NAK bailout.
    [  970.219085] i2c i2c-1: >sendbytes: NAK bailout.
    [  990.315093] i2c i2c-1: >sendbytes: NAK bailout.
    [ 1161.451076] i2c i2c-1: >sendbytes: NAK bailout.
    [ 1191.595112] i2c i2c-1: >sendbytes: NAK bailout.
    [ 1352.747118] i2c i2c-1: >sendbytes: NAK bailout.
    [ 1574.091052] i2c i2c-1: >sendbytes: NAK bailout.
    [ 1674.737207] i2c i2c-1: >sendbytes: NAK bailout.
    [ 1896.138968] i2c i2c-1: >sendbytes: NAK bailout.
    [ 1926.257040] i2c i2c-1: >sendbytes: NAK bailout.
    [ 1946.359129] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2036.848991] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2127.338940] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2177.610918] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2247.933104] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2248.802167] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2257.962904] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2298.154868] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2308.170854] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2549.418941] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2629.834788] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2639.888813] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2660.011148] i2c i2c-1: >sendbytes: NAK bailout.
    [ 2670.058843] i2c i2c-1: >sendbytes: NAK bailout.

    Code:

    lspci | grep -i 'nvidia'
    00:00.0 RAM memory: NVIDIA Corporation C51 Host Bridge (rev a2)
    00:00.1 RAM memory: NVIDIA Corporation C51 Memory Controller 0 (rev a2)
    00:00.2 RAM memory: NVIDIA Corporation C51 Memory Controller 1 (rev a2)
    00:00.3 RAM memory: NVIDIA Corporation C51 Memory Controller 5 (rev a2)
    00:00.4 RAM memory: NVIDIA Corporation C51 Memory Controller 4 (rev a2)
    00:00.5 RAM memory: NVIDIA Corporation C51 Host Bridge (rev a2)
    00:00.6 RAM memory: NVIDIA Corporation C51 Memory Controller 3 (rev a2)
    00:00.7 RAM memory: NVIDIA Corporation C51 Memory Controller 2 (rev a2)
    00:02.0 PCI bridge: NVIDIA Corporation C51 PCI Express Bridge (rev a1)
    00:03.0 PCI bridge: NVIDIA Corporation C51 PCI Express Bridge (rev a1)
    00:04.0 PCI bridge: NVIDIA Corporation C51 PCI Express Bridge (rev a1)
    00:05.0 VGA compatible controller: NVIDIA Corporation C51 [GeForce 6150 LE] (rev a2)
    00:09.0 RAM memory: NVIDIA Corporation MCP51 Host Bridge (rev a2)
    00:0a.0 ISA bridge: NVIDIA Corporation MCP51 LPC Bridge (rev a3)
    00:0a.1 SMBus: NVIDIA Corporation MCP51 SMBus (rev a3)
    00:0a.2 RAM memory: NVIDIA Corporation MCP51 Memory Controller 0 (rev a3)
    00:0b.0 USB controller: NVIDIA Corporation MCP51 USB Controller (rev a3)
    00:0b.1 USB controller: NVIDIA Corporation MCP51 USB Controller (rev a3)
    00:0e.0 IDE interface: NVIDIA Corporation MCP51 Serial ATA Controller (rev a1)
    00:0f.0 IDE interface: NVIDIA Corporation MCP51 Serial ATA Controller (rev a1)
    00:10.0 PCI bridge: NVIDIA Corporation MCP51 PCI Bridge (rev a2)
    00:10.1 Audio device: NVIDIA Corporation MCP51 High Definition Audio (rev a2)

    Code:

    lsmod | grep 'i2c'
    i2c_nforce2            12869  0 
    i2c_algo_bit           13197  1 nouveau

    Code:

    lsmod | grep 'nouveau'
    nouveau               823577  2 
    ttm                    75534  1 nouveau
    drm_kms_helper         45271  1 nouveau
    drm                   230463  4 nouveau,ttm,drm_kms_helper
    i2c_algo_bit           13197  1 nouveau
    mxm_wmi                12859  1 nouveau
    video                  18847  1 nouveau
    wmi                    18590  2 nouveau,mxm_wmi

    Code:

    uname -a
    Linux ubuntu-basement 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012 i686 athlon i686 GNU/Linux

    Code:

    lsb_release -a
    No LSB modules are available.
    Distributor ID:    Ubuntu
    Description:    Ubuntu 12.10
    Release:    12.10
    Codename:    quantal

    Code:

    dpkg --list | grep  -i 'nvidia'
    ii  libcg:i386                                                  3.1.0013-1                                 i386         Nvidia Cg core runtime library
    ii  libcggl:i386                                                3.1.0013-1                                 i386         Nvidia Cg Opengl runtime library
    ii  nvclock                                                     0.8b4+cvs20100914-3                        i386         Overclock an NVIDIA card
    ii  nvidia-96-modaliases                                        96.43.19-0ubuntu1                          i386         Modaliases for the NVIDIA binary X.Org driver
    ii  nvidia-cg-dev:i386                                          3.1.0013-1                                 i386         Cg Toolkit - GPU Shader Authoring Language (headers)
    ii  nvidia-cg-toolkit                                           3.1.0013-1                                 i386         Cg Toolkit - GPU Shader Authoring Language
    ii  nvidia-common                                               1:0.2.71                                   i386         transitional package for ubuntu-drivers-common

    Code:

    dpkg --list | grep  -i 'nouveau'
    ii  libdrm-nouveau1a:i386                                       2.4.39-0ubuntu1                            i386         Userspace interface to nouveau-specific kernel DRM services -- runtime
    ii  libdrm-nouveau2:i386                                        2.4.39-0ubuntu1                            i386         Userspace interface to nouveau-specific kernel DRM services -- runtime
    ii  xserver-xorg-video-nouveau                                  1:1.0.2-0ubuntu3                           i386         X.Org X server -- Nouveau display driver

    Thanks,
    Cipherboy


  2. Re: Kernel Error: i2c i2c-1


  3. Re: Kernel Error: i2c i2c-1

    Seems a new bug regression into the kernel about nforce2 (maybe its not included, check the kernel module to know if it exist)

    http://ubuntuforums.org/showthread.php?t=1680530

    Last edited by dino99; October 25th, 2012 at 01:35 PM.


  4. Re: Kernel Error: i2c i2c-1

    Lol, I saw that, no ATI hardware here, and stock Ubuntu kernel. The blog that supposedly held the solution for ATI is no longer available. In other words, it appears to be a regression, is there something to fix it?


  5. Re: Kernel Error: i2c i2c-1

    Last edited by dino99; October 25th, 2012 at 01:41 PM.


  6. Re: Kernel Error: i2c i2c-1

    So the other guy traced it to the nouveau driver, but says that an update resolved it. My system is up to date running 12.10. Wonder what fixed the bug in the earlier version.

    Thanks,
    Cipherboy


  7. Re: Kernel Error: i2c i2c-1

    Quote Originally Posted by cipherboy_loc
    View Post

    So the other guy traced it to the nouveau driver, but says that an update resolved it. My system is up to date running 12.10. Wonder what fixed the bug in the earlier version.

    Thanks,
    Cipherboy

    yes but what im seeing with your output is related to nforce2. So the question now is to know if the actual kernel still drive that chip or not (which is called a regression). If its not a kernel issue , then the problem is with the video driver.

    you have to check if nforce2 is a known kernel module (modprobe) and loaded. And try with some other kernel(s) and video driver to see the difference for narrowing down that issue.


  8. Re: Kernel Error: i2c i2c-1

    Okay, so I am going to leave this open for a bit more on the off chance it isn’t fixed, but thus far, across 4 different boots today, I have not encountered any problems with the spamming, so keep your fingers crossed.


  9. Re: Kernel Error: i2c i2c-1

    Marking as solved. No further issues.


  10. Re: Kernel Error: i2c i2c-1

    Hate to semi-necro a thread, but exactly what was the solution?


Bookmarks

Bookmarks


Posting Permissions

This page is meant to provide some basic information about how to interface with I²C devices through the /dev/i2c interface. The I²C bus is commonly used to connect relatively low-speed sensors and other peripherals to equipment varying in complexity from a simple microcontroller to a full-on motherboard. I²C is extremely popular due to its ease-of-use and ability to control multiple peripherals while utilizing only two pins on the host controller. Although I²C has a variety of modes, this page will deal purely with communication between a Linux-based master and a slave peripheral for the time being.

Contents

  • 1 Code Examples
    • 1.1 Beagleboard I2C2 Enable
    • 1.2 i2c-tools
    • 1.3 Basic Communication with the AD7991 ADC
      • 1.3.1 Opening the Bus
      • 1.3.2 Initiating communication with the AD7991
      • 1.3.3 Reading from the ADC
      • 1.3.4 Writing to the ADC
      • 1.3.5 Detecting Errors
      • 1.3.6 Completed Code
      • 1.3.7 Cross Compilation
  • 2 Tested Devices
  • 3 External Links

Code Examples

Note: Examples shown on this page were developed based on a Texas Instruments BeagleBoard and some changes will be required depending on the system being utilized.

Beagleboard I2C2 Enable

The TI BeagleBoard has 3 I²C buses available, which control a variety of on-board peripherals, including the DVI display driver and power sequencing. As bus 2 is by far the easiest to connect to due to its presence on the 0.1″ spaced expansion header, it is assumed the user will be controlling that bus for the purposes of this example. However, by default bus 2 is disabled due to a lack of pull-up resistors on the board, so external pull-ups to 1.8V must be added and the kernel recompiled to enable i2c2. It is important to remember that this bus runs at 1.8V on the Beagleboard and that external level shifters will be required to interface with 3.3V or 5V devices.

See BeagleBoard#Linux_kernel and BeagleBoardLinuxKernel for details on how to recompile your Linux kernel. To enable i2c2 specifically during that process, enable the setting during the «make menuconfig» step.

It is important to note that the method of enabling i2c2 varies depending on your kernel and applied patches. Recent kernel versions have changed how PIN_MUX settings are set. For me, running the openembedded stable/2009 kernel (2.6.29-r46) was enough. By default i2c2 was properly configured and enabled. A fast way to check is to see if /dev/i2c-2 exists (But this does not check proper mux settings).

I2C2 is pinned out as pins 23 (SDA) and 24 (SCL) on the expansion header.

i2c-tools

i2c-tools is a set of I²C programs that make it easy to debug I²C devices without having to write any code. For example, with the BeagleBoard:

$i2cdetect -r 2

Will send out read byte commands on the /dev/i2c-2 line to probe for addresses, and return any devices found. This is useful for checking what devices are functioning properly. (Note: the -r flag may interfere with write-only devices, but the default probing method does not work on the Beagle.) i2cget and i2cset write and read to devices respectively.

Basic Communication with the AD7991 ADC

The AD7991 has four inputs as well as the ability to use one of the input pins as a reference voltage the other inputs are measured against. If that input is not used as the reference voltage, it uses the supply voltage as the reference voltage. The power on default configuration uses all 4 channels as inputs, so in this case no further configuration is necessary. Because the AD7991 is 12-bit device, its outputs ranges linearly from 0 to 4096 as the voltage ranges from 0 to the reference voltage.

There are multiple ways to communicate with I²C devices, including the writing of a full kernel driver. This adds significant extra complexity, however, as basic bus control can be accomplished with the open, ioctl, read, and write commands.

Opening the Bus

In order to communicate with an I²C peripheral with this simple structure, you must first open the bus for reading and writing like you would any file. A call to open must be used rather than fopen so that writes to the bus are not buffered. Open returns a new file descriptor (a non-negative integer) which can then be used to configure the bus. A typical reason for failure at this stage is a lack of permissions to access /dev/i2c-2. Adding the user to a group which has permissions to access the file will alleviate this problem, as will adjusting the file permissions to enable user access. Adding a udev rule to set the I²C device group is the most permanent solution.

int file;
char *filename = "/dev/i2c-2";
if ((file = open(filename, O_RDWR)) < 0) {
    /* ERROR HANDLING: you can check errno to see what went wrong */
    perror("Failed to open the i2c bus");
    exit(1);
}

Initiating communication with the AD7991

After successfully acquiring bus access, you must initiate communication with whatever peripheral you are attempting to utilize. I²C does this by sending out the seven bit address of the device followed by a read/write bit. The bit is set to 0 for writes and 1 for reads. This is another common failure point, as manufacturers tend to report the I²C address of the peripheral in a variety of ways. Some report the address as a seven bit number, meaning that the address must be shifted left by a bit and then have the r/w bit tacked onto the end. Others will provide it as an eight bit number and assume you will set the last bit accordingly. Although a few manufacturers actually say which method they use to describe the address, the vast majority do not, and the user may have to resort to testing via trial and error.

The AD7991 used in this example is the AD7991-1, which has an address reported by the datasheet as 0101001. To use this properly, zero pad the address on the left and store it as 0b00101001. The calls to read and write after the ioctl will automatically set the proper read and write bit when signaling the peripheral.

int addr = 0b00101001;          // The I2C address of the ADC
if (ioctl(file, I2C_SLAVE, addr) < 0) {
    printf("Failed to acquire bus access and/or talk to slave.n");
    /* ERROR HANDLING; you can check errno to see what went wrong */
    exit(1);
}

Reading from the ADC

The read system call is used to obtain data from the I²C peripheral. Read requires a file handle, a buffer to store the data, and a number of bytes to read. Read will attempt to read the number of bytes specified and will return the actual number of bytes read, which can be used to detect errors.

The code in the else block below calculates the voltage present at the ADC pin assuming a 5 volt reference/supply voltage. The AD7991 samples a 12 bit value, which is read back as two eight bit values. Rather than waste the empty bits, two of them are also used to signal the channel data being sent. See page 21 of the datasheet for more details.

char buf[10] = {0};
float data;
char channel;

for (int i = 0; i<4; i++) {
    // Using I2C Read
    if (read(file,buf,2) != 2) {
        /* ERROR HANDLING: i2c transaction failed */
        printf("Failed to read from the i2c bus.n");
        buffer = g_strerror(errno);
        printf(buffer);
        printf("nn");
    } else {
        data = (float)((buf[0] & 0b00001111)<<8)+buf[1];
        data = data/4096*5;
        channel = ((buf[0] & 0b00110000)>>4);
        printf("Channel %02d Data:  %04fn",channel,data);
    }
}

Writing to the ADC

The write system call is used to obtain data from the I²C peripheral. Write requires a file handle, a buffer in which the data is stored, and a number of bytes to write. Write will attempt to write the number of bytes specified and will return the actual number of bytes written, which can be used to detect errors.

Some devices require an internal address to be sent prior to the data to specify the register on the external device to access. The AD7991 contains only one configuration register, and as such, does not require a internal register selection address to be sent to the device. For devices with more than one configuration register, the address of the register should be written first, followed by the data to be placed there. See the datasheet specific to the part for more details.

//unsigned char reg = 0x10; // Device register to access
//buf[0] = reg;

buf[0] = 0b11110000;
if (write(file,buf,1) != 1) {
    /* ERROR HANDLING: i2c transaction failed */
    printf("Failed to write to the i2c bus.n");
    buffer = g_strerror(errno);
    printf(buffer);
    printf("nn");
}

Detecting Errors

Errors on the I²C bus range from incorrect permissions and addressing to hardware errors that may simply not allow peripherals to respond. The errno interface is used to identify these errors using the glib function g_strerror. For simple usage, calling the function as above will work. See the glib api for more details.

Completed Code

#include <glib.h>
#include <glib/gprintf.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <linux/i2c-dev.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

void
sensors_ADC_init(void) {
    int file;
    char filename[40];
    const gchar *buffer;
    int addr = 0b00101001;        // The I2C address of the ADC

    sprintf(filename,"/dev/i2c-2");
    if ((file = open(filename,O_RDWR)) < 0) {
        printf("Failed to open the bus.");
        /* ERROR HANDLING; you can check errno to see what went wrong */
        exit(1);
    }

    if (ioctl(file,I2C_SLAVE,addr) < 0) {
        printf("Failed to acquire bus access and/or talk to slave.n");
        /* ERROR HANDLING; you can check errno to see what went wrong */
        exit(1);
    }

    char buf[10] = {0};
    float data;
    char channel;

    for(int i = 0; i<4; i++) {
        // Using I2C Read
        if (read(file,buf,2) != 2) {
            /* ERROR HANDLING: i2c transaction failed */
            printf("Failed to read from the i2c bus.n");
            buffer = g_strerror(errno);
            printf(buffer);
            printf("nn");
        } else {
            data = (float)((buf[0] & 0b00001111)<<8)+buf[1];
            data = data/4096*5;
            channel = ((buf[0] & 0b00110000)>>4);
            printf("Channel %02d Data:  %04fn",channel,data);
        }
    }

    //unsigned char reg = 0x10; // Device register to access
    //buf[0] = reg;
    buf[0] = 0b11110000;

    if (write(file,buf,1) != 1) {
        /* ERROR HANDLING: i2c transaction failed */
        printf("Failed to write to the i2c bus.n");
        buffer = g_strerror(errno);
        printf(buffer);
        printf("nn");
    }
}

Cross Compilation

In order to compile the code and create a binary that can be run on the embedded system, you will need a cross compiler (e.g. ARMCompilers) on the host computer and added to the PATH.

For example, using the CodeSourcery ARM toolchain:

$ gcc CROSS-COMPILE=arm-none-linux-gnueabi ARCH=arm i2c_interface.c -o i2c_binary

The resulting binary can then be moved to the embedded device and executed.

  • If you get a warning about I2C_SLAVE not being defined, you may need to include both <linux/i2c.h> and <linux/i2c-dev.h> (The location has changed in newer kernels vs. older kernels and the above example is for newer)

Tested Devices

  • AD7991 Quad Input ADC
    • Utilized with Sharp GP2D12 IR Range Sensors. (That link is broken. Here is a list of sensors from that site.
  • SRF08 Ultrasonic Range Sensors
  • ADXL345 3-axis Accelerometer

External Links

  • Wikipedia I²C Page
  • Linux Kernel I2C Documentation
  • Standard Linux Syscalls
  • Presentation on I2C, PWM and Hardware interfacing with the BeagleBoard

Понравилась статья? Поделить с друзьями:
  • Ubuntu gitlab 502 error
  • Ucrtbase dll ошибка windows 10
  • Ubuntu ext4 fs error
  • Ucoz как изменить дизайн сайта на ucoz
  • Ubuntu error while installing package