3 ms·
2. Direct memory mapped hardware access. For example: device drivers, kernel, embedded systems, microcontrollers. Of course doing this usually means your code
by numeromancer 13y ago
2. Direct memory mapped hardware access. For example: device drivers, kernel, embedded systems, microcontrollers.
Of course doing this usually means your code isn't portable, sometimes not even to other versions of the same compiler. I often wish C had a defined order for bitfields, for example.
One of the things I do to help debug & test embedded code is to factor out code which isn't dependent on the hardware platform (eg communication protocols) into a library, and compile it for, and write test programs to test them on, the host. So even embedded code is often best written to be as portable as possible.