diff --git a/cdcftdi.cpp b/cdcftdi.cpp index 13ca683f..8f07b358 100644 --- a/cdcftdi.cpp +++ b/cdcftdi.cpp @@ -246,7 +246,7 @@ uint8_t FTDI::Release() { bNumEP = 1; qNextPollTime = 0; bPollEnable = false; - return 0; + return pAsync->OnRelease(this); } uint8_t FTDI::Poll() { diff --git a/cdcftdi.h b/cdcftdi.h index 692ec6b0..fbb7396d 100644 --- a/cdcftdi.h +++ b/cdcftdi.h @@ -79,6 +79,7 @@ class FTDI; class FTDIAsyncOper { public: virtual uint8_t OnInit(FTDI *pftdi) = 0; + virtual uint8_t OnRelease(FTDI *pftdi) = 0; };