[En-Nut-Discussion] Re: RTS/CTS flow control

Thiago A. Corrêa thiago.correa at gmail.com
Thu Aug 17 22:39:53 CEST 2006


Hi Ole,

   Thanks for the tip, I didn't know about UART_HS_RTSCTS constant. I
haven't tested on the device yet, but I did a grep for it and the only
reference to it is in unix_devs.c :(
   I have some little hopes that it will work, but I will try anyway.

C:\ethernut>grep -r UART_HS_RTSCTS *
nut/arch/unix/dev/unix_devs.c:            case UART_HS_RTSCTS:
nut/arch/unix/dev/unix_devs.c:                *lvp = UART_HS_RTSCTS;
nut/include/dev/uart.h:#define UART_HS_RTSCTS      0x0003

   Is it possible that the hardware you are using on btnut never actually
rely on these signals to function? I guess I will download btnut cvs and
grep there as well. Maybe there is something different that could be of help
:)

Kind Regards,
   Thiago A. Corrêa

On 8/16/06, Ole Reinhardt <ole.reinhardt at kernelconcepts.de> wrote:
>
> > Hi,
>
> >    thank you so much for replying.
> >    I was feeling like being blantly ignored by now, even the patches I
> sent
> > are sitting still in the task tracker :(
>
> Ui, has anybody else yet used this feature :-)
>
> >    So I take it that you agree that the status function has a typo
> there?
>
> Seems to be strange, but I have not yet looked deep enough into the
> code.
>
> > serialPort = fopen( "uart0", "r+b" );
> > temp = USART_MF_RTSCONTROL | USART_MF_CTSSENSE;
> > _ioctl(_fileno(serialPort), UART_SETFLOWCONTROL, &temp);
>
> I would use:
>
> serialPort = fopen( "uart0", "r+b" );
> temp = UART_HS_RTSCTS;
> _ioctl(_fileno(serialPort), UART_SETFLOWCONTROL, &temp);
>
> >    Is that the right way of doing it?
> >    I looked over btnut cvs but I couldn't find where you where using the
> > serial port with rts/cts, in which of the samples is it?
>
> You find the uart initialisation in:
>
> btnut/btnode/bt/bt_hci_transport_uart.c
>
> Where the flowcontrol is set to BT_UART_INITIAL_FLOWCONTROL.
>
> #define BT_UART_INITIAL_FLOWCONTROL UART_HS_RTSCTS
>
> Bye,
>
> Ole Reinhardt
>
>
> --
> kernel concepts    Tel: +49-271-771091-14
> Dreisbachstr. 24   Fax: +49-271-771091-19
> D-57250 Netphen    E+ : +49-177-7420433
> --
>
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>



More information about the En-Nut-Discussion mailing list