RTEMS on QEMU with virtual serial device

Мороз Олег oleg.moroz at mcc.vniiem.ru
Wed Oct 1 12:42:57 UTC 2014


I think thats all that i've changed. But a can send it as patch if you 
can say me how do it.

On 01.10.2014 16:40, Sebastian Huber wrote:
> On 01/10/14 14:35, Мороз Олег wrote:
>>
>> I've solved my problem using code changes
>>
>> diff --git a/c/src/lib/libbsp/i386/shared/comm/uart.c
>> b/c/src/lib/libbsp/i386/shared/comm/uart.c
>>
>> index 3c4d42a..3552fe6 100644
>>
>> --- a/c/src/lib/libbsp/i386/shared/comm/uart.c
>>
>> +++ b/c/src/lib/libbsp/i386/shared/comm/uart.c
>>
>> @@ -568,12 +568,13 @@ BSP_uart_termios_read_com2(int uart)
>>
>> ssize_t
>>
>> BSP_uart_termios_write_com1(int minor, const char *buf, size_t len)
>>
>> {
>>
>> + if(len <= 0)
>>
>> + {
>>
>> + return 0;
>>
>> + }
>>
>> assert(buf != NULL);
>>
>> - if(len <= 0)
>>
>> - {
>>
>> - return 0;
>>
>> - }
>>
>> +
>>
>> /* If there TX buffer is busy - something is royally screwed up */
>>
>> assert((uread(BSP_UART_COM1, LSR) & THRE) != 0);
>>
>> @@ -602,13 +603,13 @@ BSP_uart_termios_write_com1(int minor, const 
>> char *buf,
>> size_t len)
>>
>> ssize_t
>>
>> BSP_uart_termios_write_com2(int minor, const char *buf, size_t len)
>>
>> {
>>
>> - assert(buf != NULL);
>>
>> +
>>
>> if(len <= 0)
>>
>> {
>>
>> return 0;
>>
>> }
>>
>> -
>>
>> + assert(buf != NULL);
>>
>> /* If there TX buffer is busy - something is royally screwed up */
>>
>> assert((uread(BSP_UART_COM2, LSR) & THRE) != 0);
>>
>>
>>
>>
>> Is it alright?
>
> Yes, this looks all right, can you please send a complete patch.
>




More information about the devel mailing list