[En-Nut-Discussion] UART-Polling
Timothy M. De Baillie
debaillie at ciholas.com
Mon May 18 17:34:51 CEST 2009
Change the read timeout.
UsartIOCtl(&DEV_UART, UART_SETREADTIMEOUT, &timeout);
It's not quite the same, but it will allow you to not block the code
completely.
Tim
Muhammad Yasir wrote:
> Why dont you better try for interrupts.As far as i know all such
> polling functions are blocking functions
>
> regards
> m.yasir
>
> On 18/05/2009, Martin Walda <Martin.Walda at sma.de> wrote:
>
>> Hello,
>>
>> I use an Ethernut 2.1 Rev B Board with an ATMega 128 controller.
>>
>> My question is, how can I poll data from the uart interface? I have tried
>> fread, fgets and _read. All these functions seems to wait for incomming
>> character's. I am searching for a non blocking function.
>>
>> Thank you very much
>>
>> Martin
>>
>>
>>
>>
>> ______________________________________________________________________________
>>
>> SMA Solar Technology AG
>> Aufsichtsrat: Dr. Erik Ehrentraut (Vorsitzender)
>> Vorstand: Guenther Cramer, Peter Drews, Pierre-Pascal Urbon, Reiner
>> Wettlaufer
>> Handelsregister: Amtsgericht Kassel HRB 3972
>> Sitz der Gesellschaft: 34266 Niestetal
>> USt-ID-Nr. DE 113 08 59 54
>> WEEE-Reg.-Nr. DE 95881150
>> ______________________________________________________________________________
>>
>> _______________________________________________
>> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>>
>>
>
>
>
More information about the En-Nut-Discussion
mailing list