pure virtual IO function

This commit is contained in:
gb 2022-12-07 15:18:26 +08:00
parent 97bfe73817
commit 2f7fb0bfd4
1 changed files with 3 additions and 2 deletions

View File

@ -82,6 +82,7 @@ public:
};
virtual void test_callback(const wchar_t* name/*test name*/, test_event ev, void* data, size_t flag) = 0;
// All IO operations are blocking
enum usb_io_type
{
USB_IO_BULK_READ = 0,
@ -89,8 +90,8 @@ public:
USB_IO_INTERRUPT_READ,
USB_IO_INTERRUPT_WRITE,
};
virtual int io_bulk_int(usb_io_type type, void* buf, size_t* len/*[in]-size of buf, [out]-data bytes in buf*/);
virtual int io_control(int type, int req, int val, int ind, void* buf, size_t* len/*[in]-in data sizef, [out]-transferred bytes*/);
virtual int io_bulk_int(usb_io_type type, void* buf, size_t* len/*[in]-size of buf, [out]-data bytes in buf*/) = 0;
virtual int io_control(int type, int req, int val, int ind, void* buf, size_t* len/*[in]-in data sizef, [out]-transferred bytes*/) = 0;
};
#ifdef TEST_DLL