Fix my C program - SPI transfer between Raspberry Pi 400 and EEPROM

Job ID: 33254943

Budget: ₹1,500 – ₹12,500 INR

I have downloaded a few sample C codes to transfer data between my Raspberry Pi 400, and W25Q64FV SPI EEPROM. One program is of ioctl, and another using pigpio library.

But none of them are working. I can see the data being transmitted from the Raspberry for Write, but I can't understand how to read.

I would prefer fixing the ioctl program.

I am attaching all files for reference, including the datasheet.

I wan to able be able to send instructions to the EEPROM, and read the results. For e.g., device id.