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

Non_Volatile_Memory data handling functions. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "techtype.h"
#include "dbgfuncs.h"
#include "stbhwav.h"
#include "stbdpc.h"
#include "stbgc.h"
#include "stbsiflt.h"
#include "stbsitab.h"
#include "stbheap.h"
#include "vtctype.h"
#include "app.h"
#include "ap_cfg.h"
#include "ap_dbacc.h"
#include "ap_ipadd.h"
#include "app_nvm.h"
#include "dba.h"

Macros

#define DVB_DATA_BLOCK_ID   0x44564220 /* 'DVB ' */
 
#define WIRELESS_ESSID_MAX   33
 
#define WIRELESS_PASSWORD_MAX   64
 
#define DBG(X)
 

Typedefs

typedef struct s_nvm_field S_NVM_FIELD
 
typedef struct s_nvm_data S_NVM_DATA
 

Functions

void APP_NvmInitialise (void)
 Initialises the DVB core's NVM data.
 
void APP_NvmRestoreDefaults (void)
 Resets the DVB's settings to factory defaults.
 
U32BIT APP_NvmReadDefault (E_NVM_ITEMS nvm_item)
 Returns the factory default value for the given DVB setting. More...
 
U32BIT APP_NvmRead (E_NVM_ITEMS nvm_item)
 Returns the current value for the given DVB setting. More...
 
U8BIT * APP_NvmReadString (E_NVM_ITEMS nvm_item)
 Returns pointer to current string for the given DVB setting. More...
 
void APP_NvmSave (E_NVM_ITEMS nvm_item, U32BIT new_value, BOOLEAN write_to_flash_now)
 Sets the current value for the given DVB setting. More...
 
void APP_NvmSaveString (E_NVM_ITEMS nvm_item, U8BIT *str_ptr, BOOLEAN write_to_flash_now)
 Sets the current value for the given DVB setting. More...
 
void APP_NvmSaveAllNow (void)
 Saves DVB values immediately.
 
U32BIT APP_NvmGetDvbSize (void)
 Returns the size in bytes the DVB module uses to save its settings. More...
 

Detailed Description

Non_Volatile_Memory data handling functions.

Date
16/09/2003

Function Documentation

U32BIT APP_NvmGetDvbSize ( void  )

Returns the size in bytes the DVB module uses to save its settings.

Returns
size of DVB settings in bytes
U32BIT APP_NvmRead ( E_NVM_ITEMS  nvm_item)

Returns the current value for the given DVB setting.

Parameters
nvm_item- value to be read
Returns
current value
U32BIT APP_NvmReadDefault ( E_NVM_ITEMS  nvm_item)

Returns the factory default value for the given DVB setting.

Parameters
nvm_item- value to be read
Returns
factory default value
U8BIT* APP_NvmReadString ( E_NVM_ITEMS  nvm_item)

Returns pointer to current string for the given DVB setting.

Parameters
nvm_item- value to be read
Returns
pointer to string
void APP_NvmSave ( E_NVM_ITEMS  nvm_item,
U32BIT  new_value,
BOOLEAN  write_to_flash_now 
)

Sets the current value for the given DVB setting.

Parameters
nvm_item- item to be read
new_value- value for the item
write_to_flash_now- if TRUE then all the current values will be saved. When changing the values of several items, it will be more efficient to only this this TRUE for the last item
void APP_NvmSaveString ( E_NVM_ITEMS  nvm_item,
U8BIT *  str_ptr,
BOOLEAN  write_to_flash_now 
)

Sets the current value for the given DVB setting.

Parameters
nvm_item- item to be written
str_ptr- pointer to string for the item
write_to_flash_now- if TRUE then all the current values will be saved. When changing the values of several items, it will be more efficient to only this this TRUE for the last item