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
+2 -2
View File
@@ -37,7 +37,7 @@
*/
void write_bit ( struct bit_basher *basher, unsigned int bit_id,
unsigned long data ) {
basher->write ( basher, bit_id, ( data ? -1UL : 0 ) );
basher->op->write ( basher, bit_id, ( data ? -1UL : 0 ) );
}
/**
@@ -52,5 +52,5 @@ void write_bit ( struct bit_basher *basher, unsigned int bit_id,
* it needs to apply.
*/
int read_bit ( struct bit_basher *basher, unsigned int bit_id ) {
return ( basher->read ( basher, bit_id ) ? -1UL : 0 );
return ( basher->op->read ( basher, bit_id ) ? -1UL : 0 );
}