поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

UM0463 датащи(PDF) 20 Page - STMicroelectronics

номер детали UM0463
подробное описание детали  ST7 full-speed USB library
PDF  30 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0463 датащи(HTML) 20 Page - STMicroelectronics

Back Button UM0463 Datasheet HTML 16Page - STMicroelectronics UM0463 Datasheet HTML 17Page - STMicroelectronics UM0463 Datasheet HTML 18Page - STMicroelectronics UM0463 Datasheet HTML 19Page - STMicroelectronics UM0463 Datasheet HTML 20Page - STMicroelectronics UM0463 Datasheet HTML 21Page - STMicroelectronics UM0463 Datasheet HTML 22Page - STMicroelectronics UM0463 Datasheet HTML 23Page - STMicroelectronics UM0463 Datasheet HTML 24Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 20 / 30 page
background image
Data transfer on noncontrol endpoints
UM0463
20/30
4
Data transfer on noncontrol endpoints
Noncontrol endpoints are identified by the endpoint address and the endpoint direction, for
example endpoint 2 IN and endpoint 2 OUT are two different endpoints. The endpoint of IN
direction is used to send data from the device to the host. It can be either a bulk endpoint or
an interrupt endpoint. The endpoint of OUT direction is used to receive data from the host to
the device. It can be either a bulk endpoint or an interrupt endpoint too.
The library provides a set of functions for transferring data along endpoints of both
directions. Each endpoint of either direction has two functions.
4.1
Sending data to the host
There are two functions for sending data to an endpoint.
char USB_SendDataEP?( unsigned char *DataAddress,
unsigned char LengthToXmit);
char USB_EP?_isSent(void);
Where? is a digit that represents the endpoint address. The digit ranges from 1 to 5 for
ST7SCR, and the digit is 1 or 2 for ST7265. For example, the sending functions for endpoint
2 are USB_SendDataEP2() and USB_EP2_isSent().
The function USB_SendDataEP?() is used to start a sending procedure. The parameter
DataAddress is a pointer which points to the data buffer and the parameter LengthToXmit
gives the length of the data package. After the sending procedure is started, this function
returns REQ_SUCCESS to the caller immediately. The function returns REQ_ERROR if the
previous sending procedure is not finished or the specified endpoint is in the state of
DISABLE or STALL. The user code should call function USB_EP?_isSent() some time later
to enquire that the data transmission is finished. The function USB_EP?_isSent() returns a
nonzero value if the data is sent, otherwise it returns a value zero. The user code has to wait
that a sending procedure is finished before starting another sending procedure.
If the data package to be sent is longer than 255 bytes, the user code has to split the data
package into a few small pieces that shorter than 255 bytes. The length of these few small
data pieces, except the last data piece, have to be in the multiple of the maximum packet
size of the used endpoint. Refer to Section 1.2.1 for the maximum packet size of each
endpoint.
4.2
Receiving data from the host
There are two functions for receiving data from an endpoint.
char USB_RecvDataEP?(unsigned char *DataAddress,
unsigned char Length);
unsigned char USB_TakeDataEP?(void);
Where? is a digit that represents the endpoint address. The digit is 1 or 2 for ST7265 and
the digit is 2 for ST7SCR only. For example, the receiving functions for endpoint 2 are
USB_RecvDataEP2() and USB_TakeDataEP2().



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com