uclinux下rc脚本下自启动打开串口程序出错!应用程序的打开串口语句为: fd=open("/dev/uart0",O_RDWR|O_NDELAY|O_NOCTTY);
if (fd>0)
{
printf("串口%d打开..............fd is %d\n",i,fd);
}
else
{
printf("Can't Open Serial Port!\n");
exit(0);
}
而uclinux运行起来以后,可以运行该打开串口程序,并可以读写串口。请教大家为什么?我该如何让程序在系统启动时,应用程序自启动?谢谢您!
Yes... Add your auto-open in the rc, which will be sourced when the os is booting.
An easy way is to format your work into an small application, which will be run when booting.