On Thu, Apr 01, 2010 at 07:36:52PM +0200, Fabio Giovagnini wrote:
> Hi all,
> I have the following problem:
> I' have connected my SCIF1 port (of sh2a 7203) to  a MAX485, and the 
> TXEn/!RxEn to an I/O port.
> I had the idea to write a driver for proc FS to manage the TxEn/!RxEn line 
> and 
> using the ttySCx driver to send and receive data at 38400.
> But I need to wait the end of the last byte trasmission before to set low the 
> TxEn/!RxEn line.
> Now I'm doing it with a dilay time; but I was looking for a more elegent 
> solution

We use a pure user-level solution with 

        ioctl(fd, TIOCMBIS, TIOCM_RTS);
        /* wait some delay or rely on a CTS */
        write(fs, message, message_len);
        /* eventually wait for a message_len based delay*/
        tcdrain(fd);
        ioctl(fd, TIOCMBIC, TIOM_RTS);

Philippe

-- 
Philippe De Muyter  phdm at macqel dot be  Tel +32 27029044
Macq Electronique SA  rue de l'Aeronef 2  B-1140 Bruxelles  Fax +32 27029077
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to