Back in the old days of C, you can use array subtypes for address storage in very useful ways. For example, you can declare an array as such.
This array represents an EEPROM image with 8-bit words.
BYTE eepromImage[1024] = { ... };
And later refer to this array as if it were really multi-dimensional storage
BYTE mpuImage[2][512] = eepromImage;
I am sure that my syntax is incorrect, but I hope you understand this idea.
In any case, this projected a two-dimensional image of what is actually a one-dimensional storage.
The two-dimensional projection is an EEPROM image when loaded into the MPU memory with 16-bit words.
In C, you can reference multidimensional memory and change storage values, and changed values will be displayed in real (one-dimensional) storage almost in the same way as by magic.
Is it possible to do this with C #?
Our current solution uses multiple arrays and event handlers to synchronize the situation. Such works, but this is an additional complexity that we would like to avoid if there is a better way.
source
share