Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: Trying to understand the workings of a Memory Mapped I/O



>
> // (__R volatile unsigned char *)
>
> It is cast to a volatile pointer for some bad reason, and who knows what
__R is,
> because it is a user's macro.
>
> // *(..)
>
> Take the contents of the (nonsense) pointer.
>

Actually, since the description indicates that this is to allow access to
memory mapped I/O registers, this is a valid way to handle this(depending on
the definition of the __R macro).  Presumably, the register are located at
addresses 0 through 3 of the memory map.  The volatile qualifer is needed to
prevent the compiler from optimizing the access to the value to far.

Adam





<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.