I2C - Development header files?


5 posts
by gordon@drogon.net » Wed Jan 16, 2013 7:07 pm
How do I install the right i2c header file for Arch Linux?

In Debian, it's apt-get install libi2c-dev and that pulls in the correct header file with the right i2c/smbus definitions into /usr/include/linux/i2-dev.h

(There is already a /usr/include/linux/i2-dev.h but it needs to be updated for development work AIUI, and this is the case in Arch)

Or, makbe I'm doing it wrong, but I need to compile programs that use I2C and that works under Debian - just trying to get it to work under Arch too...

Thanks,

-Gordon
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1421
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
by pepedog » Wed Jan 16, 2013 10:30 pm
I think for now you could do this
Install git
Code: Select all
git clone --depth 1 git://github.com/raspberrypi/linux.git
cd linux
make mrproper
make headers_check
make headers_install

Could you pop along to https://github.com/archlinuxarm/PKGBUILDs/issues and put your case
Perhaps suggest a package alarm/linux-api-headers-rbp is made?
Tell them I sent you
Thanks
Posts: 940
Joined: Fri Oct 07, 2011 9:55 am
by pepedog » Wed Jan 16, 2013 11:24 pm
So it looks like it is packaged (wiringpi) and just needs update
Posts: 940
Joined: Fri Oct 07, 2011 9:55 am
by gordon@drogon.net » Wed Jan 16, 2013 11:28 pm
pepedog wrote:So it looks like it is packaged (wiringpi) and just needs update


Yea, looks like it! Wonder how old the packaged one is ...

Cheers,

-Gordon
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1421
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
by pepedog » Wed Jan 16, 2013 11:33 pm
It was built 2012-Oct-13
Posts: 940
Joined: Fri Oct 07, 2011 9:55 am