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.
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.
Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.