Aros/Developer/Docs/HIDD/i2c

Navbar for the Aros wikibook
Aros User Docs
Aros User Docs
Aros User FAQs
Aros User Applications
Aros User DOS Shell
Aros/User/AmigaLegacy
Aros Dev Docs
Aros Developer Docs
Porting Software from AmigaOS/SDL
For Zune Beginners
Zune .MUI Classes
For SDL Beginners
Aros Developer BuildSystem
Specific platforms
68k Support
PPC Power Architecture Support
Arm Raspberry Pi Support
Android support
Linux and FreeBSD Support
Windows Mingw and MacOSX Support
Aros x86 Installing
Aros x86 Audio/Video Support
Aros x86 Network Support
Aros x86 Complete System HCL
Aros Storage Support IDE SATA etc
Aros Poseidon USB Support
x86-64 Support
misc
Aros Public License


IntroductionEdit

Yes, i2c is there and works. It's rarely used, mostly by graphics drivers to read EDID information from monitor. I2C stack is also used on sam440 target, to read the RTC.


ReferenceEdit

If you want to use I2C with e.g. parallel port, you will need to write a "driver". A driver is an OOP object with superclass CLID_Hidd_I2C. The driver class has to implement two methods only:

void PutBits(BOOL scl, BOOL sda);
void GetBits(BOOL *scl, BOOL *sda);

how you implement them (which part of parallel port you are going to use), it's up to you. There are no direct examples how to use I2C, but you could look into the source code of drivers, which are using it, like eg. the IntelGMA driver (file intelG45_class.c).


ExamplesEdit

Last modified on 22 March 2011, at 10:57