2 Copyright � 2004-2014, Davy Wentzler. All rights reserved.
14 void (*Start
)(struct CardData
*card
);
15 void (*Stop
)(struct CardData
*card
);
16 void (*SetDir_CLK_SDA
)(struct CardData
*card
, int clock
, int data
); /* set line direction (0 = write, 1 = read) */
17 void (*Write_CLK_SDA
)(struct CardData
*card
, int clock
, int data
);
18 int (*GetClock
)(struct CardData
*card
);
19 int (*GetData
)(struct CardData
*card
, int ack
);
23 unsigned short flags
; // some private data
26 struct I2C_bit_ops
*bit
; // with a pointer, the specific card information can be put in a struct and assigned to this attribute
30 struct I2C
*AllocI2C(unsigned char addr
);
31 void FreeI2C(struct I2C
*device
);
33 int WriteBytesI2C(struct CardData
*card
, struct I2C
*device
, unsigned char *bytes
, int count
);
34 int ReadBytesI2C(struct CardData
*card
, struct I2C
*device
, unsigned char *bytes
, int count
);
35 int ProbeAddressI2C(struct CardData
*card
, unsigned short addr
);