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]
Other format: [Raw text]

Re: Memory Mapped Peripherals


"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


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