Home
last modified time | relevance | path

Searched refs:usb_handle (Results 1 – 7 of 7) sorted by relevance

/system/core/fastboot/device/
Dusb.h38 struct usb_handle { struct
39 usb_handle() {} in usb_handle() function
45 int (*write)(usb_handle* h, const void* data, int len); argument
46 int (*read)(usb_handle* h, void* data, int len, bool allow_partial); argument
47 void (*close)(usb_handle* h); argument
63 usb_handle* create_usb_handle(unsigned num_bufs, unsigned io_size); argument
Dusb.cpp78 static int usb_ffs_write(usb_handle* h, const void* data, int len) { in usb_ffs_write()
98 static int usb_ffs_read(usb_handle* h, void* data, int len, bool allow_partial) { in usb_ffs_read()
129 static int usb_ffs_do_aio(usb_handle* h, const void* data, int len, bool read) { in usb_ffs_do_aio()
188 static int usb_ffs_aio_read(usb_handle* h, void* data, int len, bool /* allow_partial */) { in usb_ffs_aio_read()
192 static int usb_ffs_aio_write(usb_handle* h, const void* data, int len) { in usb_ffs_aio_write()
196 static void usb_ffs_close(usb_handle* h) { in usb_ffs_close()
209 usb_handle* create_usb_handle(unsigned num_bufs, unsigned io_size) { in create_usb_handle()
210 usb_handle* h = new usb_handle(); in create_usb_handle()
Dusb_client.h35 std::unique_ptr<usb_handle> handle_;
Dusb_client.cpp189 static void CloseFunctionFs(usb_handle* h) { in CloseFunctionFs()
195 static bool InitFunctionFs(usb_handle* h) { in InitFunctionFs()
244 : handle_(std::unique_ptr<usb_handle>(create_usb_handle(kFbFfsNumBufs, kFbFfsBufSize))) { in ClientUsbTransport()
/system/core/fastboot/
Dusb_windows.cpp55 struct usb_handle { struct
71 WindowsUsbTransport(std::unique_ptr<usb_handle> handle) : handle_(std::move(handle)) {} in WindowsUsbTransport() argument
80 std::unique_ptr<usb_handle> handle_;
89 int recognized_device(usb_handle* handle, ifc_match_func callback);
92 std::unique_ptr<usb_handle> do_usb_open(const wchar_t* interface_name);
95 void usb_cleanup_handle(usb_handle* handle);
98 void usb_kick(usb_handle* handle);
101 std::unique_ptr<usb_handle> do_usb_open(const wchar_t* interface_name) { in do_usb_open()
103 std::unique_ptr<usb_handle> ret(new usb_handle); in do_usb_open()
231 void usb_cleanup_handle(usb_handle* handle) { in usb_cleanup_handle()
[all …]
Dusb_osx.cpp56 struct usb_handle struct
71 OsxUsbTransport(std::unique_ptr<usb_handle> handle, uint32_t ms_timeout = 0) in OsxUsbTransport() argument
81 std::unique_ptr<usb_handle> handle_;
89 static int try_interfaces(IOUSBDeviceInterface500** dev, usb_handle* handle) { in try_interfaces()
270 static int try_device(io_service_t device, usb_handle *handle) { in try_device()
392 static int init_usb(ifc_match_func callback, std::unique_ptr<usb_handle>* handle) { in init_usb()
397 usb_handle h; in init_usb()
444 handle->reset(new usb_handle); in init_usb()
445 memcpy(handle->get(), &h, sizeof(usb_handle)); in init_usb()
465 std::unique_ptr<usb_handle> handle; in usb_open()
Dusb_linux.cpp88 struct usb_handle struct
98 explicit LinuxUsbTransport(std::unique_ptr<usb_handle> handle, uint32_t ms_timeout = 0) in LinuxUsbTransport() argument
109 std::unique_ptr<usb_handle> handle_;
345 static std::unique_ptr<usb_handle> find_usb_device(const char* base, ifc_match_func callback) in find_usb_device()
347 std::unique_ptr<usb_handle> usb; in find_usb_device()
378 usb.reset(new usb_handle()); in find_usb_device()
507 std::unique_ptr<usb_handle> handle = find_usb_device("/sys/bus/usb/devices", callback); in usb_open()