[En-Nut-Discussion] reclaiming PE0 and PE1 from uart0

Ole Reinhardt ole.reinhardt at kernelconcepts.de
Tue Nov 15 10:21:26 CET 2005


Hello,

> Can someone tell me what i need to do to disable uart0 so i can use PE0 
> and PE1 in the expansion port?  i've tried just not registering, here's 
> the code i commented out:
> 
>   /* Register and assign stdout to UART0 */
>  // NutRegisterDevice(&devUart0, 0, 0);
>  // freopen("uart0", "w", stdout);
>  // _ioctl(_fileno(stdout), UART_SETSPEED, &baud);
> 
> but this makes the ethernut hang.
> is this because i need to redirect stdout?

You don't need to redirect stdout, but you may not use it after 
commenting out the code at all. AFAIK there just was the discussion to 
create a NULL device to redirect stdout for debugging purpose.

If you don't register any UART device and correctly set the direction 
registers you may use these two pins for you own purpose.

Best regards,

Ole Reinhardt



-- 
kernel concepts    Tel: +49-271-771091-14
Dreisbachstr. 24   Fax: +49-271-771091-19
D-57250 Netphen    E+ : +49-177-7420433
--



More information about the En-Nut-Discussion mailing list