[En-Nut-Discussion] Baud on rs232

Ole Reinhardt ole.reinhardt at kernelconcepts.de
Tue Sep 7 13:36:04 CEST 2004


Hi,

> Is it possible to change the baud to the rs232 port on the board?
> How do I do this? 

You can do it like this (if you use an other UART driver (e.g.
devDebug/devUart) you'll do it the same way.

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

void main(void)
{

    FILE *uart;
    u_long baud = 115200; 
   // Initialize UART
    NutRegisterDevice(&devUsartAvr0, 0, 0);
    uart = fopen("uart0", "r+b");
    _ioctl(_fileno(uart), UART_SETSPEED, &baud);
    ...
}

Regards,

Ole Reinhardt


-- 
 _________________________________________________________________
|                                                                 |
| WWW.R-WEB.DE         Systementwicklung, Softwareentwicklung     |
|                                                                 |
| Ole Reinhardt                                                   |
| Luisenstraße 29      Tel. / Fax:        +49 (0)271  7420433     |
| 57076 Siegen         Mobil:             +49 (0)177  7420433     |
| Germany                              ole.reinhardt at r-web.de     |
|_________________________________________________________________|




More information about the En-Nut-Discussion mailing list