Supported Platforms

Upcoming Platforms

The I2C Device Library is a collection of uniform and well-documented classes to provide simple and intuitive interfaces to an ever-growing collection of I2C devices. Each device is built to make use of the generic i2cdev code, which abstracts the I2C bit-level and byte-level communication away from each specific device class, making it easy to keep the device code clean while providing a simple way to modify just one class to port the I2C communication code onto different platforms (Arduino, PIC, simple bit-banging, etc.).

The I2Cdev code is built to be used statically, reducing the memory requirement if you have multiple I2C devices in your project. Only one instance of the I2Cdev class is required. For pure C or otherwise non-object-oriented platforms, a simple procedural version of the library is currently under development.

Interactive Register Maps

The I2Cdevlib site is built around a core database of detailed register maps for each supported device. This information is used not only for direct reference for site visitors, but also for intelligent traffic analyzing and automatic multi-platform code generation. Register map definitions include addresses, register names and descriptions, access mode (read/write), bitfield names and definitions, and detailed specific values, if specified in the available documentation. You will not find a more comprehensive dynamic collection of I2C device data anywhere.

Interactive I2C Dump Analyzer

One of the most power features of the site, the I2C dump analyzer takes exported information from a logic analyzer and correlates it with known information about each device's register maps. All captured data can then be displayed with register names, bitfield names, and known values, rather than merely displaying raw I2C traffic. This can be invaluable for debugging. (Currently only the Saleae Logic I2C analyer's CSV export format is supported, but others are planned.)

The upload process is simple; just select the exported CSV file from Saleae Logic, and the analyzer will do the rest. It even guesses which devices are included in the dump based on known slave addresses, though you can choose exactly which devices to assign to which addresses so that the analyzer shows the most appropriate information. Currently only anonymous, public uploads are supported, but I'm working on a user system so that you can keep all of your own uploads public or private as desired.

Web-Based Device Entry and Modification

For devices that aren't here yet or have incomplete information in the I2Cdevlib database, there is an interface to add or modify devices directly within the website. This is the information displayed on each device's detail page as well as the register map info used to generate in-depth analysis of captured analyzer data. (NOTE: this feature is only partially implemented and not available yet)

Automatic Code Generation

Based on a sufficiently detailed register map for a given device, the I2Cdevlib site infrastruction can generate functional device management code automatically, complete with documentation, address constants, bitfield access, and even example code. If you want library support for a device that isn't here already, you can always start from a similar device's code or use the "_Stub" code as a starting point. However, this automatic code generation is a quick, thorough way to convert an existing register map online into a functional code base. (NOTE: this feature is only partially implemented and not available yet)

Doxygen-Based Documentation

Detailed documentation for all code is created using Doxygen-style comments placed in each class definition file, based on the information available in each device's register map. Since most of the code—the tedious part, anyway—is generated automatically based on register map data, This means there is a huge quantity of relevant documentation available to you right in the code itself, which saves a lot of time if you have an IDE with code completion.

Centralized Device Resource List

Each I2Cdevlib page provides a place to collect and display all links that are relevant to any specific device, including manufacturer datasheets, purchase options, breakout boards, PCB/schematic part libraries, example applications, source code, and anything else that might be useful to know. If you think anything is missing for any of the devices here, be sure to suggest it!

Adding More Devices

Want support for a device that isn't currently in the library? Request it, or fork the code and contribute! Better yet, send me a device on a breakout board to test the code during development. No guarantees on how fast I can get it done, but I'd love to make this the biggest consistent and well-documented I2C device library around.