From aed4f9a263b01b99164fb1c0ea3177790715b9e4 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Mon, 29 Jul 2024 07:50:39 +0200 Subject: [PATCH] efinix: programJTAG return type void -> bool --- src/efinix.cpp | 3 ++- src/efinix.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/efinix.cpp b/src/efinix.cpp index 83258a53f..aa935c0ae 100644 --- a/src/efinix.cpp +++ b/src/efinix.cpp @@ -292,7 +292,7 @@ bool Efinix::programSPI(unsigned int offset, const uint8_t *data, #define ENTERUSER 0x07 #define USER1 0x08 -void Efinix::programJTAG(const uint8_t *data, const int length) +bool Efinix::programJTAG(const uint8_t *data, const int length) { int xfer_len = 512; Jtag::tapState_t tx_end; @@ -352,6 +352,7 @@ void Efinix::programJTAG(const uint8_t *data, const int length) _jtag->shiftDR(NULL, idc, 4); printf("%02x%02x%02x%02x\n", idc[0], idc[1], idc[2], idc[3]); + return true; } bool Efinix::post_flash_access() diff --git a/src/efinix.hpp b/src/efinix.hpp index cdc65b6c5..fda738410 100644 --- a/src/efinix.hpp +++ b/src/efinix.hpp @@ -57,7 +57,7 @@ class Efinix: public Device, SPIInterface { void init_common(const Device::prog_type_t &prg_type); bool programSPI(unsigned int offset, const uint8_t *data, const int length, const bool unprotect_flash); - void programJTAG(const uint8_t *data, const int length); + bool programJTAG(const uint8_t *data, const int length); bool post_flash_access() override; bool prepare_flash_access() override; FtdiSpi *_spi;