Merge pull request #376 from rarengifoArthrex/master

pass along reset parameters to provide control to the caller
This commit is contained in:
Gwenhael Goavec-Merou 2023-09-11 06:14:08 +02:00 committed by GitHub
commit 2c23e8a3b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -137,9 +137,9 @@ using namespace std;
#define PUBKEY_LENGTH_BYTES 64 /* length of the public key (MachXO3D) in bytes */
Lattice::Lattice(Jtag *jtag, const string filename, const string &file_type,
Device::prog_type_t prg_type, std::string flash_sector, bool verify, int8_t verbose):
Device::prog_type_t prg_type, std::string flash_sector, bool verify, int8_t verbose, bool skip_load_bridge, bool skip_reset):
Device(jtag, filename, file_type, verify, verbose),
SPIInterface(filename, verbose, 0, verify),
SPIInterface(filename, verbose, 0, verify, skip_load_bridge, skip_reset),
_fpga_family(UNKNOWN_FAMILY), _flash_sector(LATTICE_FLASH_UNDEFINED)
{
if (prg_type == Device::RD_FLASH) {

View File

@ -22,7 +22,7 @@ class Lattice: public Device, SPIInterface {
public:
Lattice(Jtag *jtag, std::string filename, const std::string &file_type,
Device::prog_type_t prg_type, std::string flash_sector, bool verify,
int8_t verbose);
int8_t verbose, bool skip_load_bridge, bool skip_reset);
uint32_t idCode() override;
int userCode();
void reset() override {}

View File

@ -567,7 +567,7 @@ int main(int argc, char **argv)
args.prg_type, args.external_flash, args.verify, args.verbose);
} else if (fab == "lattice") {
fpga = new Lattice(jtag, args.bit_file, args.file_type,
args.prg_type, args.flash_sector, args.verify, args.verbose);
args.prg_type, args.flash_sector, args.verify, args.verbose, args.skip_load_bridge, args.skip_reset);
} else if (fab == "colognechip") {
fpga = new CologneChip(jtag, args.bit_file, args.file_type,
args.prg_type, args.board, args.cable, args.verify, args.verbose);