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"
 | 
| 
#define  | STB_NV_PRINT(x) | 
|   | 
| 
#define  | FORMAT_VERSION_NUM   1 | 
|   | 
| 
#define  | FORMAT_ID_STRING   "DTVKit NV" | 
|   | 
| 
#define  | FORMAT_ID_STRING_SIZE   10 | 
|   | 
NVM control functions. 
- Date
 - 26/09/2000 
 
 
      
        
          | 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_id | data block from which the data is to be read  | 
    | num_bytes | number of bytes to be read  | 
    | dest_addr | buffer 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_id | data block to be written  | 
    | num_bytes | number of bytes to be written  | 
    | src_addr | data 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_id | data 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
 - 
  
    | U32BIT | dvb_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
 - 
  
    | U32BIT | offset - offset into STB NVM area  | 
    | U32BIT | bytes - 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
 - 
  
    | U32BIT | offset - offset into STB NVM area  | 
    | U32BIT | bytes - number of bytes to write  | 
    | U8BIT* | src_addr - pointer to write data from | 
  
   
- Returns
 - BOOLEAN - TRUE if NVM write OK, else FALSE.