Embedded Application Programming Interface - picmg

Embedded Application Programming Interface - picmg Embedded Application Programming Interface - picmg

24.05.2014 Views

6 Storage Functions The EAPI defines one user storage area with a minimal size of 32 Byte. 6.1 Common Parameters 6.1.1 Storage Ids The EAPI only defines one user storage area. Additional vendor specific IDs are possible (see section 11 'Vendor Specific IDs' on page 76) Id EAPI_ID_STORAGE_STD Description Standard Storage Area >=32Bytes for read/write access 6.2 EApiStorageCap 6.2.1 Description Get the capabilities of the selected storage area. 6.2.2 Parameters Id uint32_t EAPI_CALLTYPE EApiStorageCap( __IN uint32_t Id , /* Storage Area Id */ __OUT uint32_t *pStorageSize , /* Total */ __OUT uint32_t *pBlockLength ); FUNC_DEF 9: EApiStorageCap __IN See '6.1.1 Storage Ids' on page 28 /* Write Block Length * & Alignment */ pStorageSize __OUTOPT Pointer to a buffer that receives storage area size. This parameter can be NULL if the data is not required. pBlockLength __OUTOPT Pointer to a buffer that receives the the storage areas alignment/Block size. This parameter can be NULL if the data is not required. The value must be used to calculate write block alignment and size. PICMG® EAPI R1.0, August 8, 2010 page 28 of 83

6.2.3 Return Status Codes Condition Library Uninitialized ((pStorageSize==NULL)&& (pBlockLength==NULL)) Unsupported Id Return Value EAPI_STATUS_NOT_INITIALIZED EAPI_STATUS_INVALID_PARAMETER EAPI_STATUS_UNSUPPORTED ... see 2.3 Status Codes on page 16 Success EAPI_STATUS_SUCCESS 6.3 EApiStorageAreaRead 6.3.1 Description Writes data to the selected user data area. 6.3.2 Parameters Id uint32_t EAPI_CALLTYPE EApiStorageAreaRead( __IN uint32_t Id , /* Storage Area Id */ __IN uint32_t Offset , /* Byte Offset */ __OUT void *pBuffer , /* Pointer to Data pBuffer */ __IN uint32_t BufLen , /* Data pBuffer Size in * bytes */ __IN uint32_t ByteCnt /* Number of bytes to read */ ); FUNC_DEF 10: EApiStorageAreaRead __IN See '6.1.1 Storage Ids' on page 28 Offset __IN Storage area start address offset in bytes. pBuffer __OUT Pointer to a buffer that receives the read data. BufLen __IN Size, in bytes, of the buffer pointed to by the pBuffer parameter ByteCnt __IN Size, in bytes, of the information read to the buffer pointed to by the pBuffer parameter PICMG® EAPI R1.0, August 8, 2010 page 29 of 83

6.2.3 Return Status Codes<br />

Condition<br />

Library Uninitialized<br />

((pStorageSize==NULL)&&<br />

(pBlockLength==NULL))<br />

Unsupported Id<br />

Return Value<br />

EAPI_STATUS_NOT_INITIALIZED<br />

EAPI_STATUS_INVALID_PARAMETER<br />

EAPI_STATUS_UNSUPPORTED<br />

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

Success<br />

EAPI_STATUS_SUCCESS<br />

6.3 EApiStorageAreaRead<br />

6.3.1 Description<br />

Writes data to the selected user data area.<br />

6.3.2 Parameters<br />

Id<br />

uint32_t<br />

EAPI_CALLTYPE<br />

EApiStorageAreaRead(<br />

__IN uint32_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 />

FUNC_DEF 10: EApiStorageAreaRead<br />

__IN See '6.1.1 Storage Ids' on page 28<br />

Offset<br />

__IN Storage area start address offset in bytes.<br />

pBuffer<br />

__OUT Pointer to a buffer that receives the read data.<br />

BufLen<br />

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

ByteCnt<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!