[ECOS] Problem about writing IO device driver

HuangQiang jameshq@liverpool.ac.uk
Tue Jan 8 07:13:00 GMT 2002

Thanks Jifl:
   But one memory mapped IO device driver has many register need to be
written to or read from? So each time I can call the cyg_io_read() or
cyg_io_write()  to write or read different register in one memory mapped io

Best regards

-----Original Message-----
From: jlarmour@cambridge.redhat.com [mailto:jlarmour@cambridge.redhat.com]On
Behalf Of Jonathan Larmour
Sent: 08 January 2002 15:08
To: HuangQiang
Cc: eCos
Subject: Re: [ECOS] Problem about writing IO device driver

HuangQiang wrote:
> Hi all:
>    I am trying to write a device (logical) driver for memory mapped IO
> device for ARM E7T board. I have a question:
> I develope the logical device driver for memory mapped io device follow
> way doing serial device driver.
> calling procedure is:
> 1. install the IO function: DEVIO_TABLE(...)
> 2. write the logical device driver function: read(), write(),
> get_config()
> 3. in read(), write(), set_config(), get_config() call the hardware
> to manipulate the hardware
> one problem is that: I need to pass the register address into the
> application (call cyg_io_read(), cyg_io_write()) as reading or writing to
> the memory mapped io device. but cyg_io_read(), cyg_io_write() can't
> this extra parameter. So any way doing this? Or maybe I went into the
> way. Thanks for any help.

You should associate the register address with the handle of each device,
the handle in turn corresponding to the DEVTAB_ENTRY.

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

More information about the Ecos-discuss mailing list