From c35f21a5be17e873ca5eca6894f12d1cffbaee68 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Sat, 4 Mar 2023 08:02:19 +0100 Subject: [PATCH] latticeBitParser: add SPI_MODE missing instruction (issue #324) --- src/latticeBitParser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/latticeBitParser.cpp b/src/latticeBitParser.cpp index b33a45e..3c33606 100644 --- a/src/latticeBitParser.cpp +++ b/src/latticeBitParser.cpp @@ -155,6 +155,7 @@ int LatticeBitParser::parse() #define LSC_PROG_CNTRL0 0x22 #define LSC_RESET_CRC 0x3B #define LSC_INIT_ADDRESS 0x46 +#define LSC_SPI_MODE 0x79 #define LSC_PROG_INCR_CMP 0xB8 #define LSC_PROG_INCR_RTI 0x82 #define VERIFY_ID 0xE2 @@ -200,6 +201,10 @@ bool LatticeBitParser::parseCfgData() case LSC_PROG_INCR_RTI: printError("Bitstream is not compressed- not writing."); return false; + case LSC_SPI_MODE: // optional: 0x79 + mode (fast-read:0x49, + // dual-spi:0x51, qspi:0x59) + 2 x 0x00 + pos += 3; + break; default: char mess[256]; snprintf(mess, 256, "Unknown command type %02x.\n", cmd);