有while(1)时 没有输出,把while(1)删掉,printf就好使,为什么
#include<csl.h>
#include<csl_pll.h>
#include<csl_chip.h>
#include<csl_gpio.h>
#include<stdio.h>
void delay()
{
Uint32 j = 0,k = 0;
for(j = 0;j<0x30;j++)
{
for(k= 0;k<0xffff;k++)
{}
}
}
PLL_Config My_Config = {
0,
1,
24,//pllmult
1 //div
};
void main(void)
{
CSL_init(); /* Init CSL */
PLL_config(&My_Config);
GPIO_RSET(IODIR,0XFF);//GPIO output
printf("hello!");
while(1)
{
GPIO_RSET(IODATA,0Xff);
delay();
GPIO_RSET(IODATA,0X00);// "1"
delay();
}
}
|