SwapCode1.c
上传用户:hualongjx
上传日期:2022-01-17
资源大小:4k
文件大小:14k
源码类别:

mpeg/mp3

开发平台:

Objective-C

  1. #include <option.h>
  2. #include <SMI51.h>
  3. #include <struct.h>
  4. #include <local.h>
  5. #include <local1.h>
  6. #include <protyp.h>
  7. #include <fusb.h>
  8. #include <UI.h>
  9. #include <fat.H>  
  10. #include <sd.h>
  11. #include <sdcmd.h>
  12. #include <isp_def.h>
  13. #if 1//S_SupportFM //yu5
  14. void FMdelay()
  15. {
  16.     delayclk(0x02);   
  17. }
  18. //code BYTE BATMAPISP[]={0,0,1,2,2,3,3,3};
  19. code BYTE BATMAPISP[]={0,0,0,0,0,1,2,3};
  20. void GUI_FM_ShowChanISP()
  21. {
  22.     for (gxTemp0=0;gxTemp0<16;gxTemp0++)
  23.         XB_FM_TempString[gxTemp0]=' ';
  24.     XB_FM_TempString[0]='F';
  25.     XB_FM_TempString[1]='M';
  26.     //JM=>PLL=(XW_FM_Freq*8.192-225)/100;
  27.     //gxibTempIntegerByte.INTEGER=(XW_FM_Freq&0x01)+(XW_FM_Freq/2);
  28.     gxibTempIntegerByte.INTEGER=(XW_FM_Freq/2); //(GM8)
  29.     gxibTempIntegerByte.INTEGER=hex2dec(gxibTempIntegerByte.INTEGER);
  30.     gxTemp0=2;
  31.     XB_FM_TempString[2]=((gxibTempIntegerByte.SBYTE.B1>>4) & 0x0f) | '0';
  32.     if (XB_FM_TempString[2] != '0') gxTemp0=3;
  33.     XB_FM_TempString[gxTemp0++]=((gxibTempIntegerByte.SBYTE.B1>>0) & 0x0f) | '0';
  34.     XB_FM_TempString[gxTemp0++]=((gxibTempIntegerByte.SBYTE.B0>>4) & 0x0f) | '0';
  35.     XB_FM_TempString[gxTemp0++]='.';
  36.     XB_FM_TempString[gxTemp0++]=((gxibTempIntegerByte.SBYTE.B0>>0) & 0x0f) | '0';
  37.    
  38.     if(XW_FM_Freq&0x01)
  39.      XB_FM_TempString[gxTemp0++]='5';
  40.     else
  41.      XB_FM_TempString[gxTemp0++]='0';
  42.     XB_FM_TempString[9]='C';
  43.     XB_FM_TempString[10]='H';
  44.     gxibTempIntegerByte.SBYTE.B0=hex2dec(XB_FM_MEM);
  45.     XB_FM_TempString[11]=((gxibTempIntegerByte.SBYTE.B0>>4) & 0x0f) | '0';
  46.     XB_FM_TempString[12]=((gxibTempIntegerByte.SBYTE.B0>>0) & 0x0f) | '0';
  47.     XB_FM_TempString[13]=0;
  48.     LCM_xp=0;
  49.     LCM_yp=1;
  50.     GUI_ShowString((XBYTE*)(XB_FM_TempString) ,0);
  51.     if(!(PB_HOST[0x04]&SET_BIT1)) //(GM7)
  52.     {
  53.      uiUpdateMainDisplay(bit0);
  54. lcmSetPageAddress(0,80); //(G) for FM mode
  55. MOVERAM_LCM(&XB_BUF0xE000[BATMAPISP[PB_HOST[ADC3BIT_CTRL]]*128],18);
  56. if(PB_HOST[ADC3BIT_CTRL]<=3)
  57. {
  58. M_SetLowBattery;
  59. GUI_ShowMenu1(C_LowBatteryPictureOffset);
  60. }   
  61.     }
  62. }
  63. void I2C_Stop_ISP()
  64. {
  65.     PB_HOST[FMI2C]=0xF8;
  66.     PB_HOST[I2CSEL]=0x7F;//Set input mode
  67.     FMdelay();
  68.     PB_HOST[FMI2C]=0xFA;
  69.     FMdelay();
  70.     PB_HOST[FMI2C]=0xFB;
  71. }
  72. #define k gxTempR
  73. #define i gxTemp0
  74. #define temp gxTemp1
  75. #define tempreg gxTemp2
  76. void FM_I2C_ADDR_ISP(BYTE addr)
  77. {
  78.     temp=addr;
  79.     
  80.     PB_HOST[FMI2C]=0xFB;//Start condition,CLK=0
  81.     FMdelay();
  82.     tempreg=0xFA;
  83.     PB_HOST[FMI2C]=0xFA;//Start condition,CLK=0
  84.     
  85.     FMdelay();
  86.     
  87.     for (i=0;i<8;i++)
  88.     {
  89.         tempreg&=0xFD;//Clr clk
  90.         PB_HOST[FMI2C]=tempreg; 
  91.         if (temp&0x80)
  92.         {
  93.             tempreg|=0x01;
  94.         }
  95.         else
  96.         {
  97.             tempreg&=0xFE;
  98.         }
  99.         PB_HOST[FMI2C]=tempreg;
  100.         tempreg|=0x02;//Set clk
  101.         PB_HOST[FMI2C]=tempreg;
  102.         temp=temp<<1;
  103.     }
  104.     
  105.     FMdelay();
  106.     
  107.     tempreg&=0xFD;//clr clk
  108.     PB_HOST[FMI2C]=tempreg;
  109.     PB_HOST[I2CSEL]=0x7E;//Set input mode
  110.     FMdelay();
  111.     tempreg|=0x02;//Set clk
  112.     PB_HOST[FMI2C]=tempreg;
  113.     FMdelay();
  114.     
  115. }
  116. void FM_I2C_IN_ISP(BYTE addr)
  117. {
  118.     FM_I2C_ADDR_ISP(addr);
  119.     for (k=0;k<5;k++)
  120.     {
  121.         temp=XB_FM_Data[k];
  122.         for (i=0;i<8;i++)
  123.         {
  124.             tempreg&=0xFD;
  125.             PB_HOST[FMI2C]=tempreg;
  126.             PB_HOST[I2CSEL]=0x7F;
  127.             if (temp&0x80)
  128.             {
  129.                 tempreg|=0x01;
  130.             }
  131.             else
  132.             {
  133.                 tempreg&=0xFE;
  134.             }
  135.             PB_HOST[FMI2C]=tempreg;
  136.             tempreg|=0x02;//Set clk
  137.             PB_HOST[FMI2C]=tempreg;
  138.             temp=temp<<1;
  139.         }
  140.         FMdelay();        
  141.         tempreg&=0xFD;//clr clk
  142.         PB_HOST[FMI2C]=tempreg;
  143.         PB_HOST[I2CSEL]=0x7E;//Set input mode
  144.         FMdelay();        
  145.         tempreg|=0x02;//Set clk
  146.         PB_HOST[FMI2C]=tempreg;
  147.         FMdelay();
  148.     }
  149.     I2C_Stop_ISP();
  150. }
  151. void FM_I2C_OUT_ISP(BYTE addr)
  152. {
  153.     FM_I2C_ADDR_ISP(addr);
  154.     for (k=0;k<5;k++)
  155.     {
  156.         temp=0;
  157.         for (i=0;i<8;i++)
  158.         {
  159.             temp=(temp<<1);
  160.             tempreg&=0xFD;//Clr clk
  161.             PB_HOST[FMI2C]=tempreg;
  162.             PB_HOST[I2CSEL]=0x7E;
  163.             FMdelay();
  164.             tempreg|=0x02;//set clk
  165.             PB_HOST[FMI2C]=tempreg;
  166.             FMdelay();
  167.             if (PB_HOST[FMI2C]&0x01)
  168.             {
  169.                 temp|=0x01;
  170.             }
  171.             else
  172.             {
  173.                 temp&=0xFE;
  174.             }
  175.         }
  176.         XB_FM_Data[k]=temp;
  177.         tempreg&=0xFD;//clr clk
  178.         PB_HOST[FMI2C]=tempreg;
  179.         FMdelay();
  180.         tempreg&=0xFE;
  181.         PB_HOST[I2CSEL]=0x7F;
  182.         PB_HOST[FMI2C]=tempreg;
  183.         tempreg|=0x02;//Set clk
  184.         PB_HOST[FMI2C]=tempreg;
  185.         FMdelay();
  186.     }
  187.     I2C_Stop_ISP();
  188. }
  189. #undef k
  190. #undef i
  191. #undef temp
  192. #undef tempreg
  193. void SetFMDataISP()
  194. {
  195.     //JM=>XB_FM_Data[1]=XW_FM_Freq&0xFF;
  196.     //JM=>XB_FM_Data[0]=XB_FM_Data[0]|((XW_FM_Freq>>8)&0x3F);
  197.     XB_FM_Data[0]=gxlbTempLongByte.SBYTE.B1;
  198.     XB_FM_Data[1]=gxlbTempLongByte.SBYTE.B0;
  199.     XB_FM_Data[2]=(XB_FM_Data[2]&0xA0)|0x30;
  200.     XB_FM_Data[3]=0x10;
  201.     XB_FM_Data[4]=0;
  202.     FM_I2C_IN_ISP(0xC0);
  203. }
  204. void FM_initISP()
  205. {
  206.     PB_HOST[I2CSEL] |= SET_BIT0;
  207.     if((XW_FM_Freq>FMMax)||(XW_FM_Freq<FMMin))
  208.      XW_FM_Freq=FMMin;
  209.     XB_FM_Data[0]=0;
  210.     XB_FM_Data[2]=0;
  211.     SetFMDataISP();
  212. }
  213. #define buf gxTemp4
  214. #define PTR XB_BUF0xE000
  215. void LoadSettingISP(void)
  216. {
  217.     //XBYTE *PTR;
  218.     
  219.     LoadWPROPage(buf,1);
  220.     //PTR=BUFADR[buf];
  221.     if (
  222.        (PTR[0]=='S')&&
  223.        (PTR[1]=='M')&&
  224.        (PTR[2]=='I')
  225.        )
  226.     {
  227.         gxRepeatMode=PTR[0x10];
  228.         XB_ADJ_Language=PTR[0x11];
  229.         XB_ADJ_CurrentV=PTR[0x12];
  230.         if(XB_ADJ_CurrentV>24)
  231.          XB_ADJ_CurrentV=24;
  232.         
  233.         XB_ADJ_EQMode=PTR[0x13];
  234.         XB_ADJ_AutoOff=PTR[0x14];
  235.         XB_ADJ_Contrast=PTR[0x15];
  236. SelectFolderCount=XB_ADJ_Contrast&0x0f;
  237. FolderStudeLevel=((XB_ADJ_Contrast>>4)&0x0f)*10;
  238. if( (SelectFolderCount>36)||(!SelectFolderCount)  )
  239. SelectFolderCount=1;
  240. if( (FolderStudeLevel>100)||(!FolderStudeLevel)  )
  241. FolderStudeLevel=40;
  242. XB_ADJ_Contrast=4;
  243.         XB_ADJ_BLTimer=PTR[0x16];
  244.         gxUseEngMenu=PTR[0x17];
  245.         gx16TempReg=((UINT16)PTR[0x18]<<8)+PTR[0x19];
  246.         if(gx16TempReg>=XW_TotalFile[XB_FileType])
  247. gx16PlayIndex=0;
  248. else
  249. gx16PlayIndex=gx16TempReg;
  250.         
  251.     
  252.         XW_FM_Freq=PTR[0x20+XB_FM_MEM*2+1];
  253. XW_FM_Freq=(XW_FM_Freq<<8)+PTR[0x20+XB_FM_MEM*2];
  254. if((XW_FM_Freq>FMMax)||(XW_FM_Freq<FMMin)) XW_FM_Freq=FMMin;
  255.         XB_FM_MEM=PTR[0x20+21*2];
  256.     }
  257.     else
  258.     {
  259.         gxRepeatMode=0x00;
  260.         XB_ADJ_Language=0x02;
  261.         XB_ADJ_CurrentV=18;
  262.         XB_ADJ_EQMode=0x00;
  263.         XB_ADJ_AutoOff=0x00;
  264. //        XB_ADJ_Contrast=0x51;
  265.         XB_ADJ_Contrast=4;
  266. SelectFolderCount=1;
  267. FolderStudeLevel=60;
  268.         XB_ADJ_BLTimer=0x00;
  269.         gxUseEngMenu=0;
  270.         gx16PlayIndex=0;
  271.         XW_FM_Freq=FMMin;
  272.         XB_FM_MEM=0;
  273.     }    
  274. }
  275. #undef buf 
  276. #undef PTR
  277. void fmGetMemChannelISP()
  278. {
  279.     if(XB_FM_MEM>20) XB_FM_MEM=0;
  280. gxTempR=XB_FM_MEM;
  281. gxTemp4=BUF0xE000;
  282. LoadSettingISP();
  283. //LoadSetting(BUF0xE000);
  284. XB_FM_MEM=gxTempR;
  285.     XB_FM_Data[0]=0;
  286.     XB_FM_Data[2]=0;
  287.     
  288.     gxlbTempLongByte.ULONG=(UINT32)XW_FM_Freq*(12500/2)+28125;  //(GM8)
  289. gxlbTempLongByte.ULONG=gxlbTempLongByte.ULONG>>10; //(J)/1024    
  290.     SetFMDataISP();
  291.     gxMemChannel=1;
  292. GUI_FM_ShowChanISP();
  293. }
  294. void InitFMISP()
  295. {
  296.     while (ReadDSP_DMA_CTRbit());
  297. //    WRITE_DSPREG(DMA_CTR,0);
  298.     Disable_DSP();
  299.     XB_FM_RunSeek=0;
  300.     XB_FM_SeekDir=0;
  301.     i2cInitialCS42L51(2);
  302. uiUpdateMainDisplay(bit7);
  303. XSFR2&=~bit2;//enable FM data bus pull high 
  304.     FM_initISP();
  305.     fmGetMemChannelISP();
  306. M_SetRampUpToVolume;
  307. gxRampVolume=0;
  308.     GUI_FM_ShowChanISP();
  309. }
  310. void FMStandbyISP()
  311. {
  312.     XB_FM_Data[1]=XW_FM_Freq&0xFF;
  313.     XB_FM_Data[0]=XB_FM_Data[0]|((XW_FM_Freq>>8)&0x3F);
  314.     XB_FM_Data[2]=(XB_FM_Data[2]&0xA0)|0x30;
  315.     XB_FM_Data[3]=0x53;
  316.     XB_FM_Data[4]=0x00;
  317.     FM_I2C_IN_ISP(0xC0);
  318.     XSFR2|=bit2;//disable FM data bus pull high 
  319.     
  320. #if(S_SupportAudioADC)
  321. WRITE_DSPIO(0x44,C_ADCDefultSetting);
  322.     M_AudioADCPowerDown;
  323. #endif    
  324. }
  325. #if(S_CS42L51)
  326. void I2CMixOff()
  327. {
  328. CodecI2COut(0x0e,0x80);
  329. CodecI2COut(0x0f,0x80);
  330. }
  331. void I2CMixOn()
  332. {
  333. CodecI2COut(0x0e,0x00);
  334. CodecI2COut(0x0f,0x00);
  335. }
  336. #endif
  337. void FM_SeekISP(void)
  338. {  
  339. //XBYTE u8IFCnt; //20060117_Jash use gxTemp0
  340. gxTempFMLevel=0; //20060411_Jash
  341. if (gxFMSeekDir>1) 
  342.      gxFMSeekDir=XB_FM_SeekDir;
  343.     else      
  344.     {
  345.      XB_FM_SeekDir=gxFMSeekDir;
  346.     }
  347.     
  348. if(XB_FM_RunSeek)
  349. {
  350. #if(S_CS42L51)
  351.         I2CMixOff();
  352. #endif 
  353. #if(S_SupportAudioADC)
  354. CodeI2C_CS_HIGH;
  355. #endif        
  356. }
  357. XB_FM_Data[0]=0x00; //(J)Step 
  358.     
  359.     if (gxFMSeekDir)
  360.     {
  361.      XW_FM_Freq++;
  362.     if (XW_FM_Freq > FMMax)   XW_FM_Freq = FMMin;
  363.     }
  364.     else
  365.     {
  366.      XW_FM_Freq--;  
  367.     if (XW_FM_Freq < FMMin)    XW_FM_Freq = FMMax;
  368.     }
  369.     XB_FM_Data[2]=0x60;
  370.     gxlbTempLongByte.ULONG=(UINT32)XW_FM_Freq*(12500/2)+28125;
  371. gxlbTempLongByte.ULONG=gxlbTempLongByte.ULONG>>10; //(J)/1024
  372.     SetFMDataISP();
  373.     gx5P5mSCnt=0;
  374.     T1Flag=0;
  375.     XSFR1 |= bit2; //20060719_Jash //(J)active key pad internal pull high
  376. delayclk(50); //20060719_Jash
  377.     while(gx5P5mSCnt<3)
  378.     {
  379.      if(T1Flag)
  380.      {
  381.      T1Flag=0;
  382.      gx5P5mSCnt++;
  383.      }
  384.     
  385.      //20060719_Jash
  386.      if((gxKeyMinderBuf==0)&&(~PB_HOST[Key_Pad])) //must be release all key then press any key
  387.      {
  388.      XB_FM_RunSeek=3; //XB_FM_RunSeek=3 means in prepare to leave FM seek mode.
  389.      XB_MENULayer[0]=10; //clear auto scan mode
  390. #if(S_CS42L51)    
  391.      I2CMixOn(); //(GM8)after manually stop FM seek, enable I2CMixOn
  392. #endif
  393.      break;
  394.      }
  395.     }
  396.     XSFR1 &= ~bit2; //20060719_Jash
  397.     FM_I2C_OUT_ISP(0xC1);
  398. gxTemp0=XB_FM_Data[2]&0x7f;  
  399. //u8ADCLevel=XB_FM_Data[3];
  400. if(XB_FM_Data[0]&0x40)
  401. {
  402. if(XB_FM_RunSeek!=2) //20060411_Jash
  403. {
  404. XB_FM_RunSeek=0; //original
  405.          //I2CMixOn(); //original
  406.         
  407.         }
  408.         else
  409.         {
  410. gxTempFMLevel=0xF1;
  411.         }
  412. }
  413. else if(((XB_FM_Data[3]&0xf0)>=0xA0)&&(gxTemp0>=49)&&(gxTemp0<=63)) //(J)33,41/49,62
  414. {
  415. if(XB_FM_RunSeek!=2) //20060411_Jash
  416. {
  417.     XB_FM_RunSeek=0; //original
  418. #if(S_CS42L51)    
  419.      I2CMixOn();
  420. #endif
  421. #if(S_SupportAudioADC)
  422. CodeI2C_CS_LOW;
  423. #endif
  424.     }
  425.     else
  426.     {
  427.      gxTempFMLevel=(XB_FM_Data[3]&0xf0);
  428.         }
  429. }
  430. #if(S_SupportAudioADC)
  431. if(XB_FM_RunSeek==3 || XB_FM_RunSeek==0)
  432. CodeI2C_CS_LOW;
  433. #endif
  434. //20060411_Jash
  435. if(XB_FM_RunSeek==2)
  436. {
  437. if(gxTempFMLevel&&(XW_FM_Freq!=(960*2)))
  438.         {
  439.          if(XB_FM_MEM<21)
  440.          {
  441.          gx16FMFreq[XB_FM_MEM]=XW_FM_Freq;
  442.          gxFMLevel[XB_FM_MEM]=gxTempFMLevel;
  443.          if(gxTempFMLevel<gxFMMinLevel)
  444.          {
  445.          gxFMMinLevel=gxTempFMLevel;
  446.          gxMinFreqIndex=XB_FM_MEM;
  447.          }
  448.          XB_FM_MEM++;
  449.          }
  450.          else
  451.          {
  452.          if(gxTempFMLevel>=gxFMMinLevel)
  453.          {        
  454.          gx16FMFreq[gxMinFreqIndex]=XW_FM_Freq;
  455.          gxFMLevel[gxMinFreqIndex]=gxTempFMLevel;
  456.         
  457.          gxFMMinLevel=0xFF;
  458.          for(gxTemp1=0;gxTemp1<XB_FM_MEM;gxTemp1++)
  459.          {
  460.          if(gxFMLevel[gxTemp1]<gxFMMinLevel)
  461.          {
  462.          //we give 0xFF for gxFMMinLeve initial value, but the max level is 0xF0.
  463.          //So, the fist time will enter here.
  464.          gxFMMinLevel=gxFMLevel[gxTemp1];
  465.          gxMinFreqIndex=gxTemp1;
  466.          }
  467.          else
  468.          {
  469.          if((gxFMLevel[gxTemp1]==gxFMMinLevel)&&(gx16FMFreq[gxTemp1]<gx16FMFreq[gxMinFreqIndex]))
  470.          {
  471.          gxMinFreqIndex=gxTemp1;
  472.          }
  473.          }
  474.          }
  475.          }
  476.          }        
  477.         }
  478. if(XW_FM_Freq==FMMax)
  479. {
  480.   for(gxTemp1=0;gxTemp1<XB_FM_MEM;gxTemp1++)
  481.   {
  482.   gxibTempIntegerByte.INTEGER=gx16FMFreq[gxTemp1];
  483.   for(gxTemp2=gxTemp1+1;gxTemp2<XB_FM_MEM;gxTemp2++)
  484.   {
  485.   if(gx16FMFreq[gxTemp2]<gxibTempIntegerByte.INTEGER)
  486.   {
  487.   gxibTempIntegerByte.INTEGER=gx16FMFreq[gxTemp2];
  488.   gx16FMFreq[gxTemp2]=gx16FMFreq[gxTemp1];
  489.   gx16FMFreq[gxTemp1]=gxibTempIntegerByte.INTEGER;
  490.   }
  491.   }
  492.   }
  493. LoadWPROPage(BUF0xE000,1);
  494.      gxTempPtr=BUFADR[BUF0xE000];
  495.      for(gxTemp1=0;gxTemp1<XB_FM_MEM;gxTemp1++)
  496.      {
  497.      gxTempPtr[0x20+gxTemp1*2]=gx16FMFreq[gxTemp1];
  498.      gxTempPtr[0x20+gxTemp1*2+1]=(gx16FMFreq[gxTemp1]>>8);
  499.     
  500.      }
  501.     
  502. SaveWPROPage(BUF0xE000,1);
  503. XB_FM_RunSeek=0;
  504. XB_MENULayer[0]=10;
  505. XB_FM_MEM=0;
  506. fmGetMemChannelISP();
  507. #if(S_CS42L51)
  508.      I2CMixOn();
  509. #endif
  510. #if(S_SupportAudioADC)
  511. CodeI2C_CS_LOW;
  512. #endif
  513. }
  514. }
  515. }
  516. CBYTE T_FMAutoScan1[]=
  517. {
  518. 'A','u','t','o',' ','S','c','a','n','?',0
  519. };
  520. CBYTE T_FMAutoScan2[]=
  521. {
  522. 'Y','E','S','=','M','E','N','U',0
  523. };
  524. void EnableFMAutoScan(void)
  525. {
  526. lcmClearLCM();
  527. LCM_xp=0;
  528.     LCM_yp=0;
  529.     GUI_ShowSmallString((XBYTE*)(T_FMAutoScan1));
  530. LCM_xp=0;
  531.     LCM_yp=1;
  532.     GUI_ShowSmallString((XBYTE*)(T_FMAutoScan2));
  533. XB_MENULayer[0]=10;
  534. gxLevelHoldCnt=0;
  535. M_SetFMAutoScan;
  536. M_SetStopKeyFunction;
  537. }
  538. void FMProcedure(void)
  539. {
  540. if(!gbFMMode)
  541. {
  542. #if(S_SupportAudioADC)
  543. CodeI2C_CS_HIGH;
  544. delayclk(250);
  545. delayclk(250);
  546. delayclk(250);
  547. delayclk(250);
  548. delayclk(250);
  549. PB_DAC[DAC_PowerCtrl]=0x0c;
  550. #endif
  551.         Process_STOP();
  552.         XB_MENULayer[0]=10;  //GOTO FM MODE
  553.         SET_PLAYMODE(C_FMMode);
  554.         XB_NoFile=0;
  555.         //i2cInitialCS42L51ISP(2);
  556.         
  557.         InitFMISP();
  558. #if(S_SupportAudioADC)
  559. WRITE_DSPIO(0x44,C_ADCDefultSetting); //(G)defult setting, loop back always enable for DSP code "RECFILE" in audio ADC case
  560. gxibTempIntegerByte.INTEGER=0x8000; //(G)use 24.576MHz, sampling rate 32k for DSP code "RECFILE"
  561. SwitchPLL();
  562.     InitDSPType(RECFILE);
  563. SWITCH_CLK(PLLCLK+DIV2+WAITS);
  564.     Enable_DSP();
  565.         
  566.         PB_DAC[DAC_SamplingRate]=SR_32K;
  567.         PB_DAC[DAC_PowerCtrl]=0x0d;
  568.     
  569. M_ClrEnableRampUpVolume;
  570. gx10P10mSCnt1=0;        
  571. M_AudioADCPowerOn;
  572.         
  573. #endif
  574.     }
  575.     else
  576.      GotoMainPorg();
  577. }
  578. #endif //yu5