Skip to content

Commit

Permalink
efinix: programJTAG return type void -> bool
Browse files Browse the repository at this point in the history
  • Loading branch information
trabucayre committed Jul 29, 2024
1 parent bba3d9f commit aed4f9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/efinix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/efinix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aed4f9a

Please sign in to comment.