March 11, 2006

I2C bus

I like software developing! Few days ago I have found out, that my ATI driver may works incorrectly with TFT monitors. Due to lack of I2C bus the driver was unable to fetch the DDC2 data from monitor, and therefore could not even guess the type of device connected to the ATI card. I had two options - to implement I2C bus in ATI driver itself, or to provide a general solution. The former would be easier, the later would bie nicer.

The new directory: arch/common/hidd.i2c showed up in AROS source tree. It is a general implementation of the I2C bus for AROS. It will be definitely used in the ATI driver, but it is not the only purpouse of it. The hidd consists of two OOP classes:

1. The I2C bus class which is used by devices and abstracts every hardware bus into well known API. Using it as a superclass and overloading only two of its methods, one creates hardware specific bus driver.

2. The I2C device class which is used by software to communicate with devices over the bus. Using it as a superclass let's one to define new types of protocols, like SMBus for example, which use the I2C as a transport medium.

The specific driver class which uses the genmodule app from Staf Verhaegen (our talented AROS developer) may be as small as few hundred bytes in source, and less than two kilobytes in binary.

The ATI driver is one example of potential use. The I2C bus might be used aswell to communicate with hardware sensors, with TV cards (access the tuner through I2C bus) or even through parallel port (see this link for more details: http://oap.sourceforge.net/oap/i2c_para_module/i2c_para_module.pdf)
to talk with thousands of different IC's which provide the I2C interface.

Have fun with it. I will :-)

5 Comments:

Anonymous Anonymous said...

Hi Michal!

Does this mean that the ATI driver is finnished? Is so, is it possible to download it somewhere??

Incredible work!

Tor/Norway

7:55 PM  
Blogger Michal Schulz said...

No, it's not yet. Right now I am clearing it's code up and expect it to be made by the end of weekend. Then I will release binary to test.

But beware, it's still without any acceleration.

9:34 PM  
Anonymous Anonymous said...

Hi, looking forward to try it out!! How come there is no acceleration in it? I had an nVidia card before, and your nVidia driver works like a charm.

Is it lack of documentations that is the problem?

Have a nice weekend!! :-)

10:30 PM  
Blogger Michal Schulz said...

There will be acceleration. But I want first clean and stable generic code for ATI.

10:40 PM  
Blogger pixie said...

The present accelerated drivers makes AROS even faster then in hosted mode?

9:13 PM  

Post a Comment

<< Home