Now that I read what you said, why would you that its not really needed?
I want to write a function that reads Len bytes from flash memory, and will store it in an local RAM variable.
The thing is that the function dont know what Len it will receive, If Len = 1, then the type of the Local Ram Variable will be char, but if Len = 2, then it would be int.
So i wanted to write a function like that:
void ReadFromFlash( int FlashAddress, int Len, void* Local_Ram_Variable);
The problem is that when I read the value from Flash, I cant perform:
*Local_Ram_Variable = value.
I cant also do casting to value because I dont know if its type is char or int or something else.
So how can i execute this function?