generic.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002                            C   H E A D E R   F I L E
00003 
00004     Copyright (c) 2003 Neuros Audio LLC, All rights reserved.
00005 
00006 ******************************************************************************/
00007 
00021 
00022 #ifndef GENERIC__H
00023 #define GENERIC__H
00024 
00025 /*---------------------------------------------------------------------------*/
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029 
00030 /*-- HEADER FILE INCLUDES ---------------------------------------------------*/
00031 #include "../feature.h"
00032 
00033 
00034 /*-- SHARED DEFINITIONS -----------------------------------------------------*/
00035 
00036 #define SRAM_MEMSTART       0x7A000L
00037 #define SRAM_MEMLENGTH      0x05C00L    
00038 #define DB_SRAM_BUF         0x7FC00L    // Reserved for DB.
00039 #define M3U_SRAM_BUF        0x7FE00L    // Reserved for m3u playlist support.
00040 
00044 typedef enum 
00045 {
00046     SYNC_CODE,
00047     SYNC_CONST,
00048     USB_CODE,
00049     USB_CONST,
00050     DISKDB_CODE,
00051     DISKDB_CONST,
00052     MP3_CODE,
00053     MP3_CONST,
00054     PLAY_CODE,
00055     PLAY_IPROG_CODE,
00056     MYFI_IPROG_CODE,
00057     SLEEP_CODE,
00058     VOLUME_CODE,
00059     MYFICHANNEL_CODE,
00060     MSGBOX_CODE,
00061     XIM_CODE,   
00062     DBMENU_CODE,
00063     SMENU_CODE,
00064 #ifdef SP_SUPPORT
00065     AUDIOMENU_CODE,
00066 #endif
00067     AUTOSCAN_CODE,
00068     DECODER_CODE,
00069     RADIO_CODE,
00070     TUNER_CODE,
00071 #ifdef WAV_SUPPORT
00072     WAV_CODE,
00073     WAV_CONST,
00074 #endif
00075 #ifdef WMA_SUPPORT
00076     WMA_CODE,
00077     WMA_CONST,
00078 #endif
00079 #ifdef OGG_SUPPORT
00080     OGG_CODE,
00081     OGG_CONST,
00082 #endif
00083     ENCODER_CODE,
00084     ENCODERINIT_CODE,
00085     RECORD_CODE,
00086     RECORDDONE_CODE,
00087     HISI_CODE,
00088     HISIDONE_CODE,
00089     MPR_CODE,
00090     MPR_CONST,
00091     WAVR_CODE,  
00092     POWERUP_CODE,
00093     
00094     AUTOFF_CODE,
00095     BACKLIGHT_CODE,
00096     BKPKSWAP_CODE,
00097     CONTRAST_CODE,
00098     DATETIME_CODE,
00099     DBRECORDINFO_CODE,
00100     #ifdef DJ_SUPPORT
00101     DJMENU_CODE,
00102     #endif
00103     #ifdef M3U_SUPPORT
00104     PLAYQMENU_CODE,
00105     #endif
00106     EQMENU_CODE,
00107     HISIMENU_CODE,
00108     MAINMENU_CODE,
00109     MYFIMENU_CODE,
00110     PRESETREVIEW_CODE,
00111     PROPERTIES_CODE,
00112     RECQUALITY_CODE,
00113     REPEAT_CODE,
00114     SETTINGS_CODE,
00115 //DeepB
00116     XTRA_CODE,
00117     SHUFFLE_CODE,
00118     SYNCLOG_CODE,   
00119     
00120     DIAGNOSIS_CODE,
00121     DIAG_HDD_CODE,
00122     DIAG_NAND_CODE,
00123     Invalid_Code
00124 } CODE_CONST;
00125 
00126 
00130 typedef enum 
00131 {
00132     SYNC_OBJ,
00133     USB_OBJ,
00134     DISKDB_OBJ,
00135     DB_OBJ,
00136     
00137     MP3_DECODER_OBJ,
00138     LCD_OBJ,
00139     MENU_OBJ,
00140     UI_OBJ,
00141     
00142     #ifdef WAV_SUPPORT
00143     WAV_DECODER_OBJ,
00144     #endif
00145     
00146     #ifdef WMA_SUPPORT
00147     WMA_DECODER_OBJ,
00148     #endif
00149     
00150     #ifdef OGG_SUPPORT
00151     OGG_DECODER_OBJ,
00152     #endif
00153     
00154     ENCODER_OBJ,
00155     MP3_ENCODER_OBJ,
00156     #ifdef WAV_SUPPORT
00157     WAV_ENCODER_OBJ,
00158     #endif
00159     
00160     Invalid_Object
00161     
00162 } OBJ_ID;
00163 
00164 
00165 /*-- FUNCTION PROTOTYPES ----------------------------------------------------*/
00166 USHORT          GEN_int2ASCII(ULONG, char *, BOOL, USHORT);
00167 void            GEN_zeroOut(UINT16 *, UINT16);
00168 extern USHORT   GEN_readXdata(ULONG, USHORT *, USHORT);
00169 extern USHORT   GEN_readXstr(ULONG, USHORT *, USHORT);
00170 extern USHORT   GEN_xStrLen(ULONG);
00171 extern void     GEN_writeXdata(ULONG, USHORT *, USHORT);
00172 extern void     GEN_load(CODE_CONST);
00173 extern void     GEN_reinit(OBJ_ID);
00174 extern void     GEN_reboot(void);
00175 extern void     GEN_getXgbl(void *, void *, int);
00176 extern void     GEN_getIgbl(void *, void *, int);
00177 #define GEN_rdSRAM(dptr, p, num) GEN_readXdata(dptr, p, num)
00178 #define GEN_wrSRAM(dptr, p, num) GEN_writeXdata(dptr, p, num)
00179 
00180 extern void     GEN_rdSRAMandDeinterleave(ULONG, USHORT *, USHORT);
00181 USHORT          GEN_createTimeString(ULONG, char *);
00182 USHORT          GEN_createSizeString(ULONG, char *);
00183 void            GEN_memInit(void);
00184 unsigned long   GEN_malloc(unsigned short);
00185 void            GEN_free(unsigned long);
00186 unsigned short  GEN_memsize(unsigned long);
00187 
00188 void            GEN_pushStack(UINT16); 
00189 void            GEN_flushStack(UINT16);
00190 UINT16          GEN_popStack(void);
00191 UINT16          GEN_stackDepth(void);
00192 
00193 UINT            GEN_strUnpack(UINT16 *, UINT16);
00194 UINT            GEN_strPack(char *,const char *,UINT);
00195 int             GEN_ascii2hex(long);
00196 long            GEN_hex2ascii(int);
00197 
00198 int             GEN_eepromFormat(int);
00199 int             GEN_eepromWrite(int, int, int*);
00200 int             GEN_eepromRead(int, int, int*);
00201 
00202 USHORT          GEN_checksum(USHORT *, USHORT);
00203 
00204 /*---------------------------------------------------------------------------*/
00205 #ifdef __cplusplus
00206 }
00207 #endif
00208 
00209 /*---------------------------------------------------------------------------*/
00210 #endif /* GENERIC__H */
00211 
00212 /*****************************************************************************
00213                 Neuros Audio LLC. Confidential Proprietary
00214  *****************************************************************************/
00215 

Generated on Wed Jan 19 01:12:39 2005 for neuros-firmware by  doxygen 1.3.9.1