VLSI Solution Oy / MegaLib Documentation

player.h

Go to the documentation of this file.
00001 
00004 #ifndef __PLAYER_H__
00005 #define __PLAYER_H__
00006 
00007 #include <vstypes.h>
00008 
00009 void putch(register __a0 short dat); 
00011 extern s_int16 tmpBuf[2*32];
00012 
00014 extern struct Player {
00015     s_int16 totalFiles;  
00016     s_int16 currentFile; 
00017     s_int16 nextFile;    
00018     s_int16 nextStep;    
00019     s_int16 pauseOn;     
00020     s_int16 randomOn;    
00021     s_int16 volume;      
00022     s_int16 volumeOffset;
00023     u_int16 offDelay;    
00024     u_int16 ffCount;     
00025     u_int16 maxClock;    
00026 } player;
00027 
00028 #define LED1 4 //SI
00029 #define LED2 8 //SO
00030 
00032 enum keyEvent {
00033   ke_null = 0,
00034   ke_previous,   
00035   ke_next,       
00036   ke_rewind,     
00037   ke_forward,    
00038   ke_volumeUp,   
00039   ke_volumeDown, 
00040   ke_earSpeaker, 
00041   ke_earSpeakerToggle, 
00042   ke_randomToggle, 
00043   ke_randomToggleNewSong, 
00044   ke_pauseToggle, 
00045   ke_powerOff,    
00046   ke_ff_faster,  
00047   ke_ff_slower,  
00048   ke_ff_off,     
00049   ke_volumeUp2,  
00050   ke_volumeDown2,
00051 };
00052 
00053 struct KeyMapping {
00054   u_int16 key;         
00055   enum keyEvent event; 
00056 };
00057 extern const struct KeyMapping *currentKeyMap;
00058 extern const struct KeyMapping sixKeyMap[];
00059 extern const struct KeyMapping fiveKeyMap[];
00060 extern const struct KeyMapping shiftFourKeyMap[];
00061 extern const struct KeyMapping threeKeyMap[];
00062 
00063 #define KEY_1 1 /* prev/vol down     -> vol down 1 / vol down */
00064 #define KEY_2 2 /* random/earspeaker -> vol up 1   / vol up */
00065 #define KEY_3 4 /* next/vol up       -> prev / rew */
00066 #define KEY_4 8 /*                   -> next / ff */
00067 #define KEY_5 16 /*                  -> earspeaker / random */
00068 #define KEY_POWER 256 /* pause / power off/on */
00069 #define KEY_RELEASED   0x4000
00070 #define KEY_LONG_PRESS 0x8000
00071 #define KEY_LONG_ONESHOT 0x8000
00072 
00073 extern u_int16 keyOld;
00074 extern s_int16 keyOldTime;
00075 #define SHORT_LIMIT 16
00076 #define OFF_LIMIT 32
00077 
00078 
00079 extern __y u_int16 mallocAreaY[]; /* for ramdisk */
00080 extern u_int16 mallocAreaX[];     /* for ramboot */
00081 
00082 extern const u_int32 *supportedFiles;
00083 extern const u_int32 defSupportedFiles[];
00084 extern u_int16 keyCheck;
00085 
00086 /*
00087   Function Prototypes
00088  */
00100 void KeyScan(void);
00103 auto void CleanDisk(register __c1 u_int16 tryBoot);
00105 void PlayerVolume(void);
00106 auto u_int16 USBIsAttached(void); 
00109 auto void MassStorage(void);
00112 auto void RealMassStorage(void);
00115 void KeyEventHandler(enum keyEvent event);
00118 void RealKeyEventHandler(enum keyEvent event);
00121 auto u_int16 ReadGPIO(void);
00125 void USBSuspend(u_int16 timeOut);
00131 void RealUSBSuspend(u_int16 timeOut);
00135 void KeyScan(void);
00138 void UserInterfaceIdleHook(void);
00141 u_int16 CsRead(struct CodecServices *cs, u_int16 *data,
00142                u_int16 firstOdd, u_int16 bytes);
00145 s_int16 CsSeek(struct CodecServices *cs, s_int32 offset, s_int16 whence);
00152 s_int16 CsOutput(struct CodecServices *cs, s_int16 *data, s_int16 n);
00153 
00154 
00158 extern __y u_int16 vs1000d_BitReverse[256];
00163 extern __y u_int16 vs1000d_Latin1[256*3];
00164 
00165 #endif /*__PLAYER_H__*/

All software copyright 2005-2006 VLSI Solution OY. Redistribution of this software is strictly forbidden.