This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Reg::input from keyboard


"Natarajan, Mekala (CTS)" wrote:
> 
> Hi,
>         i am using MBX starter kit with MPC860 50MHZ processor. This kit
> has two serial ports and keyboard interface too. I am using ecos latest cvs
> version.
> How do i use the serial port 2 for getting input or for diagnostic output.

Diagnostic output can go there by using the options in the MBX platform HAL
such as "Diagnostic serial port"
(CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL) and switching it from 0 to 1.

Input is something best done with a proper interrupt-driven serial driver.
If they are included in your configuration the port 2 driver is enabled by
going into the I/O serial configuration and enabling "HArdware serial
device drivers" (CYGPKG_IO_SERIAL_DEVICES) and selecting it under there.

You could then do I/O using the more native cyg_io_read/cyg_io_write
commands described in the documentation, or by using /dev/tty2 (probably)
with stdio for tty-like access.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]