void main(void) [
unsigned char i,j;
CSL_init();
GPIO_Handle hGpio;
GPIO_Config config;
hGpio = GPIO_open(0x0000FFFF,GPIO_OPEN_RESET);
config.gpen = 0x0000FFFF; //gpen
config.gpdir = 0x0000FFFF; //gdir
config.gpval = 0x0000FFFF; //gpval
config.gpgc = 0x00000016;
GPIO_config(hGpio,&config);
j=253;
asm(" NOP ");
for(i=0;i<253;i++)
[
asm(" NOP ");
GPIO_pinWrite(hGpio,0x0000FFFF,1);
printf("Hello World!n");
GPIO_pinWrite(hGpio,0x0000FFFF,0);
asm(" NOP ");
j--;
]
asm(" NOP ");
asm(" NOP ");
asm(" NOP ");
]
刚刚看了下内存中关于gpio寄存器的值好像没有变,主函数我是这样写的,是不是哪里不对,请帮我看下,谢谢
void main(void) [
unsigned char i,j;
CSL_init();
GPIO_Handle hGpio;
GPIO_Config config;
hGpio = GPIO_open(0x0000FFFF,GPIO_OPEN_RESET);
config.gpen = 0x0000FFFF; //gpen
config.gpdir = 0x0000FFFF; //gdir
config.gpval = 0x0000FFFF; //gpval
config.gpgc = 0x00000016;
GPIO_config(hGpio,&config);
j=253;
asm(" NOP ");
for(i=0;i<253;i++)
[
asm(" NOP ");
GPIO_pinWrite(hGpio,0x0000FFFF,1);
printf("Hello World!n");
GPIO_pinWrite(hGpio,0x0000FFFF,0);
asm(" NOP ");
j--;
]
asm(" NOP ");
asm(" NOP ");
asm(" NOP ");
]
刚刚看了下内存中关于gpio寄存器的值好像没有变,主函数我是这样写的,是不是哪里不对,请帮我看下,谢谢
举报