- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All !
I used 2s60ES and build uclinux for my board . I wrote simple example relate with UART this is my code : struct termios options; fd=open("/dev/ttyS0",O_RDWR ); if(fd==-1) { printf("Cannot open ttyS0!!\n"); exit(0); } fcntl(fd,F_SETFL,0); tcgetattr(fd,&options); options.c_cflag |=(CLOCAL | CREAD); ...... ........ then I ran my example it CANNOT OPEN TTYS0 !!!! thanks for help !Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you enable nios uart driver in kernel config?
If you already run console or shell on the uart, you can't open it again. use stdin/out instead. Otherwise, try "cp /etc/motd /dev/ttyS0" .
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page