/system/core/adb/client/ |
D | usb_dispatch.cpp | 39 int usb_write(usb_handle* h, const void* data, int len) { in usb_write() 41 ? libusb::usb_write(reinterpret_cast<libusb::usb_handle*>(h), data, len) in usb_write() 42 : native::usb_write(reinterpret_cast<native::usb_handle*>(h), data, len); in usb_write() 45 int usb_read(usb_handle* h, void* data, int len) { in usb_read() 47 ? libusb::usb_read(reinterpret_cast<libusb::usb_handle*>(h), data, len) in usb_read() 48 : native::usb_read(reinterpret_cast<native::usb_handle*>(h), data, len); in usb_read() 51 int usb_close(usb_handle* h) { in usb_close() 52 return should_use_libusb() ? libusb::usb_close(reinterpret_cast<libusb::usb_handle*>(h)) in usb_close() 53 : native::usb_close(reinterpret_cast<native::usb_handle*>(h)); in usb_close() 56 void usb_reset(usb_handle* h) { in usb_reset() [all …]
|
D | usb.h | 39 struct usb_handle; 40 ADB_USB_INTERFACE(libusb::usb_handle*); 44 struct usb_handle; 45 ADB_USB_INTERFACE(native::usb_handle*); 49 struct usb_handle {}; struct 51 ADB_USB_INTERFACE(::usb_handle*); 59 explicit UsbConnection(usb_handle* handle) : handle_(handle) {} in UsbConnection() 69 usb_handle* handle_;
|
D | usb_windows.cpp | 56 struct usb_handle : public ::usb_handle { struct 80 static std::vector<usb_handle*>& handle_list = *new std::vector<usb_handle*>(); 93 int register_new_device(usb_handle* handle); 96 int recognized_device(usb_handle* handle); 113 usb_handle* do_usb_open(const wchar_t* interface_name); 116 int usb_write(usb_handle* handle, const void* data, int len); 119 int usb_read(usb_handle* handle, void* data, int len); 122 void usb_cleanup_handle(usb_handle* handle); 125 void usb_kick(usb_handle* handle); 128 int usb_close(usb_handle* handle); [all …]
|
D | usb_osx.cpp | 51 struct usb_handle struct 64 usb_handle() in usb_handle() function 77 static auto& g_usb_handles = *new std::vector<std::unique_ptr<usb_handle>>(); 91 static void usb_kick_locked(usb_handle* handle); 104 static void AddDevice(std::unique_ptr<usb_handle> handle) { in AddDevice() 111 static std::unique_ptr<usb_handle> CheckInterface(IOUSBInterfaceInterface550** iface, UInt16 vendor, 300 std::unique_ptr<usb_handle> handle = in AndroidInterfaceAdded() 308 usb_handle* handle_p = handle.get(); in AndroidInterfaceAdded() 312 register_usb_transport(reinterpret_cast<::usb_handle*>(handle_p), serial, devpath.c_str(), in AndroidInterfaceAdded() 331 static std::unique_ptr<usb_handle> CheckInterface(IOUSBInterfaceInterface550** interface, in CheckInterface() [all …]
|
D | usb_linux.cpp | 61 struct usb_handle : public ::usb_handle { struct 62 ~usb_handle() { in ~usb_handle() argument 93 static auto& g_usb_handles = *new std::list<usb_handle*>(); 97 for (usb_handle* usb : g_usb_handles) { in is_known_device() 110 for (usb_handle* usb : g_usb_handles) { in kick_disconnected_devices() 305 static int usb_bulk_write(usb_handle* h, const void* data, int len) { in usb_bulk_write() 344 static int usb_bulk_read(usb_handle* h, void* data, int len) { in usb_bulk_read() 410 static int usb_write_split(usb_handle* h, unsigned char* data, int len) { in usb_write_split() 423 int usb_write(usb_handle* h, const void* _data, int len) { in usb_write() 450 int usb_read(usb_handle *h, void *_data, int len) in usb_read() [all …]
|
D | usb_libusb.cpp | 90 struct usb_handle : public ::usb_handle { struct 91 usb_handle(const std::string& device_address, const std::string& serial, in usb_handle() function 105 ~usb_handle() { in ~usb_handle() argument 150 static auto& usb_handles = *new std::unordered_map<std::string, std::unique_ptr<usb_handle>>(); 366 std::unique_ptr<usb_handle> result(new usb_handle(device_address, device_serial, in process_device() 369 usb_handle* usb_handle_raw = result.get(); in process_device() 415 std::unique_ptr<usb_handle> handle = std::move(it->second); in device_disconnected() 535 static int perform_usb_transfer(usb_handle* h, transfer_info* info, in perform_usb_transfer() 564 int usb_write(usb_handle* h, const void* d, int len) { in usb_write() 587 int usb_read(usb_handle* h, void* d, int len) { in usb_read() [all …]
|
D | transport_usb.cpp | 44 static int UsbReadMessage(usb_handle* h, amessage* msg) { in UsbReadMessage() 67 static int UsbReadPayload(usb_handle* h, apacket* p) { in UsbReadPayload() 100 static int remote_read(apacket* p, usb_handle* usb) { in remote_read() 129 static int remote_read(apacket* p, usb_handle* usb) { in remote_read() 193 void init_usb_transport(atransport* t, usb_handle* h) { in init_usb_transport()
|
/system/core/fastboot/device/ |
D | usb.h | 38 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
|
D | usb.cpp | 78 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()
|
D | usb_client.h | 35 std::unique_ptr<usb_handle> handle_;
|
D | usb_client.cpp | 189 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/ |
D | usb_windows.cpp | 55 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 …]
|
D | usb_osx.cpp | 56 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()
|
D | usb_linux.cpp | 88 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()
|
/system/core/adb/ |
D | transport.h | 251 struct usb_handle; 298 void SetUsbHandle(usb_handle* h) { usb_handle_ = h; } in SetUsbHandle() 299 usb_handle* GetUsbHandle() { return usb_handle_; } in GetUsbHandle() 413 usb_handle* usb_handle_ = nullptr; 464 void init_usb_transport(atransport* t, usb_handle* usb); 465 void register_usb_transport(usb_handle* h, const char* serial, const char* devpath, 469 void unregister_usb_transport(usb_handle* usb);
|
D | transport.cpp | 1468 void register_usb_transport(usb_handle* usb, const char* serial, const char* devpath, in register_usb_transport() 1491 void unregister_usb_transport(usb_handle* usb) { in unregister_usb_transport()
|