# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- Graphics Library

- 1
- 2
…
- 135
- 136
- 137
- 138
- 139
…
- 373
- 374

1.6.1.1.11 External Resources Functions
The following API are used to access external resources in the Graphics Library.
Functions
Name Description
GFX_ExternalResourceCallback This function performs data fetch from external memory.
1.6.1.1.11.1 GFX_ExternalResourceCallback Function
This function performs data fetch from external memory.
File
gfx_primitive.h
Syntax
GFX_STATUS GFX_ExternalResourceCallback(GFX_RESOURCE_HDR * pResource, uint32_t offset,
uint16_t nCount, void * pBuffer);
Returns
Status of the external resource callback. GFX_STATUS_SUCCESS when all the data was succesfully retrieved.
GFX_STATUS_FAILURE when partial or no data was retrieved.
Description
This function must be implemented in the application. The library will call this function each time when the external memory
data will be required.
The application must copy requested byte quantity into the buffer provided. Data start address in external memory is a sum
of the address in GFX_RESOURCE_HDR structure and offset.
An example of a situation where external memory will be accessed is when external fonts or images are used. External
resources in the library are defined by the type in the GFX_RESOURCE_HDR (see GFX_RESOURCE for details).
Preconditions
None.
Example
None.
Parameters
Parameters Description
pResource Pointer to the external memory resource information.
offset Offset of the data from the location of the resource in
external memory.
nCount Number of bytes to be transferred into the buffer.
buffer Pointer to the buffer that will hold the retrieved data.
Function
GFX_STATUS GFX_ExternalResourceCallback(
GFX_RESOURCE_HDR *pResource,
uint32_t offset,
uint16_t nCount,
void *pBuffer)
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
137

- 1
- 2
…
- 135
- 136
- 137
- 138
- 139
…
- 373
- 374