/aosp12/hardware/interfaces/usb/gadget/1.1/default/lib/ |
H A D | MonitorFfs.cpp | 95 MonitorFfs* monitorFfs = (MonitorFfs*)param; in startMonitorFd() local 103 if (access(monitorFfs->mEndpointList.at(i).c_str(), R_OK)) { in startMonitorFd() 113 lock_guard<mutex> lock(monitorFfs->mLock); in startMonitorFd() 114 monitorFfs->mCurrentUsbFunctionsApplied = true; in startMonitorFd() 115 monitorFfs->mCallback(monitorFfs->mCurrentUsbFunctionsApplied, monitorFfs->mPayload); in startMonitorFd() 119 monitorFfs->mCv.notify_all(); in startMonitorFd() 134 if (events[i].data.fd == monitorFfs->mInotifyFd) { in startMonitorFd() 164 lock_guard<mutex> lock(monitorFfs->mLock); in startMonitorFd() 166 monitorFfs->mCallback(monitorFfs->mCurrentUsbFunctionsApplied, in startMonitorFd() 172 monitorFfs->mCv.notify_all(); in startMonitorFd() [all …]
|
H A D | UsbGadgetUtils.cpp | 133 if (!monitorFfs->addInotifyFd("/dev/usb-ffs/mtp/")) return Status::ERROR; in addGenericAndroidFunctions() 138 monitorFfs->addEndPoint("/dev/usb-ffs/mtp/ep1"); in addGenericAndroidFunctions() 139 monitorFfs->addEndPoint("/dev/usb-ffs/mtp/ep2"); in addGenericAndroidFunctions() 140 monitorFfs->addEndPoint("/dev/usb-ffs/mtp/ep3"); in addGenericAndroidFunctions() 151 monitorFfs->addEndPoint("/dev/usb-ffs/ptp/ep1"); in addGenericAndroidFunctions() 152 monitorFfs->addEndPoint("/dev/usb-ffs/ptp/ep2"); in addGenericAndroidFunctions() 153 monitorFfs->addEndPoint("/dev/usb-ffs/ptp/ep3"); in addGenericAndroidFunctions() 179 Status addAdb(MonitorFfs* monitorFfs, int* functionCount) { in addAdb() argument 181 if (!monitorFfs->addInotifyFd("/dev/usb-ffs/adb/")) return Status::ERROR; in addAdb() 184 monitorFfs->addEndPoint("/dev/usb-ffs/adb/ep1"); in addAdb() [all …]
|
/aosp12/hardware/interfaces/usb/gadget/1.2/default/lib/ |
H A D | MonitorFfs.cpp | 95 MonitorFfs* monitorFfs = (MonitorFfs*)param; in startMonitorFd() local 103 if (access(monitorFfs->mEndpointList.at(i).c_str(), R_OK)) { in startMonitorFd() 113 lock_guard<mutex> lock(monitorFfs->mLock); in startMonitorFd() 114 monitorFfs->mCurrentUsbFunctionsApplied = true; in startMonitorFd() 115 monitorFfs->mCallback(monitorFfs->mCurrentUsbFunctionsApplied, monitorFfs->mPayload); in startMonitorFd() 119 monitorFfs->mCv.notify_all(); in startMonitorFd() 134 if (events[i].data.fd == monitorFfs->mInotifyFd) { in startMonitorFd() 164 lock_guard<mutex> lock(monitorFfs->mLock); in startMonitorFd() 166 monitorFfs->mCallback(monitorFfs->mCurrentUsbFunctionsApplied, in startMonitorFd() 172 monitorFfs->mCv.notify_all(); in startMonitorFd() [all …]
|
H A D | UsbGadgetUtils.cpp | 133 if (!monitorFfs->addInotifyFd("/dev/usb-ffs/mtp/")) return Status::ERROR; in addGenericAndroidFunctions() 138 monitorFfs->addEndPoint("/dev/usb-ffs/mtp/ep1"); in addGenericAndroidFunctions() 139 monitorFfs->addEndPoint("/dev/usb-ffs/mtp/ep2"); in addGenericAndroidFunctions() 140 monitorFfs->addEndPoint("/dev/usb-ffs/mtp/ep3"); in addGenericAndroidFunctions() 151 monitorFfs->addEndPoint("/dev/usb-ffs/ptp/ep1"); in addGenericAndroidFunctions() 152 monitorFfs->addEndPoint("/dev/usb-ffs/ptp/ep2"); in addGenericAndroidFunctions() 153 monitorFfs->addEndPoint("/dev/usb-ffs/ptp/ep3"); in addGenericAndroidFunctions() 191 Status addAdb(MonitorFfs* monitorFfs, int* functionCount) { in addAdb() argument 193 if (!monitorFfs->addInotifyFd("/dev/usb-ffs/adb/")) return Status::ERROR; in addAdb() 196 monitorFfs->addEndPoint("/dev/usb-ffs/adb/ep1"); in addAdb() [all …]
|
/aosp12/hardware/google/pixel/usb/ |
H A D | MonitorFfs.cpp | 116 MonitorFfs *monitorFfs = (MonitorFfs *)param; in startMonitorFd() local 124 if (access(monitorFfs->mEndpointList.at(i).c_str(), R_OK)) { in startMonitorFd() 134 lock_guard<mutex> lock(monitorFfs->mLock); in startMonitorFd() 135 monitorFfs->mCurrentUsbFunctionsApplied = true; in startMonitorFd() 136 monitorFfs->mCallback(monitorFfs->mCurrentUsbFunctionsApplied, monitorFfs->mPayload); in startMonitorFd() 140 monitorFfs->mCv.notify_all(); in startMonitorFd() 155 if (events[i].data.fd == monitorFfs->mInotifyFd) { in startMonitorFd() 188 lock_guard<mutex> lock(monitorFfs->mLock); in startMonitorFd() 190 monitorFfs->mCallback(monitorFfs->mCurrentUsbFunctionsApplied, in startMonitorFd() 196 monitorFfs->mCv.notify_all(); in startMonitorFd() [all …]
|
H A D | UsbGadgetUtils.cpp | 147 if (!monitorFfs->addInotifyFd("/dev/usb-ffs/mtp/")) in addGenericAndroidFunctions() 154 monitorFfs->addEndPoint("/dev/usb-ffs/mtp/ep1"); in addGenericAndroidFunctions() 155 monitorFfs->addEndPoint("/dev/usb-ffs/mtp/ep2"); in addGenericAndroidFunctions() 156 monitorFfs->addEndPoint("/dev/usb-ffs/mtp/ep3"); in addGenericAndroidFunctions() 163 if (!monitorFfs->addInotifyFd("/dev/usb-ffs/ptp/")) in addGenericAndroidFunctions() 170 monitorFfs->addEndPoint("/dev/usb-ffs/ptp/ep1"); in addGenericAndroidFunctions() 171 monitorFfs->addEndPoint("/dev/usb-ffs/ptp/ep2"); in addGenericAndroidFunctions() 172 monitorFfs->addEndPoint("/dev/usb-ffs/ptp/ep3"); in addGenericAndroidFunctions() 214 if (!monitorFfs->addInotifyFd("/dev/usb-ffs/adb/")) in addAdb() 219 monitorFfs->addEndPoint("/dev/usb-ffs/adb/ep1"); in addAdb() [all …]
|
/aosp12/hardware/interfaces/usb/gadget/1.1/default/ |
H A D | UsbGadget.cpp | 60 if (monitorFfs.isMonitorRunning()) { in tearDownGadget() 61 monitorFfs.reset(); in tearDownGadget() 140 if (addGenericAndroidFunctions(&monitorFfs, functions, &ffsEnabled, &i) != in setupFunctions() 146 if (addAdb(&monitorFfs, &i) != V1_0::Status::SUCCESS) return V1_0::Status::ERROR; in setupFunctions() 157 monitorFfs.registerFunctionsAppliedCallback(¤tFunctionsAppliedCallback, this); in setupFunctions() 161 monitorFfs.startMonitor(); in setupFunctions() 166 bool pullup = monitorFfs.waitForPullUp(timeout); in setupFunctions()
|
H A D | UsbGadget.h | 67 static MonitorFfs monitorFfs(kGadgetName);
|
/aosp12/hardware/interfaces/usb/gadget/1.2/default/ |
H A D | UsbGadget.cpp | 104 if (monitorFfs.isMonitorRunning()) { in tearDownGadget() 105 monitorFfs.reset(); in tearDownGadget() 197 if (addGenericAndroidFunctions(&monitorFfs, functions, &ffsEnabled, &i) != in setupFunctions() 203 if (addAdb(&monitorFfs, &i) != V1_0::Status::SUCCESS) return V1_0::Status::ERROR; in setupFunctions() 214 monitorFfs.registerFunctionsAppliedCallback(¤tFunctionsAppliedCallback, this); in setupFunctions() 218 monitorFfs.startMonitor(); in setupFunctions() 223 bool pullup = monitorFfs.waitForPullUp(timeout); in setupFunctions()
|
H A D | UsbGadget.h | 71 static MonitorFfs monitorFfs(kGadgetName);
|
/aosp12/hardware/interfaces/usb/gadget/1.1/default/lib/include/ |
H A D | UsbGadgetCommon.h | 166 Status addAdb(MonitorFfs* monitorFfs, int* functionCount); 168 Status addGenericAndroidFunctions(MonitorFfs* monitorFfs, uint64_t functions, bool* ffsEnabled,
|
/aosp12/hardware/interfaces/usb/gadget/1.2/default/lib/include/ |
H A D | UsbGadgetCommon.h | 168 Status addAdb(MonitorFfs* monitorFfs, int* functionCount); 170 Status addGenericAndroidFunctions(MonitorFfs* monitorFfs, uint64_t functions, bool* ffsEnabled,
|
/aosp12/hardware/google/pixel/usb/include/pixelusb/ |
H A D | UsbGadgetCommon.h | 169 Status addAdb(MonitorFfs *monitorFfs, int *functionCount); 171 Status addGenericAndroidFunctions(MonitorFfs *monitorFfs, uint64_t functions,
|