u-boot-serial

1. 串口定时

        ts = get_timer(0);                                                         
        do {                                                                       
                printf(" 11\n");                                                
                udelay(10000);                                                                                                 
        } while(get_timer(ts)<1000);

这个函数就是延迟1000ms,加个延迟,这样就是大概循环 1000ms/10ms=100,测试打印九十几次。

2. 库连接

在autoboot.c中调用xx文件的函数,把xx的规则卸载autoboot的规则之前,就可以了。
在xx文件的函数不要写成static类型。

obj-y += ipc-lib/dev/xx.o                                                                                                                          
obj-$(CONFIG_AUTOBOOT) += autoboot.o  
发布了112 篇原创文章 · 获赞 7 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/chengbeng1745/article/details/100145334