Skip to content

EinarArnason/I2Clinux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I2Clinux library

I2C implementation for Linux

The What

This library is a Linux implementation for I2C controllers.

The Why

Because this library inherits the I2C interface, it can be applied in a modular manner.

The How

Building

Using cmake

add_subdirectory(${I2ClinuxDir})
target_link_libraries(${PROJECT_NAME} I2Clinux)

Usage

Typical operation:

#include "I2Clinux.h"

I2C::Config i2cConfig(0x00, 100000);
I2Clinux i2c("/dev/i2c-1", i2cConfig.address);
i2c.init();

char data[1] = 0xAA;
i2c.send(i2cConfig, data, sizeof(data));
i2c.receive(i2cConfig, data, sizeof(data));

The Who

Einar Arnason
https://github.com/EinarArnason
https://www.linkedin.com/in/einararnason/

About

I2C implementation for Linux

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published