Generalised the SPI abstraction layer to also be able to handle interfaces

that don't provide the full flexibility of a bit-bashing interface.

Temporarily hacked rtl8139.c to use the new interface.
This commit is contained in:
Michael Brown
2006-12-04 15:36:51 +00:00
parent 2e41bfd268
commit 931f94dca3
10 changed files with 397 additions and 211 deletions

View File

@@ -314,8 +314,8 @@ static int i2c_bit_write ( struct i2c_interface *i2c,
void init_i2c_bit_basher ( struct i2c_bit_basher *i2cbit ) {
struct bit_basher *basher = &i2cbit->basher;
assert ( basher->read != NULL );
assert ( basher->write != NULL );
assert ( basher->op->read != NULL );
assert ( basher->op->write != NULL );
i2cbit->i2c.read = i2c_bit_read;
i2cbit->i2c.write = i2c_bit_write;
i2c_stop ( basher );