What real platforms map hardware ports to memory addresses?

后端 未结 8 982
孤街浪徒
孤街浪徒 2021-02-03 12:47

I sometimes see statements that on some platforms the following C or C++ code:

int* ptr;
*ptr = 0;

can result in writing to a hardware input-ou

8条回答
  •  无人及你
    2021-02-03 13:24

    It is mostly used when writing drivers, since most peripheral devices communicate with the main CPU through memory mapped registers.

提交回复
热议问题