ftdispi: convert verbose bool -> int8_t
This commit is contained in:
parent
baeb9d52ec
commit
c41ef7539c
|
|
@ -68,7 +68,7 @@ static cable_t cable = {
|
|||
};
|
||||
|
||||
FtdiSpi::FtdiSpi(int vid, int pid, unsigned char interface, uint32_t clkHZ,
|
||||
bool verbose):
|
||||
int8_t verbose):
|
||||
FTDIpp_MPSSE(cable, "", "", clkHZ, verbose)
|
||||
{
|
||||
(void)pid;
|
||||
|
|
@ -83,7 +83,7 @@ FtdiSpi::FtdiSpi(int vid, int pid, unsigned char interface, uint32_t clkHZ,
|
|||
|
||||
FtdiSpi::FtdiSpi(const cable_t &cable,
|
||||
spi_pins_conf_t spi_config,
|
||||
uint32_t clkHZ, bool verbose):
|
||||
uint32_t clkHZ, int8_t verbose):
|
||||
FTDIpp_MPSSE(cable, "", "", clkHZ, verbose),
|
||||
_cs_bits(1 << 3), _clk(1 << 0), _holdn(0), _wpn(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ class FtdiSpi : public FTDIpp_MPSSE, SPIInterface {
|
|||
};
|
||||
|
||||
FtdiSpi(int vid, int pid, unsigned char interface, uint32_t clkHZ,
|
||||
bool verbose);
|
||||
int8_t verbose);
|
||||
FtdiSpi(const cable_t &cable,
|
||||
spi_pins_conf_t spi_config, uint32_t clkHZ,
|
||||
bool verbose);
|
||||
int8_t verbose);
|
||||
~FtdiSpi();
|
||||
|
||||
void setMode(uint8_t mode);
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ int main(int argc, char **argv)
|
|||
pins_config = board->spi_pins_config;
|
||||
|
||||
try {
|
||||
spi = new FtdiSpi(cable, pins_config, args.freq, args.verbose > 0);
|
||||
spi = new FtdiSpi(cable, pins_config, args.freq, args.verbose);
|
||||
} catch (std::exception &e) {
|
||||
printError("Error: Failed to claim cable");
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue