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.

*<br />

* EApiStorageCap<br />

*<br />

* Condition | Return Values<br />

* ---------------------------------------------+------------------------------<br />

* Library Uninitialized | EAPI_STATUS_NOT_INITIALIZED<br />

* ((pStorageSize==NULL)&&(pBlockLength==NULL)) | EAPI_STATUS_INVALID_PARAMETER<br />

* Unsupported Id | EAPI_STATUS_UNSUPPORTED<br />

* Common Error | Common Error Code<br />

* Else | EAPI_STATUS_SUCCESS<br />

*/<br />

EApiStatus_t<br />

EAPI_CALLTYPE<br />

EApiStorageCap(<br />

__IN EApiId_t Id , /* Storage Area Id */<br />

__OUT uint32_t *pStorageSize , /* Total */<br />

__OUT uint32_t *pBlockLength /* Write Block Length<br />

* & Alignment<br />

*/<br />

);<br />

/*<br />

* EApiStorageAreaRead<br />

*<br />

* Condition | Return Values<br />

* ---------------------------------------+------------------------------<br />

* Library Uninitialized | EAPI_STATUS_NOT_INITIALIZED<br />

* pBuffer==NULL | EAPI_STATUS_INVALID_PARAMETER<br />

* ByteCnt==0 | EAPI_STATUS_INVALID_PARAMETER<br />

* BufLen==0 | EAPI_STATUS_INVALID_PARAMETER<br />

* unknown Id | EAPI_STATUS_UNSUPPORTED<br />

* Offset+ByteCnt>pStorageSize | EAPI_STATUS_INVALID_BLOCK_LENGTH<br />

* Read Error | EAPI_STATUS_READ_ERROR<br />

* ByteCnt>BufLen | EAPI_STATUS_MORE_DATA<br />

* Common Error | Common Error Code<br />

* Else | EAPI_STATUS_SUCCESS<br />

*/<br />

EApiStatus_t<br />

EAPI_CALLTYPE<br />

EApiStorageAreaRead(<br />

__IN EApiId_t Id , /* Storage Area Id */<br />

__IN uint32_t Offset , /* Byte Offset */<br />

__OUT void *pBuffer , /* Pointer to Data pBuffer */<br />

__IN uint32_t BufLen , /* Data pBuffer Size in<br />

* bytes<br />

*/<br />

__IN uint32_t ByteCnt /* Number of bytes to read */<br />

);<br />

/*<br />

* EApiStorageAreaWrite<br />

*<br />

* Condition | Return Values<br />

* ---------------------------------------+------------------------------<br />

* Library Uninitialized | EAPI_STATUS_NOT_INITIALIZED<br />

* pBuffer==NULL | EAPI_STATUS_INVALID_PARAMETER<br />

* ByteCnt==0 | EAPI_STATUS_INVALID_PARAMETER<br />

* unknown Id | EAPI_STATUS_UNSUPPORTED<br />

* Offset%pBlockLength | EAPI_STATUS_INVALID_BLOCK_ALIGNMENT<br />

* ByteCnt%pBlockLength | EAPI_STATUS_INVALID_BLOCK_ALIGNMENT<br />

* Offset+ByteCnt>pStorageSize | EAPI_STATUS_INVALID_BLOCK_LENGTH<br />

* Write Error | EAPI_STATUS_WRITE_ERROR<br />

* Common Error | Common Error Code<br />

* Else | EAPI_STATUS_SUCCESS<br />

*/<br />

EApiStatus_t<br />

EAPI_CALLTYPE<br />

EApiStorageAreaWrite(<br />

__IN EApiId_t Id , /* Storage Area Id */<br />

__IN uint32_t Offset , /* Byte Offset */<br />

__IN void *pBuffer , /* Pointer to Data pBuffer */<br />

__IN uint32_t ByteCnt /* Number of bytes to write */<br />

);<br />

/*<br />

*<br />

* I 2 C<br />

*<br />

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

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

Saved successfully!

Ooh no, something went wrong!