📄 urbasbytestream.h
字号:
/* * urbAsByteStream.h * * Author : Lionetti Salvatore <salvatorelionetti@yahoo.it> * License: GPL * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *//* urbDataT: * ========= * Take an already initialized urb and read/write bytes on it, * in only one solution: reading until avail, writing until space. * Urb parameter valid for any transfer type: * * urb->transfer_buffer_length is the bytes, used or !, of * urb->transfer_buffer. * urb->status * * During read() we bypass status<0. * * actual_length, for isoc ?*/struct urbDataT { struct urb* urb; int curr; int curw; /* Needed only for isoc, when read/write: current frame.*/ int cur_frame;};/* Read/Write until ret <=0 .*/void initUrbD(struct urbDataT* ud, struct urb* urb);int readUrbD(struct urbDataT* ud, char* buf, int len);int writeUrbD(struct urbDataT* ud, char* buf, int len);int emptyUrbD(struct urbDataT* ud);void resetUrbD(struct urbDataT* ud);int dumpUrbD(struct urbDataT* ud, char* buf, int len);void testUrbD(void);/* Util.*/int pipe2addr(int pipe);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -