This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Memory Mapped Peripherals
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Michele Portolan" <michele dot Portolan at imag dot fr>
- Cc: <ecos-discuss at sources dot redhat dot com>
- Date: 10 May 2004 17:50:16 +0100
- Subject: Re: [ECOS] Memory Mapped Peripherals
- References: <00d501c436ac$1a0c3920$8681ab93@TIMAQLF129>
"Michele Portolan" <michele.Portolan@imag.fr> writes:
> Does eCos supports memory mapped devices?
> If yes, can anyone give me some hints on how to structure a device driver
> (ex: how to assign a given memory space to my device) ?
You don't need to do anything. If the device is memory mapped then you
can just access the device registers in memory with conventional
memory reads and writes.
I would reccommend using HAL_READ_UINT32() and its friends in hal_io.h
since these macros ensure that the correct size accesses are done, and
prevent the compiler reordering them.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss