|
||||||||||||||
Returns: The total number of bytes read. This will be less than the number of bytes requested by the xBytes parameter if the requested number of bytes cannot be read before the peripheral's read timeout expires. FreeRTOS_ioctl() is used to set the read timeout value. Example usage: The example 1 code snippet demonstrates how to perform a read when a peripheral is configured to use the polled transfer mode. Peripherals default to polled mode when they are opened.
The example 2 code snippet demonstrates how to perform a read when a peripheral is configured to use either the interrupt driven character queue transfer mode, or the interrupt driven circular buffer transfer mode. In these modes, the task making the FreeRTOS_read() call is held in the Blocked state (not using any CPU time) until either the requested number of bytes have been read, or the read timeout expires. FreeRTOS_ioctl() is used with the iocltSET_RX_TIMEOUT request code to configure the read timeout.
|
[ Back to the top ]
[ About FreeRTOS ]
[ Privacy ]
[ FreeRTOS+ Sitemap ]
[ Main FreeRTOS Sitemap ]
[
]
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|