Mapping IO Registers With Union And Structs

Memory Mapped I/O is a technique that allows to use the same address space to address both memory and I/O devices. The memory and registers of the I/O devices are mapped to address values, so when an address is accessed by the CPU, it may refer to a portion of physical RAM, but it can also refer to memory of the I/O device. Thus, the CPU instructions used to access the memory can also be used for accessing devices.

Read More