Skip to content

Commit

Permalink
gowin: added detect_flash/erase_flash for gw2a FPGAs
Browse files Browse the repository at this point in the history
  • Loading branch information
trabucayre committed Jul 30, 2024
1 parent a7cb7ec commit 768c6ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gowin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class Gowin: public Device, SPIInterface {

/* spi interface */
bool detect_flash() override {
if (is_gw5a)
if (is_gw5a || is_gw2a)
return SPIInterface::detect_flash();
printError("protect flash not supported"); return false;}
printError("detect flash not supported"); return false;}
bool protect_flash(uint32_t len) override {
(void) len;
printError("protect flash not supported"); return false;}
Expand All @@ -41,7 +41,7 @@ class Gowin: public Device, SPIInterface {
return SPIInterface::unprotect_flash();
printError("unprotect flash not supported"); return false;}
bool bulk_erase_flash() override {
if (is_gw5a)
if (is_gw5a || is_gw2a)
return SPIInterface::bulk_erase_flash();
printError("bulk erase flash not supported"); return false;}
bool dumpFlash(uint32_t base_addr, uint32_t len) override;
Expand Down

0 comments on commit 768c6ef

Please sign in to comment.