Lines Matching defs:ep

306     int32_t ep = -1;
308 ep = open(USBFN_DEV, O_RDWR);
309 if (ep > 0) {
314 if (ep < 0) {
317 return ep;
397 int32_t ret = snprintf_s(epName, MAX_NAMELEN, MAX_NAMELEN - 1, "/dev/functionfs/%s.ep%d", interfaceName, epIndex);
403 int32_t ep = -1;
405 ep = open(epName, O_RDWR);
406 if (ep > 0) {
411 if (ep < 0) {
415 return ep;
418 static int32_t UsbFnAdapterClosePipe(int32_t ep)
420 if (ep <= 0) {
424 return close(ep);
1026 static int32_t UsbFnAdapterGetPipeInfo(int32_t ep, struct UsbFnPipeInfo * const pipeInfo)
1029 if (ep <= 0 || pipeInfo == NULL) {
1034 ret = ioctl(ep, FUNCTIONFS_ENDPOINT_DESC, &desc);
1052 static int32_t UsbFnAdapterQueueInit(int32_t ep)
1054 if (ep <= 0) {
1057 return ioctl(ep, FUNCTIONFS_ENDPOINT_QUEUE_INIT, 0);
1060 static int32_t UsbFnAdapterQueueDel(int32_t ep)
1062 if (ep <= 0) {
1066 return ioctl(ep, FUNCTIONFS_ENDPOINT_QUEUE_DEL, 0);
1069 static int32_t UsbFnAdapterReleaseBuf(int32_t ep, const struct GenericMemory *mem)
1071 if (ep <= 0 || mem == NULL) {
1075 return ioctl(ep, FUNCTIONFS_ENDPOINT_RELEASE_BUF, mem);
1078 static int32_t UsbFnAdapterPipeIo(int32_t ep, struct IoData *ioData)
1081 if (ep <= 0 || ioData == NULL) {
1087 ret = ioctl(ep, FUNCTIONFS_ENDPOINT_READ, ioData);
1089 ret = ioctl(ep, FUNCTIONFS_ENDPOINT_WRITE, ioData);
1099 static int32_t UsbFnAdapterCancelIo(int32_t ep, const struct IoData * const ioData)
1101 if (ep <= 0 || ioData == NULL) {
1104 return ioctl(ep, FUNCTIONFS_ENDPOINT_RW_CANCEL, ioData);
1107 static uint8_t *UsbFnAdapterMapAddr(int32_t ep, uint32_t len)
1109 if (ep <= 0) {
1113 return mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, ep, 0);
1154 HDF_LOGE("unable to read indexBuf from ep#");
1179 HDF_LOGE("%{public}s: ep[%{public}d] = %{public}d", __func__, i, event->ep0[i]);
1188 HDF_LOGE("%{public}s: ep[%{public}d] = %{public}d", __func__, i, event->epx[i]);
1209 static int32_t UsbFnAdapterRequestGetStatus(int32_t ep, const struct IoData *ioData)
1211 if (ep <= 0 || ioData == NULL) {
1214 return ioctl(ep, FUNCTIONFS_ENDPOINT_GET_REQ_STATUS, ioData);