electroRF
Member
Hi,
I have a question please.
My function receives a char* Pointer for DATA_LOCATION, and needs to pass a unsgined int* Pointer for the same DATA_LOCATION.
i.e.
Input: char *Data8;
Output: unsgined int *Data32;
I'm afraid to do the following conversion, due to alignment problem:
That is a problem since Data8 is aligned to 8-bit addresses, while Data32 should be aligned to 32-bit addresses.
How to overcome such problem?
Thank you
I have a question please.
My function receives a char* Pointer for DATA_LOCATION, and needs to pass a unsgined int* Pointer for the same DATA_LOCATION.
i.e.
Input: char *Data8;
Output: unsgined int *Data32;
I'm afraid to do the following conversion, due to alignment problem:
C:
Data32 = (unsigned int *) Data8;
That is a problem since Data8 is aligned to 8-bit addresses, while Data32 should be aligned to 32-bit addresses.
How to overcome such problem?
Thank you