efinix: programJTAG return type void -> bool
This commit is contained in:
parent
bba3d9f3fb
commit
aed4f9a263
|
|
@ -292,7 +292,7 @@ bool Efinix::programSPI(unsigned int offset, const uint8_t *data,
|
||||||
#define ENTERUSER 0x07
|
#define ENTERUSER 0x07
|
||||||
#define USER1 0x08
|
#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;
|
int xfer_len = 512;
|
||||||
Jtag::tapState_t tx_end;
|
Jtag::tapState_t tx_end;
|
||||||
|
|
@ -352,6 +352,7 @@ void Efinix::programJTAG(const uint8_t *data, const int length)
|
||||||
_jtag->shiftDR(NULL, idc, 4);
|
_jtag->shiftDR(NULL, idc, 4);
|
||||||
printf("%02x%02x%02x%02x\n",
|
printf("%02x%02x%02x%02x\n",
|
||||||
idc[0], idc[1], idc[2], idc[3]);
|
idc[0], idc[1], idc[2], idc[3]);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Efinix::post_flash_access()
|
bool Efinix::post_flash_access()
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ class Efinix: public Device, SPIInterface {
|
||||||
void init_common(const Device::prog_type_t &prg_type);
|
void init_common(const Device::prog_type_t &prg_type);
|
||||||
bool programSPI(unsigned int offset, const uint8_t *data,
|
bool programSPI(unsigned int offset, const uint8_t *data,
|
||||||
const int length, const bool unprotect_flash);
|
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 post_flash_access() override;
|
||||||
bool prepare_flash_access() override;
|
bool prepare_flash_access() override;
|
||||||
FtdiSpi *_spi;
|
FtdiSpi *_spi;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue