public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] Runtime changing of serial port baud rate
@ 2001-05-22  1:29 rob.wj.jansen
  2001-05-22  6:00 ` Jonathan Larmour
  0 siblings, 1 reply; 4+ messages in thread
From: rob.wj.jansen @ 2001-05-22  1:29 UTC (permalink / raw)
  To: ecos-discuss

Stanley,

> Does eCos support runtime changing of serial port baud rate?
>
> Thanks
> Stanley

Yes, but only if you use the serial driver instead of the diagnostics I/O.
Look at the chapters 11 and 12 in the eCos Reference Manual.

Setting the baudrate involves some magic with the cyg_io_***_config functions:

    cyg_io_handle_t      ser_handle;
    cyg_io_serial_info_t ser_info;

    cyg_io_lookup("/dev/ser1", &ser_handle);
    cyg_io_get_config(ser_handle, CYG_IO_GET_CONFIG_SERIAL_INFO, &ser_info, sizeof(ser_info));

    ser_info.baud        = CYGNUM_SERIAL_BAUD_110;
    ser_info.word_length = CYGNUM_SERIAL_WORD_LENGTH_7;

    cyg_io_set_config(ser_handle, CYG_IO_SET_CONFIG_SERIAL_INFO, &ser_info, sizeof(ser_info));

You might want to add the obvious #include lines, checks for the error values returned and
maybe some other baudrate figures (but these ones enable you to use your old mechanical TTY ;-)

Cheers,

	Rob

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [ECOS] Runtime changing of serial port baud rate
@ 2001-05-21 22:57 Ho Shui Choy Stanley PS03B NCS
  0 siblings, 0 replies; 4+ messages in thread
From: Ho Shui Choy Stanley PS03B NCS @ 2001-05-21 22:57 UTC (permalink / raw)
  To: Ecos-Discuss (E-mail)

Does eCos support runtime changing of serial port baud rate?

Thanks
Stanley
> ____________________________
> This email (including all attachments) contains confidential information
> which may be privileged. It is intended solely for the identified
> recipient(s) to whom it is addressed. If you are not an intended
> recipient, please reply to us immediately and delete this message from
> your system. You may not copy or use it for any purpose, or otherwise
> disclose its contents to any person. 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-05-22  6:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-22  1:29 [ECOS] Runtime changing of serial port baud rate rob.wj.jansen
2001-05-22  6:00 ` Jonathan Larmour
2001-05-22  6:13   ` Jesper Skov
  -- strict thread matches above, loose matches on Subject: below --
2001-05-21 22:57 Ho Shui Choy Stanley PS03B NCS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).