Electronic Components Datasheet Search
  English  ▼

X  

CP2103 Datasheet(PDF) 20 Page - Silicon Laboratories

Part # CP2103
Description  PROGRAMMERS GUIDE
PDF  36 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  SILABS [Silicon Laboratories]
Direct Link  http://www.silabs.com
Logo SILABS - Silicon Laboratories

CP2103 Datasheet(HTML) 20 Page - Silicon Laboratories

Back Button CP2103 Datasheet HTML 16Page - Silicon Laboratories CP2103 Datasheet HTML 17Page - Silicon Laboratories CP2103 Datasheet HTML 18Page - Silicon Laboratories CP2103 Datasheet HTML 19Page - Silicon Laboratories CP2103 Datasheet HTML 20Page - Silicon Laboratories CP2103 Datasheet HTML 21Page - Silicon Laboratories CP2103 Datasheet HTML 22Page - Silicon Laboratories CP2103 Datasheet HTML 23Page - Silicon Laboratories CP2103 Datasheet HTML 24Page - Silicon Laboratories Next Button
Zoom Inzoom in Zoom Outzoom out
 20 / 36 page
background image
AN169
20
Rev. 2.3
4.3. Block_Write
Description:
Writes a buffer of data to the host via USB. Maximum block size is 4096 bytes. Returns the num-
ber of bytes actually written. This matches the parameter NumBytes unless an error condition
occurs. A zero is returned if Block_Write is called with NumBytes greater than 4096. If NumBytes
is greater than 64 bytes, the Bulk Transaction is split into multiple packets, each with a 64-byte
data payload (except last packet). Block_Write returns after copying the last packet to the device
USB transmit buffer. The completion of the transaction is then indicated by the TX_COMPLETE
USB API interrupt.
SI_Read can read from 0 to 64 kB of data. If Block_Write is called multiple times before SI_Read
is called then there is potential to read all of the data in the host's buffer depending on the
amount of data requested in the read. For example, if Block_Write is called 4 times, and sends a
byte of data in each block the host side can call SI_Read requesting 4 bytes and get the data
from all 4 of the Block_Writes at once.
Supported Devices:
C8051F320/1/6/7, C8051F340/1/2/3/4/5/6/7/8/9/A/B/C/D,
C8051F380/1/2/3/4/5/6/7, C8051T320/1/2/3/6/7, C8051T620/1/2/3
Prototype:
UINT Block_Write (BYTE *Buffer, UINT NumBytes)
Parameters:
1. Buffer—Pointer to a memory location where data to be written is stored.
2. NumBytes—Number of bytes to write (1–4096).
Return Value:
Returns an unsigned 16-bit value indicating the number of bytes actually written.
4.4.
Block_Read
Description:
Reads a buffer of data sent from the host via USB. Maximum block size is 64 bytes. The block of
data is copied from the USB interface to the memory location pointed to by Buffer. The device
USB receive buffer will be emptied on return regardless of whether or not the entire buffer was
read by Block_Read. The maximum number of bytes to read from the device USB receive buffer
is specified in NumBytes. The number of bytes actually read (copied to Buffer) is returned by the
function. A zero is returned if there are no bytes to read. Typically, Block_Read should be called
after receiving a data packet, indicated by an RX_COMPLETE USB API interrupt.
Multiple calls to Block_Read might be needed to read all data sent via one SI_Write call if the
buffer sent to SI_Write is more than 64 bytes.
Supported Devices:
C8051F320/1/6/7, C8051F340/1/2/3/4/5/6/7/8/9/A/B/C/D,
C8051F380/1/2/3/4/5/6/7, C8051T320/1/2/3/6/7, C8051T620/1/2/3
Prototype:
BYTE Block_Read (BYTE *Buffer, BYTE NumBytes)
Parameters:
1. Buffer—Pointer to a memory location where data will be copied.
2. NumBytes—Number of bytes to read (1–64).
Return Value:
Returns an unsigned 8-bit value indicating the number of bytes actually read.



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 31 32 33 34 35 36


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
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