[En-Nut-Discussion] reclaiming PE0 and PE1 from uart0
Peter Gaskell
pgaskell at darkwing.uoregon.edu
Wed Nov 16 01:15:10 CET 2005
I've discovered i DO need to redirect the stdout from the uart, as the
ethernut hangs if there is no
freopen("uart0", "w", stdout);
or if that uart device was not registered.
NutRegisterDevice(&devUart0, 0, 0);
so i added the nut/dev/null from the cvs, but i am using Nut/OS 3.4.2
stable
and I get
../ethernut/nut/dev/null.c:163: warning: initialization from
incompatible pointer type
../ethernut/nut/dev/null.c:164: warning: initialization from
incompatible pointer type
when i try to compile the code with the null device.
all i am trying to do is reclaim the io pins PE0 and PE1 (really just
PE1)
i've set the ddr register, and all that seams to stand in my way is
this hanging when the stdout is undefined or the uart0 is not
registered. Is there somewhere else i can send the stdout without
adding /dev/null.c? if not what do i need to change in null.c to make
it work with my version?
cheers,
peter
On Nov 15, 2005, at 10:02 AM, Matthias Ringwald wrote:
>
> On 15.11.2005, at 10:21, Ole Reinhardt wrote:
>
>> AFAIK there just was the discussion to create a NULL device to
>> redirect stdout for debugging purpose.
>
> It was me... I've added a null device devNull to CVS ( nut/dev/null.c
> :) in June.
> Honestly, I never really tested it, nevertheless it should work, if
> not, there cannot be
> too much bugs in there.. check its code.
>
> using the null device, you can write and read as much data from
> stdout/stdin as you like...
> just like linux's /dev/null.
>
> regards,
> 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