DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
Macros | Typedefs | Functions
stbnvm.c File Reference

NVM control functions. More...

#include <stdio.h>
#include <string.h>
#include <techtype.h>
#include <dbgfuncs.h>
#include "stbnvm.h"
#include "stbcsum.h"
#include "stbheap.h"
#include "stbhwmem.h"

Macros

#define STB_NV_PRINT(x)
 
#define FORMAT_VERSION_NUM   1
 
#define FORMAT_ID_STRING   "DTVKit NV"
 
#define FORMAT_ID_STRING_SIZE   10
 

Typedefs

typedef struct s_data_block_list S_DATA_BLOCK_LIST
 

Functions

void STB_NVMInitialise (void)
 Initialises NVM control. More...
 
U32BIT STB_NVMGetDataBlockSize (U32BIT data_block_id)
 Returns the number of bytes of data stored for the given data block. More...
 
BOOLEAN STB_NVMDataBlockRead (U32BIT data_block_id, U32BIT num_bytes, U8BIT *dest_addr)
 Reads data bytes for the given data block from NVM. More...
 
BOOLEAN STB_NVMDataBlockWrite (U32BIT data_block_id, U32BIT num_bytes, U8BIT *src_addr)
 Writes data bytes for the given data block to NVM. More...
 
U32BIT STB_NVMGetSTBSize (void)
 Returns size of STB database storage are (in bytes). More...
 
BOOLEAN STB_NVMSTBRead (U32BIT offset, U32BIT bytes, U8BIT *dest_addr)
 Reads bytes from the given position of the STB area of NVM. More...
 
BOOLEAN STB_NVMSTBWrite (U32BIT offset, U32BIT bytes, U8BIT *src_addr)
 Writes bytes into the given position of the STB area of NVM. More...
 

Detailed Description

NVM control functions.

Date
26/09/2000

Function Documentation

BOOLEAN STB_NVMDataBlockRead ( U32BIT  data_block_id,
U32BIT  num_bytes,
U8BIT *  dest_addr 
)

Reads data bytes for the given data block from NVM.

Parameters
data_block_iddata block from which the data is to be read
num_bytesnumber of bytes to be read
dest_addrbuffer to read the data into
Returns
TRUE if the data is read, FALSE otherwise
BOOLEAN STB_NVMDataBlockWrite ( U32BIT  data_block_id,
U32BIT  num_bytes,
U8BIT *  src_addr 
)

Writes data bytes for the given data block to NVM.

Parameters
data_block_iddata block to be written
num_bytesnumber of bytes to be written
src_addrdata to be written
Returns
TRUE if the data is written, FALSE otherwise
U32BIT STB_NVMGetDataBlockSize ( U32BIT  data_block_id)

Returns the number of bytes of data stored for the given data block.

Parameters
data_block_iddata block identifier
Returns
size in bytes
U32BIT STB_NVMGetSTBSize ( void  )

Returns size of STB database storage are (in bytes).

Returns
U32BIT - Number of bytes.
void STB_NVMInitialise ( void  )

Initialises NVM control.

Parameters
U32BITdvb_size - the number of bytes required in NVM by the application
BOOLEAN STB_NVMSTBRead ( U32BIT  offset,
U32BIT  bytes,
U8BIT *  dest_addr 
)

Reads bytes from the given position of the STB area of NVM.

Parameters
U32BIToffset - offset into STB NVM area
U32BITbytes - number of bytes to read
U8BIT*dest_addr - pointer to read data into
Returns
BOOLEAN - TRUE if NVM read OK, else FALSE.
BOOLEAN STB_NVMSTBWrite ( U32BIT  offset,
U32BIT  bytes,
U8BIT *  src_addr 
)

Writes bytes into the given position of the STB area of NVM.

Parameters
U32BIToffset - offset into STB NVM area
U32BITbytes - number of bytes to write
U8BIT*src_addr - pointer to write data from
Returns
BOOLEAN - TRUE if NVM write OK, else FALSE.