Electronic Components Datasheet Search |
|
CP2101 Datasheet(PDF) 6 Page - Silicon Laboratories |
|
CP2101 Datasheet(HTML) 6 Page - Silicon Laboratories |
6 / 36 page AN169 6 Rev. 2.3 3.5. SI_Read Description: Reads the available number of bytes into the supplied buffer and retrieves the number of bytes that were read (this can be less than the number of bytes requested). This function returns syn- chronously if the overlapped object is set to NULL (this happens by default) but will not block sys- tem execution. If an initialized OVERLAPPED object is passed then the function returns immediately. If the read completed then the status will be SI_SUCCESS but if I/O is still pending then it will return STATUS_IO_PENDING. If STATUS_IO_PENDING is returned, the OVER- LAPPED object can then be waited on using WaitForSingleObject(), and retrieve data or cancel using GetOverlappedResult() (as documented on MSDN by Microsoft) or SI_CancelIo() respec- tively. This functionality allows for multiple reads to be issued and waited on at a time. If any data is available when SI_Read is called it will return so check NumBytesReturned to determine if all requested data was returned. To make sure that SI_Read returns the requested number of bytes use SI_CheckRxQueue() described in Section "3.11. SI_CheckRXQueue" on page 9. 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, CP2101/2/3/4/5/8/9 Prototype: SI_STATUS SI_Read (HANDLE Handle, LPVOID Buffer, DWORD NumBytesToRead, DWORD *NumBytesReturned, OVERLAPPED* o = NULL) Parameters: 1. Handle—Handle to the device to read as returned by SI_Open. 2. Buffer—Address of a character buffer to be filled with read data. 3. NumBytesToRead—Number of bytes to read from the device into the buffer (0–64 kB). 4. NumBytesReturned—Address of a DWORD which will contain the number of bytes actually read into the buffer on return. 5. (Optional)—Address of an initialized OVERLAPPED object that can be used for asynchronous reads. Return Value: SI_STATUS = SI_SUCCESS or SI_READ_ERROR or SI_INVALID_PARAMETER or SI_INVALID_HANDLE or SI_SI_READ_TIMED_OUT or SI_IO_PENDING or SI_SYSTEM_ERROR_CODE or SI_INVALID_REQUEST_LENGTH or SI_DEVICE_IO_FAILED |
Similar Part No. - CP2101 |
|
Similar Description - CP2101 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.COM |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Datasheet Upload | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
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 |