19 #ifndef SOURCE_PAL_IMPL_SERVICES_API_PAL_UPDATE_H_    20 #define SOURCE_PAL_IMPL_SERVICES_API_PAL_UPDATE_H_    23     #error "Please do not include this file directly, use pal.h instead"    73 #define SIZEOF_SHA256               256/8    74 #define FIRMWARE_HEADER_MAGIC       0x5a51b3d4UL    75 #define FIRMWARE_HEADER_VERSION     1    76 #define ACTIVE_IMAGE_INDEX          0xFFFFFFFF palStatus_t pal_imageDeInit(void)
Clears all the resources used by the pal_update APIs. 
 
char * pal_imageGetFolder(void)
This function gets the working directory for the firmware. 
 
Definition: pal_types.h:51
 
Definition: pal_update.h:58
 
struct _palImageHeaderDeails_t palImageHeaderDeails_t
 
Definition: pal_update.h:57
 
palStatus_t pal_imageWriteDataToMemory(palImagePlatformData_t dataId, const palConstBuffer_t *const dataBuffer)
Writes data to a memory accessible to the bootloader. Currently, only hash is available. 
 
Definition: pal_update.h:66
 
Definition: pal_update.h:64
 
palStatus_t pal_imageWrite(palImageId_t imageId, size_t offset, palConstBuffer_t *chunk)
Writes the data to the chunk buffer with the chunk bufferLength in the location of imageId...
 
palStatus_t pal_imageGetDirectMemoryAccess(palImageId_t imageId, void **imagePtr, size_t *imageSizeInBytes)
Verifies whether the image (imageId) is readable and sets imagePtr to point to the beginning of the i...
 
Definition: pal_update.h:62
 
Definition: pal_update.h:65
 
Definition: pal_update.h:68
 
_palImagePlatformData_t
Definition: pal_update.h:47
 
palStatus_t pal_imagePrepare(palImageId_t imageId, palImageHeaderDeails_t *headerDetails)
Prepares to write an image with an ID (imageId) and size (imageSize) in a suitable memory region...
 
palStatus_t pal_imageActivate(palImageId_t imageId)
Sets an image as the active image used after the device reset. 
 
Definition: pal_update.h:56
 
palStatus_t pal_imageReadToBuffer(palImageId_t imageId, size_t offset, palBuffer_t *chunk)
Reads the maximum of chunk (maxBufferLength) bytes from the image with relative offset and stores it ...
 
Definition: pal_update.h:63
 
Definition: pal_update.h:51
 
Definition: pal_types.h:58
 
palStatus_t pal_imageInitAPI(palImageSignalEvent_t CBfunction)
Sets the callback function that is called before the end of each API except imageGetDirectMemAccess. 
 
void(* palImageSignalEvent_t)(palImageEvents_t event)
Definition: pal_update.h:71
 
Definition: pal_update.h:61
 
_palImageEvents_t
Definition: pal_update.h:54
 
enum _palImagePlatformData_t palImagePlatformData_t
 
#define SIZEOF_SHA256
Definition: pal_update.h:73
 
uint32_t palImageId_t
Definition: pal_update.h:38
 
FirmwareHeader_t palFirmwareHeader_t
Definition: pal_update.h:88
 
palStatus_t pal_imageGetFirmwareHeaderData(palImageId_t imageId, palBuffer_t *headerData)
Retrieves the data value of the image header. 
 
Definition: pal_update.h:49
 
Definition: pal_update.h:60
 
Definition: pal_update.h:50
 
Definition: pal_update.h:67
 
palStatus_t pal_imageGetActiveHash(palBuffer_t *hash)
Retrieves the hash value of the active image to the hash buffer with the max size hash (maxBufferLeng...
 
enum _palImageEvents_t palImageEvents_t
 
int32_t palStatus_t
Definition: pal_types.h:49
 
struct FirmwareHeader FirmwareHeader_t
 
palStatus_t pal_imageFinalize(palImageId_t imageId)
Flushes the image data and sets the version of imageId to imageVersion. 
 
palStatus_t pal_imageGetActiveVersion(palBuffer_t *version)
Retrieves the version of the active image to the version buffer with the size set to version bufferLe...
 
Definition: pal_update.h:59