本帖最后由 qiumengjie 于 2013-6-5 12:57 编辑
uboot延时.doc
#if defined(CONFIG_BOOTDELAY) &&(CONFIG_BOOTDELAY >= 0) s= getenv ("bootdelay"); bootdelay= s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY; printf("### main_loop entered: bootdelay=%d\n\n", bootdelay); 更改为 #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY>= 0) s= getenv ("bootdelay"); printf("s is %s \n",s); printf("s is %c \n",s); printf("s is %d \n",s); printf("*s is %s \n",*s); printf("*s is %c \n",*s); printf("*s is %d \n",*s); printf("simple_strtol is %d\n",simple_strtol(s,NULL,10)); bootdelay= (s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY); printf("###main_loop entered: bootdelay=%d\n\n", bootdelay); 打印结果 s is <NULL> s is s is 0 *s is 熷馃?馃?馃?? |