24.05.2014 Views

Embedded Application Programming Interface - picmg

Embedded Application Programming Interface - picmg

Embedded Application Programming Interface - picmg

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.7.2 Parameters<br />

Id<br />

__IN See '7.1.1 I2C Bus Ids' on page 32<br />

Addr<br />

Cmd<br />

__IN Encoded 7/10 Bit I2C Device Address.<br />

__IN Encoded I2C Device Command / Index.<br />

pBuffer<br />

__OUT Pointer to a buffer that receives the read data. This parameter can be NULL if the data is not<br />

required.<br />

BufLen<br />

__IN Size, in bytes, of the buffer pointed to by the pBuffer parameter.<br />

If the buffer specified by pBuffer parameter is not large enough to hold the data, the function returns<br />

the value EAPI_STATUS_MORE_DATA<br />

ByteCnt<br />

__IN Size, in bytes, of data to be read<br />

7.7.3 Return Status Codes<br />

Condition<br />

Library Uninitialized<br />

pBuffer==NULL<br />

ByteCnt==0<br />

BufLen==0<br />

Unknown Id<br />

ByteCnt>pMaxBlkLen<br />

Bus Busy SDA/SDC low<br />

Arbitration Error/Collision Error<br />

On Write 1 write cycle<br />

SDA Remains low<br />

Timeout due to clock stretching<br />

startNak<br />

startNak<br />

startAckNak<br />

startAckNak<br />

startAckNak<br />

ByteCnt>BufLen<br />

Return Value<br />

EAPI_STATUS_NOT_INITIALIZED<br />

EAPI_STATUS_INVALID_PARAMETER<br />

EAPI_STATUS_INVALID_PARAMETER<br />

EAPI_STATUS_INVALID_PARAMETER<br />

EAPI_STATUS_UNSUPPORTED<br />

EAPI_STATUS_INVALID_BLOCK_LENGTH<br />

EAPI_STATUS_BUSY_COLLISION<br />

EAPI_STATUS_BUSY_COLLISION<br />

EAPI_STATUS_HW_TIMEOUT<br />

EAPI_STATUS_NOT_FOUND<br />

EAPI_STATUS_NOT_FOUND<br />

EAPI_STATUS_WRITE_ERROR Or<br />

EAPI_STATUS_NOT_FOUND<br />

EAPI_STATUS_WRITE_ERROR<br />

EAPI_STATUS_WRITE_ERROR<br />

EAPI_STATUS_MORE_DATA<br />

... see 2.3 Status Codes on page 16<br />

Success<br />

EAPI_STATUS_SUCCESS<br />

PICMG® EAPI R1.0, August 8, 2010 page 39 of 83

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!