<div dir="ltr">Wendell, I'm using the Gaisler BSP for leon3. I understand, the thing is that I'll be unable to use the console. My SOC has four APBUART, I need to use one like a console and the other three in raw mode, I wasn't very clear in the previous email (sorry!). </div>
<div class="gmail_extra"><br clear="all"><div><b>Ing. Nicolás Alvarez</b><div><b><br></b><div>cel: 03548-15638454</div><div><span style="color:rgb(85,85,85);font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif;font-size:13px;line-height:15px;background-color:rgb(255,255,255)"><a href="http://ar.linkedin.com/in/ingalvarez/en" target="_blank">http://ar.linkedin.com/in/ingalvarez/en</a><br>
</span></div></div></div>
<br><br><div class="gmail_quote">On Mon, Dec 23, 2013 at 3:40 PM, Wendell Silva <span dir="ltr"><<a href="mailto:silvawp@gmail.com" target="_blank">silvawp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">What BSP are we taking about?<div>I've used the configuration bellow to get a "raw mode" in my customized pc386 BSP:</div><div>Well, the right way... The code bellow has proved good enough to my needs. <br>
</div><div>I guess the only way to avoid this is to implement your own driver (based on UART driver) and not register it a termios pseudo-driver for it, but you will need to consider ring-buffers, multi-task access, etc.</div>
<div><br></div><div>Does someone have can add comments?</div><div><br></div><div><br></div><div>---BEGIN--- [ the control flow (if... else...) was removed for sake of simplicity) ]-----</div>
<div><br></div><div><div><font face="courier new, monospace"><div>#include <fcntl.h></div><div>#include <termios.h></div><div>#include <unistd.h></div><div><br></div></font></div><div><font face="courier new, monospace">struct termios opt;</font></div>
<div><font face="courier new, monospace">int fd = open("/dev/serial0", O_RDWR | O_NOCTTY);</font></div><div><font face="courier new, monospace">tcgetattr(fd, &opt)</font></div><div><font face="courier new, monospace">cfsetispeed(&opt, B115200);<br>
</font></div><div><font face="courier new, monospace">cfsetospeed(&opt, B115200);</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">/*</font></div><div><font face="courier new, monospace"> * Set options for raw-mode (binary) data transfer over serial</font></div>
<div><font face="courier new, monospace"> */</font></div><div><span style="font-family:'courier new',monospace">opt.c_iflag &= ~(IGNBRK | BRKINT | PARMRK |</span><br></div><div><font face="courier new, monospace"> ISTRIP | INLCR | IGNCR |</font></div>
<div><font face="courier new, monospace"> ICRNL | IXON);</font></div><div><font face="courier new, monospace">opt.c_oflag &= ~OPOST;</font></div><div><font face="courier new, monospace">opt.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);</font></div>
<div><font face="courier new, monospace">opt.c_cflag &= ~(CSIZE | PARENB);</font></div><div><font face="courier new, monospace">opt.c_cflag |= CS8;</font></div><div><font face="courier new, monospace"><br></font></div>
<div><font face="courier new, monospace">tcsetattr(fd, TCSANOW, &opt);</font></div><div><br></div><div>---END---</div><div><br></div></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/12/23 Nicolás Alvarez <span dir="ltr"><<a href="mailto:nicoalar.22@gmail.com" target="_blank">nicoalar.22@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<div dir="ltr">Hi all,<div><br></div><div>I'm trying to use the raw uart driver interface, but it looks like that the bsp is initializing the console driver. How can I avoid this? I have read that someone use the console driver in "raw mode", is it the right way?</div>
<div><br></div><div>Regards,</div><div><br></div><div><div><b>Ing. Nicolás Alvarez</b><div><div><span style="line-height:15px;color:rgb(85,85,85);font-size:13px;font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif"><br>
</span></div></div></div>
</div></div>
<br></div></div>_______________________________________________<br>
rtems-users mailing list<br>
<a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>