[En-Nut-Discussion] Usart Receiver Pause?

Harald Kipp harald.kipp at egnite.de
Fri Jun 10 20:25:48 CEST 2005


I forgot to add

...in case of later enhancements for additional control lines.

Harald

At 20:23 10.06.2005 +0200, you wrote:
>Matthias,
>
>This would be generally useful.
>
>How about
>
>   u_long flags = UART_MF_RTSOFF;
>   ioctl(fd, UART_SETMODEMCONTROL, &flags);
>   flags = UART_MF_RTSON;
>   ioctl(fd, UART_SETMODEMCONTROL, &flags);
>
>or alternatively
>
>   u_long flags;
>   ioctl(fd, UART_GETMODEMCONTROL, &flags);
>   flags &= ~UART_MF_RTS;
>   ioctl(fd, UART_SETMODEMCONTROL, &flags);
>   flags |= UART_MF_RTS;
>   ioctl(fd, UART_SETMODEMCONTROL, &flags);
>
>In opposite to UART_SETRTS this would simplify the
>hardware independent layer, because only one ioctl
>code needs to be checked and passed to the hardware
>dependent layer.
>
>Harald
>
>At 19:53 10.06.2005 +0200, you wrote:
>>Hi
>>  I need to block IRQs for longer than the HW buffer of the AVR
>>USARTS can
>>  handle but cannot tolerate loosing bytes on the USARTS, too.
>>
>>  To solve this, I'd like to programmatically set the RTS line.
>>  Should I do this in my app only or add it to the USART drivers?
>>
>>  I guess, I could add an IOCTRLs UART_SETRTS and UART_GETRTS
>>  and add some code to usartavr.c and usart.c ?
>>
>>Comments ?
>>
>>  Matthias
>
>_______________________________________________
>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