Dumb question of the day, about pointers | Cypress Semiconductor
Dumb question of the day, about pointers
In my isr_1.c file, I wish (for various reasons) to assign a pointer to a specific spot in the SRAM.
What I'm doing is calculating an index (based on the number of times I've entered the ISR) and adding that to a static base address, as in:
foo = 0x20000000 + offset;
The complier issues a warning, stating that I'm creating a pointer from an int without a cast.
Is there a more "elegant" or "kosher" way to do this? I am intentionally putting things into this portion of SRAM in order to avoid conflicting with anything related to program execution.
Your thoughts are appreciated, thanks.