In the file m25p16.c found in the Power_On_Self_test SHARC example (part where the spi_flash is tested), we see a lot of functions take "ulAddr" but don't seem to use this argument. For example, the ResetFlash, EraseFlash, GetFlashStartAddress, and GetCodes require ulAddr, but do not actually use this variable. Why is this variable even used? Is it for compatibility with other Flash libraries that do use this?
We have structures in memory like this:
typedef struct tagMYSTRUCT
static MYSTRUCT Settings;
Settings.Hello = 1;
Settings.Goodbye = 2;
We want to be able to save, and later recall the contents of structures like this to Flash memory.
How would that be done using m25p16_Write or what precursor function would be needed to prepare a buffer from our structure, for use with m25p16_Write?
Also, by the way, in m25p16_Write, the actual data byte written to memory is not written with Most Significant Bit First, as all others are. Is there some reason for this? While looking at the decode on a scope, it just looks strange...