DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
Functions
stbhwupg.h File Reference

Functions for writing upgrade modules to non volatile memory. More...

#include "techtype.h"

Go to the source code of this file.

Functions

void STB_UPGInitialise (void)
 Initialisation of the necessary structures.
 
BOOLEAN STB_UPGStart (U8BIT image_type, U8BIT *filename)
 Specifies the file path that STB_UPWrite would write to and STB_UPGRead would read from when performing upgrade. If this function is not called, a default file name will be used. More...
 
BOOLEAN STB_UPGWrite (U8BIT image_type, U32BIT offset, U32BIT size, U8BIT *buffer)
 Writes size bytes to the upgrade storage area specified by image_type. More...
 
BOOLEAN STB_UPGRead (U8BIT image_type, U32BIT offset, U32BIT size, U8BIT *buffer)
 Read size bytes from the upgrade storage area specified by image_type. More...
 
BOOLEAN STB_UPGFinish (U8BIT image_type, BOOLEAN upgrade_successful)
 Finalises the upgrade performing all the required actions needed when all the upgrade data have been written or the upgrade process failed. More...
 
U32BIT STB_UPGGetApplicationSize (void)
 Returns the size of the NVM area available for the application and all the upgradable modules. In the last part of this area Intellibyte loader places some version information. More...
 
U32BIT STB_UPGGetApplicationOffset (void)
 Returns the application's offset inside its area. More...
 

Detailed Description

Functions for writing upgrade modules to non volatile memory.

Date
28/10/2009
Author
Sergio Panseri

Function Documentation

BOOLEAN STB_UPGFinish ( U8BIT  image_type,
BOOLEAN  upgrade_successful 
)

Finalises the upgrade performing all the required actions needed when all the upgrade data have been written or the upgrade process failed.

Parameters
image_typetype of image to be read, this is meaningful for the platform code only, as each platform may have different upgradable modules (kernel, application, kernel modules...). The midware passes this parameter as it finds it in the upgrade stream without interpretation.
upgrade_successfulTRUE if the upgrade data has been successfully written, FALSE otherwise
Returns
TRUE if the required actions have been performed successfully, FALSE otherwise
U32BIT STB_UPGGetApplicationOffset ( void  )

Returns the application's offset inside its area.

Returns
Application offset.
U32BIT STB_UPGGetApplicationSize ( void  )

Returns the size of the NVM area available for the application and all the upgradable modules. In the last part of this area Intellibyte loader places some version information.

Returns
Size of the application area.
BOOLEAN STB_UPGRead ( U8BIT  image_type,
U32BIT  offset,
U32BIT  size,
U8BIT *  buffer 
)

Read size bytes from the upgrade storage area specified by image_type.

Parameters
image_typetype of image to be read, this is meaningful for the platform code only, as each platform may have different upgradable modules (kernel, application, kernel modules...). The midware passes this parameter as it finds it in the upgrade stream without interpretation.
offsetoffset inside the specified area where to read from
sizenumber of bytes to read
bufferbuffer where to return the read data.
Returns
TRUE if successful, FALSE otherwise
BOOLEAN STB_UPGStart ( U8BIT  image_type,
U8BIT *  filename 
)

Specifies the file path that STB_UPWrite would write to and STB_UPGRead would read from when performing upgrade. If this function is not called, a default file name will be used.

Parameters
image_typetype of image to be written, this is meaningful for the platform code only, as each platform may have different upgradable modules (kernel, application, kernel modules...). The midware passes this parameter as it finds it in the upgrade stream without interpretation.
filename
Returns
TRUE if successful, FALSE otherwise
BOOLEAN STB_UPGWrite ( U8BIT  image_type,
U32BIT  offset,
U32BIT  size,
U8BIT *  buffer 
)

Writes size bytes to the upgrade storage area specified by image_type.

Parameters
image_typetype of image to be written, this is meaningful for the platform code only, as each platform may have different upgradable modules (kernel, application, kernel modules...). The midware passes this parameter as it finds it in the upgrade stream without interpretation.
offsetoffset inside the specified area where to write to
sizenumber of bytes to write
bufferbuffer containing the data to be written
Returns
TRUE if successful, FALSE otherwise