Memory-Mapped Input/Output (MMIO)

Collaboration diagram for Memory-Mapped Input/Output (MMIO):

Modules

 Internal Register Definitions

Defines

#define AVR_MMIO_OFFSET   0x20
 Memory mapped register address offset.

Functions

static uint8_t mmio_read8 (const void *p)
 Read a byte from a memory-mapped register.

Detailed Description

These accessors are used to access memory-mapped I/O registers on the chip as well as external devices hooked up through the external bus interface. Accessing such registers usually have side-effects, so these accessors ensure that the registers are accessed exactly as many times as specified.

Traditionally, such registers are accessed through pointers declared as "volatile", but using dedicated accessors has a number of advantages:


Define Documentation

#define AVR_MMIO_OFFSET   0x20

Memory mapped register address offset.

Offset that needs to be added to an I/O space address to get the corresponding memory mapped address.

Definition at line 52 of file io.h.


Function Documentation

static uint8_t mmio_read8 ( const void *  p  )  [inline, static]

Read a byte from a memory-mapped register.

The compiler will optimise this to an I/O space access when applicable.

Parameters:
p A virtual address.
Returns:
The value at the virtual address specified by p.

Definition at line 67 of file io.h.

Generated on Thu Apr 29 14:10:35 2010 for xplain-bc by  doxygen 1.6.3