DVBCore  1.0
Open source DVB engine
dvb/inc/app_nvm.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2004 Ocean Blue Software Ltd
00004  *
00005  * This file is part of a DTVKit Software Component
00006  * You are permitted to copy, modify or distribute this file subject to the terms
00007  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00008  * 
00009  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00010  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00011  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00012  * 
00013  * If you or your organisation is not a member of DTVKit then you have access
00014  * to this source code outside of the terms of the licence agreement
00015  * and you are expected to delete this and any associated files immediately.
00016  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00017  *******************************************************************************/
00025 #ifndef _APP_NVM_H
00026 #define _APP_NVM_H
00027 
00028 #include "stbhwc.h"
00029 
00030 //---constant definitions---------------------------------------------------------------------------
00031 //#define MAX_FAV_GRPS             4
00032 
00033 //---typedefs-structs-enumerations------------------------------------------------------------------
00034 
00035 //**************************************************************************************************
00036 //******   To add a new NVM item                                                              ******
00037 //******   ---------------------------------------------------------------------------------  ******
00038 //******                                                                                      ******
00039 //******   1. Add new nvm item to bottom of e_nvm_items e.g. ITEM_NEW_NVM above NUM_ITEMS_NVM ******
00040 //******   2. See notes in app_nvm.c                                                          ******
00041 //**************************************************************************************************
00042 
00043 //for use when using  APP_NvmReadDefault, APP_NvmRead, APP_NvmSave in screens
00044 //to access required nvm items
00045 typedef enum e_nvm_items
00046 {
00047    FIRST_BOOT_NVM,
00048    STANDBY_POWERSAVE_NVM,
00049    VOLUME_NVM,
00050    ASPECT_MODE_NVM,
00051    SCART_INPUT_TYPE_NVM,
00052    PRIMARY_AUDIO_LANG_NVM,
00053    SECONDARY_AUDIO_LANG_NVM,
00054    AUDIO_TYPE_NVM,
00055    STANDBY_STATE_NVM,
00056    SEARCHING_STATE_NVM,
00057    PARENTAL_LOCK_NVM,
00058 #ifdef INCLUDE_ICS
00059    ICS_PARENTAL_LOCK_NVM,
00060 #endif
00061    SYSTEM_PIN_NO_NVM,
00062    AERIAL_POWER_ON_NVM,
00063    COUNTRY_ID_NVM,
00064    REGION_ID_NVM,
00065    RF_CHANNEL_NUM_NVM,
00066    ASPECT_RATIO_NVM,
00067    TV_SCART_TYPE_NVM,
00068    WAKEUP_VOLUME_NVM,
00069    HDMI_RESOLUTION_NVM,
00070    NET_IF_TYPE_NVM,
00071    IP_MODE_NVM,
00072    IP_ADDRESS_NVM,
00073    SUBNET_MASK_NVM,
00074    GATEWAY_IP_NVM,
00075    DNS_SERVER_IP_NVM,
00076    ESSID_NVM,
00077    ESSID_PASSWORD_NVM,
00078    AD_VOLUME_NVM,
00079    SPDIF_OUTPUT_NVM,
00080    LIP_SYNC_ADJUSTMENT_NVM,
00081    TARGET_REGION_DEPTH_NVM,
00082    TARGET_REGION_COUNTRY_NVM,
00083    TARGET_REGION_PRIMARY_NVM,
00084    TARGET_REGION_SECONDARY_NVM,
00085    TARGET_REGION_TERTIARY_NVM,
00086    OTA_TYPE_NVM,
00087    OTA_LAST_UPDATE_SRCH_NVM,
00088    LAST_CHAN_SRCH_NVM,
00089    LAST_EIT_UPDATE_NVM,
00090    WATCH_HD_PROGRAMMES_NVM,
00091    RECORD_HD_PROGRAMMES_NVM,
00092    TIMESHIFT_BUFFER_SIZE_NVM,
00093    SUBTITLE_TYPE_NVM,
00094    BACKGROUND_SEARCH_START_NVM,
00095    BACKGROUND_SEARCH_END_NVM,
00096    SERVICE_SEARCH_ENABLED_NVM,
00097    SSU_SEARCH_ENABLED_NVM,
00098    LIVE_SERVICE_LCN_NVM,
00099    PRIMARY_TEXT_LANG_NVM,
00100    SECONDARY_TEXT_LANG_NVM,
00101    HDMI_AUDIO_OUTPUT_NVM,
00102    EIT_SCHED_LIMIT_NVM,
00103 #if defined(COMMON_INTERFACE)
00104    CICAM_ID0_0_NVM,
00105    CICAM_ID0_1_NVM,
00106    CICAM_PIN0_NVM,
00107    CICAM_PIN0_USED_TIME_NVM,
00108    CICAM_ID1_0_NVM,
00109    CICAM_ID1_1_NVM,
00110    CICAM_PIN1_NVM,
00111    CICAM_PIN1_USED_TIME_NVM,
00112    CICAM_ID2_0_NVM,
00113    CICAM_ID2_1_NVM,
00114    CICAM_PIN2_NVM,
00115    CICAM_PIN2_USED_TIME_NVM,
00116    CICAM_ID3_0_NVM,
00117    CICAM_ID3_1_NVM,
00118    CICAM_PIN3_NVM,
00119    CICAM_PIN3_USED_TIME_NVM,
00120 #endif
00121    NUM_ITEMS_NVM
00122 } E_NVM_ITEMS;
00123 
00124 typedef enum
00125 {
00126    STDBY_POWER_ON = 0,
00127    STDBY_STANDBY,
00128    STDBY_WAKE_FOR_SEARCH,
00129    STDBY_UPDATE_SEARCH,
00130    STDBY_WAKE_FOR_RECORDING,
00131    STDBY_RECORDING
00132 } E_STANDBY_STATE;
00133 
00134 typedef enum
00135 {
00136    OTA_TYPE_AUTO = 0,
00137    OTA_TYPE_MANUAL
00138 } E_OTA_TYPE;
00139 
00140 typedef enum
00141 {
00142    VIEW_REC_NEVER = 0,
00143    VIEW_REC_ASK,
00144    VIEW_REC_ALWAYS
00145 } E_VIEW_REC_PREF;
00146 
00147 typedef enum
00148 {
00149    SUBTITLE_NORMAL = 0,
00150    SUBTITLE_HARD_OF_HEARING
00151 } E_SUBTITLE_TYPE;
00152 
00153 typedef enum
00154 {
00155    PARENTAL_LOCK_OFF = 0,
00156    PARENTAL_LOCK_ON = 0xff
00157 } E_PARENTAL_LOCK;
00158 
00159 #ifdef INCLUDE_ICS
00160 typedef enum
00161 {
00162    ICS_PARENTAL_LOCK_OFF = 0,
00163    ICS_PARENTAL_LOCK_ON = 0xFF
00164 } E_ICS_PARENTAL_LOCK;
00165 #endif
00166 
00167 typedef enum
00168 {
00169    NET_IF_NONE,
00170    NET_IF_WIRED,
00171    NET_IF_WIRELESS
00172 } E_NET_IF_TYPE;
00173 
00174 //---Global function prototypes--------------------------------------------------------------------
00175 
00179 void APP_NvmRestoreDefaults(void);
00180 
00186 U32BIT APP_NvmReadDefault(E_NVM_ITEMS nvm_item);
00187 
00193 U32BIT APP_NvmRead(E_NVM_ITEMS nvm_item);
00194 
00203 void APP_NvmSave(E_NVM_ITEMS nvm_item, U32BIT new_value, BOOLEAN write_to_flash_now);
00204 
00208 void APP_NvmSaveAllNow(void);
00209 
00214 U32BIT APP_NvmGetDvbSize(void);
00215 
00216 //---Global functions for internal use ------------------------------------------------------------
00217 
00221 void APP_NvmInitialise(void);
00222 
00223 #endif // _APP_NVM_H
00224 //**************************************************************************************************
00225 // ---ooO END OF FILE Ooo---
00226 //**************************************************************************************************
 All Data Structures Files Functions Typedefs Defines