UI_PSF_hisidone.c File Reference


Detailed Description

This module provides parent HiSi complete state handle.

REVISION

Definition in file UI_PSF_hisidone.c.

#include "../SYSTEM/sys_hardware.h"
#include "../SYSTEM/sys_main.h"
#include "../SYSTEM/sys_clock.h"
#include "../SYSTEM/sys_param.h"
#include "../AUDIO/audio.h"
#include "../encoder/encoder.h"
#include "../ear/ear.h"
#include "ui.h"
#include "xim.h"

Include dependency graph for UI_PSF_hisidone.c:

Include dependency graph

Go to the source code of this file.

Functions

PARENT_STATE UI_PSF_hisidone (st_MSG *msgIN)
 Function serves as the parent HiSi complete state handle.


Function Documentation

PARENT_STATE UI_PSF_hisidone st_MSG msgIN  ) 
 

Function serves as the parent HiSi complete state handle.

Parameters:
msgIN Input message.
Returns:
Next state.

Definition at line 60 of file UI_PSF_hisidone.c.

References AI_SHUTDOWN, AUDIO_setInterface(), BTN_YES, ENCODER_getSource(), FAT_delete(), st_UI::fname, MENU_buf, MENU_CLOSE, st_UI::path, SMSGBOX_EXIT, SSTATE_END, SSTATE_START, SXIM_CREATE, SXIM_EXIT, TMR_create(), TMR_delete(), and TMR_HISIDONE.

Referenced by UI_parent().

00061 {   
00062     MSG_ID          id = msgIN->id;     
00063     MSG_DATA        d1 = msgIN->d1; 
00064     MSG_DATA        d2 = msgIN->d2;
00065     
00066     switch(id)
00067     {
00068     case SYS_MSG_ID:
00069         
00070         switch(d1)
00071         {
00072             case SSTATE_START:
00073             {
00074                 _loadHisiDoneTmplt(Ui.fname, (int)ENCODER_getSource());
00075                 menu = mMENU_create((void *)&MENU_buf[0]);
00076                 TMR_create(TMR_HISIDONE, 250, THISIDONE, 0, NO_RELOAD);
00077                 return P_HISIDONE;
00078             }
00079             case SSTATE_END:
00080             {
00081                 mMENU_action(menu, MENU_CLOSE);
00082                 TMR_delete(TMR_HISIDONE);
00083                 _addHisi2Db();
00084                 if(SYS_isRadioActive()) 
00085                 {
00086                     AUDIO_setInterface(AI_SHUTDOWN);
00087                 }
00088                 return P_NULL;
00089             }
00090             case SMSGBOX_EXIT:
00091             {
00092                 if(MENU_curMsgbx() == MSGBX_DELETEHISICLIP)
00093                 {
00094                     if(BTN_YES == d2)
00095                     {
00096                         mMENU_action(menu, MENU_CLOSE);
00097                         TMR_delete(TMR_HISIDONE);
00098                         FAT_delete(Ui.path);
00099                         
00100                         if(SYS_isRadioActive()) return P_RADIO;
00101                         return P_NULL;                      
00102                     }
00103                     else TMR_create(TMR_HISIDONE, 250, THISIDONE, 0, NO_RELOAD);
00104                 }               
00105             }
00106             case SXIM_EXIT: return _ximAction(msgIN);   
00107         }   
00108         break;
00109     
00110     case TMR_MSG_ID:
00111         switch(d1)
00112         {
00113             case THISIDONE:
00114             {
00115                 mMENU_action(menu, MENU_CLOSE);
00116                 mMSG_send(uiChildMsgQ, SYS_MSG_ID, SSTATE_END, DONTCARE, SYS_FOREVER);
00117                 _addHisi2Db();
00118                 if(SYS_isRadioActive()) return P_RADIO;
00119                 return P_NULL;
00120             }
00121         }
00122         break;
00123         
00124     case KBD_MSG_ID:
00125         switch(d1)
00126         {
00127             case KEY_BACK:
00128                 TMR_delete(TMR_HISIDONE);
00129                 mMENU_action(menu, MENU_CLOSE);
00130                 _addHisi2Db();
00131                 if(SYS_isRadioActive()) return P_RADIO;
00132                 return P_NULL;
00133 
00134             case KEY_PLAY:
00135                 _playHisi(msgIN);
00136                 return P_PLAY;
00137             
00138             case KEY_SELECT:
00139                 TMR_delete(TMR_HISIDONE);
00140                 mMSG_send(uiChildMsgQ, SYS_MSG_ID, SXIM_CREATE, XIMWIN_HISIDONE, SYS_FOREVER);
00141                 break;          
00142         }
00143         break;
00144     }
00145     
00146     return P_HISIDONE;
00147 }

Here is the call graph for this function:


Generated on Wed Jan 19 01:13:32 2005 for neuros-firmware by  doxygen 1.3.9.1