Matthew Harrell wrote:
> I have one of the 7260 boards and use my own build from the linux-2.6.21-ts
> source tree. I have the RS-485 option on my board which, according to the
> docs, should put it on ttyAM1. According to the manuals (ts-7260-manual
> section 5.5 and arm-linux-ts72xx section 6.3) it looks like I need to do
> something like
>
> #include <asm/ioctls.h>
> #include <sys/ioctl.h>
>
> #define TIOC_SBCC485 _IOW('T',0x70,int) /*TS RTS/485 mode Clear*/
> #define TIOC_SBCS485 _IOW('T',0x71, int) /*TS RTS/485 mode Set */
^^^
You have to pass an int, not a char
>
> // open socket above here
>
> char mcr = 5;
int mcr = 5;
Regards,
Chris
>
> if ( -1 == ioctl ( _sock, TIOC_SBCS485, &mcr ) )
> cerr << "ioctl: " << strerror ( errno ) << " (" << errno << ")" << endl;
>
> to get a half-duplex RS485 at 19200 baud. When I try this, though, I get
> the error
>
> ioctl: Invalid argument (22)
>
> What am I doing wrong here?
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|