"C" style construct
typedef struct iic_transfer
{
unsigned addr:8;
unsigned :21;
unsigned riscos_retry:1;
unsigned checksumonly:1;
unsigned nostart:1;
union
{ unsigned checksum;
void *data;
} d;
unsigned len;
} iic_transfer;
Assembler method
R0 points to the data block which is a list of transfers set out as:-
Word 0
bit 0 = Write/Read
bit 1-7 = Address of device
bit 8-28 = Reserved
bit 29 = Retry flag
bit 30 = Return checksum only flag
bit 31 = Send no start flag
Word 1 = Pointer to memory for data to be sent/received
Word 2 = Length of data to send/receive
This is repeated for the number of transfers required (R1)
This structure is used to describe a transfer as performed by the high-level HAL IIC API. It is also used by RISCOS_IICOpV and the OS_IICOp SWI.