Re: [Botix-devel] HAL for Botix
Status: Beta
Brought to you by:
vorik2005
|
From: Ger A. <in...@ge...> - 2005-11-13 17:38:15
|
Hi WOuter >For i2c we can use some kind of virtual device, which is what the >compass driver uses when executing commands. Port expanders can use >multiple pins and just have to be defined, right? > > Yeah, mine have got 8 io pins each. When read, you get a byte containing the entire set of bits. You've got to AND them with a bitmask to determine if a single bit is high or low. They can be used as output too. >Device linking is possible, so led1 is connected to portexpander port 1 >which is at its turn connected to a set of avr pins. (right?) > > > nope, the expander is connected to i2c. You're talking about a shift register. (cheaper, but requires a number of io pins.) >>Is it possible to include the driver-includes only when they are >>actually used? >> >> >> > >Yep no problem, so the more we stuff things in drivers the more modulair >and 'rom' efficient things will get. This is the big advantage of using >function pointers. > > Excellent! :) Gerrrrrrrr |