ftdispi: lowlevel init/MPSSE configuration before pins manipulation (issue #519)
This commit is contained in:
parent
fbee81b1d0
commit
989c8f8ccb
|
|
@ -74,11 +74,12 @@ FtdiSpi::FtdiSpi(int vid, int pid, unsigned char interface, uint32_t clkHZ,
|
||||||
(void)pid;
|
(void)pid;
|
||||||
(void)vid;
|
(void)vid;
|
||||||
(void)interface;
|
(void)interface;
|
||||||
|
|
||||||
|
init(1, 0x00, BITMODE_MPSSE);
|
||||||
|
|
||||||
setMode(0);
|
setMode(0);
|
||||||
setCSmode(SPI_CS_AUTO);
|
setCSmode(SPI_CS_AUTO);
|
||||||
setEndianness(SPI_MSB_FIRST);
|
setEndianness(SPI_MSB_FIRST);
|
||||||
|
|
||||||
init(1, 0x00, BITMODE_MPSSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FtdiSpi::FtdiSpi(const cable_t &cable,
|
FtdiSpi::FtdiSpi(const cable_t &cable,
|
||||||
|
|
@ -96,6 +97,8 @@ FtdiSpi::FtdiSpi(const cable_t &cable,
|
||||||
if (spi_config.wpn_pin)
|
if (spi_config.wpn_pin)
|
||||||
_wpn = spi_config.wpn_pin;
|
_wpn = spi_config.wpn_pin;
|
||||||
|
|
||||||
|
init(1, _cs_bits, BITMODE_MPSSE);
|
||||||
|
|
||||||
/* clk is fixed by MPSSE engine
|
/* clk is fixed by MPSSE engine
|
||||||
* but CS, holdn, wpn are free -> update bits direction
|
* but CS, holdn, wpn are free -> update bits direction
|
||||||
*/
|
*/
|
||||||
|
|
@ -106,7 +109,6 @@ FtdiSpi::FtdiSpi(const cable_t &cable,
|
||||||
setCSmode(SPI_CS_AUTO);
|
setCSmode(SPI_CS_AUTO);
|
||||||
setEndianness(SPI_MSB_FIRST);
|
setEndianness(SPI_MSB_FIRST);
|
||||||
|
|
||||||
init(1, 0x00, BITMODE_MPSSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FtdiSpi::~FtdiSpi()
|
FtdiSpi::~FtdiSpi()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue