Interrupt Driven Character Queue Transfer Mode
[FreeRTOS+IO Transfer Modes]
Data DirectionThe interrupt driven character queue transfer mode can be used with both FreeRTOS_read() and FreeRTOS_write().
DescriptionioconfigUSE_TX_CHAR_QUEUE and/or ioconfigUSE_RX_CHAR_QUEUE must be set to 1 in FreeRTOSIOConfig.h for the character queue transfer mode to be available for writes and reads respectively. It must also be explicitly enabled for the peripheral being used within the same configuration file.
When the character queue transfer mode is selected for writes, FreeRTOS_write() does not write directly to the peripheral. Instead the bytes are sent to a transmit queue. The peripheral’s interrupt service routine removes the bytes from the queue and sends them to the peripheral.
When the character queue transfer mode is selected for reads, FreeRTOS_read() does not read bytes directly from the peripheral, but from a receive queue that is filled by the FreeRTOS+IO interrupt service routine as data is received.
The interrupt service routines, and the FreeRTOS queues, are implemented by the FreeRTOS+IO code, and do not need to be provided by the application writer.
|Interrupt Driven Character Queue Transfer Mode|
The ioctlUSE_CHARACTER_QUEUE_TX and ioctlUSE_CHARACTER_QUEUE_RX request codes are used in calls to FreeRTOS_ioctl() to configure a peripheral to use interrupt driven character queue writes and reads respectively. Note these request codes will result in the peripheral’s interrupt being enabled, and the peripheral’s interrupt priority being set to the lowest possible. The ioctlSET_INTERRUPT_PRIORITY request code can be used to raise the peripheral’s priority if necessary.