PaulStoffregen / LittleFS

73 stars 20 forks source link

Add GigaDevices GD25Q16C Support #47

Open welshcoder opened 2 years ago

welshcoder commented 2 years ago

Hi,

I thought you might be interested in this PR to add support for a GigaDevice GD25Q16C 2MByte flash chip. The library mostly works fine with the chip (I soldered it to the pads underneath the T4.1), but with one major difference to the Winbond (and other) devices. The command to update the status register to enable the quad mode is different. To deal with this, I've added another field to the chipinfo structure to accommodate a configurable quad mode command and data. Hopefully, it is apparent from the changes made to LittleFS_QSPIFlash::begin() how it works.

I don't have any of the Winbond chips, so I've not been able to test it with this PR, so I hope it's something you can test to make sure that existing functionality isn't broken.

I hope you find this proposal useful in extending the library further.

Cheers, welshcoder