Reset mpsse on close and properly free _ftdic

This commit is contained in:
LordGrey 2023-04-07 23:50:57 +00:00
parent 20409c1cc1
commit db903cb539

View File

@ -110,7 +110,9 @@ int ProviderFtdi::open()
int ProviderFtdi::close()
{
Debug(_log, "Closing FTDI device");
ftdi_set_bitmode(_ftdic, 0x00, BITMODE_RESET);
ftdi_usb_close(_ftdic);
ftdi_free(_ftdic);
_ftdic = nullptr;
return LedDevice::close();
}