我是在例程的基础上,在进行了简单的扩展,完整代码如下,但是编译出现如下错误
"sw8.c", line 24: warning: nested comment is not allowed
"sw8.c", line 200: error: declaration may not appear after executable statement in block  // 查了下,是说在可执行语句前,变量声明应该在函数的前面,但是
我的声明全部在main()前,应该不会出错啊?不知道这个错误到底是指什么??
"sw8.c", line 200: error: expected a "}"// 括号的数量是对的,但还显示缺括号??
"sw8.c", line 286: error: declaration may not appear after executable statement in block
"sw8.c", line 287: error: expected a ";" //找不出哪里缺分号??
"sw8.c", line 330: warning: nested comment is not allowed
At end of source: warning: parsing restarts here after previous syntax error
At end of source: error: expected a "}"
At end of source: warning: missing return statement at end of non-void function "SW_detect"
At end of source: error: expected a "}"
/*函数声明*/
void LCD1602_initial(void);
void wr_lcd(unsigned char dat_comm, unsigned int content);
void Delay(unsigned int nDelay);
void delaynum(unsigned int d_time);
int SW_detect(void);
void LED_light(int m);
void LCD1602_fp_display(void);
void delay(unsigned int d_time);
void LCD1602_ap_display(void);
/*锁相环的设置*/
PLL_Config  myConfig      = {
  0,                   //IAI: the PLL locks using the same process that was underway
                      //before the idle mode was entered
  1,                 //IOB: If the PLL indicates a break in the phase lock,
                    //it switches to its bypass mode and restarts the PLL phase-locking
                   //sequence
  12,             //PLL multiply value; multiply 12 times
  2              //Divide by 2 PLL divide value; it can be either PLL divide value
                //(when PLL is enabled), or Bypass-mode divide value
               //(PLL in bypass mode, if PLL multiply value is set to 1)
};
/*SDRAM的EMIF设置*/
EMIF_Config emiffig = {
  0x221,            //EGCR  : the MEMFREQ = 00,the clock for the memory is equal to cpu frequence
                                  //                  the WPE = 0 ,forbiden the writing posting when we debug the EMIF
                                  //        the MEMCEN = 1,the memory clock is reflected on the CLKMEM pin
                          //        the NOHOLD = 1,HOLD requests are not recognized by the EMIF
  0xFFFF,        //EMI_RST: any write to this register resets the EMIF state machine
  0x1fff,        //CE3_1:  CE0 space control register 1
  0x00ff,        //CE3_2:  CE0 space control register 2
  0x00ff,        //CE3_3:  CE0 space control register 3
  0x1fff,        //CE1_1:  CE0 space control register 1
            //        Asynchronous, 16Bit
  0x00ff,        //CE1_2:  CE0 space control register 2
  0x00ff,        //CE1_3:  CE0 space control register 3
/******************************************************************************\
* End of lcd.c
\******************************************************************************/