mirror of
https://github.com/ipxe/ipxe
synced 2026-01-02 09:52:49 +03:00
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:
@@ -7,8 +7,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/** A bit-bashing interface */
|
||||
struct bit_basher {
|
||||
struct bit_basher;
|
||||
|
||||
/** Bit-bashing operations */
|
||||
struct bit_basher_operations {
|
||||
/**
|
||||
* Set/clear output bit
|
||||
*
|
||||
@@ -35,6 +37,12 @@ struct bit_basher {
|
||||
int ( * read ) ( struct bit_basher *basher, unsigned int bit_id );
|
||||
};
|
||||
|
||||
/** A bit-bashing interface */
|
||||
struct bit_basher {
|
||||
/** Bit-bashing operations */
|
||||
struct bit_basher_operations *op;
|
||||
};
|
||||
|
||||
extern void write_bit ( struct bit_basher *basher, unsigned int bit_id,
|
||||
unsigned long data );
|
||||
extern int read_bit ( struct bit_basher *basher, unsigned int bit_id );
|
||||
|
||||
Reference in New Issue
Block a user