tried to set non standard baud rate using tty calls.
Code snipped as fallows.
baudrate=5;
ret=ioctl(fd, TIOCGSERIAL, &serial_info);
if(ret!=0)
{
perror("custom baud rate get");
}
serial_info.flags &= ~ASYNC_SPD_MASK;
serial_info.flags |= ASYNC_SPD_CUST;
serial_info.custom_divisor=serial_info.baud_base / baudrate;
ret=ioctl(fd, TIOCSSERIAL,&serial_info);
if(ret!=0)
{
perror("custom baud rate set:");
}
This code compiles well but gives error as
"Custom baud rate set: invalid argument" in run time.
Is there any thing wrong in this code?
Any one worked on MPC52XX, PSC controller provided by Freescale?
Does this serial driver (mpc52xx) supports custom baud rates?
Even the following code also giving me the same error. (This will just get
the options and set the same options with out modifying)
ret=ioctl(fd, TIOCGSERIAL, &serial_info);
ret=ioctl(fd, TIOCSSERIAL,&serial_info);
Thanks and Regards,
Venu ,
DISCLAIMER:
This message (including attachment if any) is confidential and may be
privileged. Before opening attachments please check them for viruses and
defects. MindTree Consulting Limited (MindTree) will not be responsible for any
viruses or defects or any forwarded attachments emanating either from within
MindTree or outside. If you have received this message by mistake please notify
the sender by return e-mail and delete this message from your system. Any
unauthorized use or dissemination of this message in whole or in part is
strictly prohibited.Please note that e-mails are susceptible to change and
MindTree shall not be liable for any improper, untimely or incomplete
transmission.
E-mail may contain viruses. Before opening attachments please check them for
viruses and defects. While MindTree Consulting Limited (MindTree) has put in
place checks to minimize the risks, MindTree will not be responsible for any
viruses or defects or any forwarded attachments emanating either from within
MindTree or outside.
<<image001.gif>>
_______________________________________________ Linuxppc-embedded mailing list [email protected] https://ozlabs.org/mailman/listinfo/linuxppc-embedded
