This code is for SPI Flash Read/Write in ADSP-21569 Ez-Kit using Device driver. You can understand the working of the code from the comments embedded within.
Verify_flash_codes() will Verify Manufacturer ID and Device ID of Flash.
Erase_flash() will get number of sectors to erase the flash.
Write_flash() will choose between incremental data/ .Ldr data using #define INC according to the requirement and Write that data to flash.
Read_flash() will read the available data from flash.