Real time embedded FreeRTOS RSS feed 
Homepage FreeRTOS+ Products FreeRTOS Labs Support Forum Contact / Enquiries

FreeRTOS+IO
A POSIX "style" peripheral driver extension for FreeRTOS

Introduction

FreeRTOS+IO provides a Linux/POSIX like open(), read(), write(), ioctl() type interface to peripheral driver libraries. It sits between a peripheral driver library and a user application to provide a single, common, interface to all supported peripherals across all supported platforms. The current board support package implementation(s) support UART, I2C and SPI operation, in both polled and interrupt driven modes. Support for non-serial peripherals will be added soon.

FreeRTOS+IO abstracts away the peripheral interface details, including the implementation of any interrupt service routines that may be required. Various different data transfer modes are catered for, using different techniques to both read and write data, making FreeRTOS+IO applicable to a wide range of applications.

View the quick and simple source code examples to understand the FreeRTOS+IO concept, and see its API in action. More comprehensive demonstrations come with the board support package(s) - including examples of FreeRTOS+IO and FreeRTOS+CLI being used to create a telnet like server that can be used to manipulate files on an SD card and view FreeRTOS statistics.




FreeRTOS+IO in the context of an application

The FreeRTOS+IO layer sits between the user application and the peripherals.



The FreeRTOS+IO API

The FreeRTOS+IO API can be described as Linux/POSIX "like" in that it provides open(), read(), write() and ioctl() interfaces to the peripherals it supports. It is important to be clear however that it does not claim to actually be POSIX compliant. The API functions are named FreeRTOS_open(), FreeRTOS_read(), FreeRTOS_write() and FreeRTOS_ioctl().


FreeRTOS+IO data transfer modes

FreeRTOS+IO currently provides three write modes, and three read modes. These are described briefly in the table below, and more fully in the transfer modes section of this site. FreeRTOS_ioctl() calls are used to switch between modes.

Transfer Mode Data Direction Description
Polled Read and write The most basic read and write mode, where busy waits are used instead of interrupts.
Interrupt driven circular buffer Read only An interrupt driven mode where received data is placed into a buffer by an interrupt service routine, reads then remove data from the buffer.
Interrupt driven zero copy Write only An efficient mode where an interrupt service routine transmits data directly from a write buffer, with not additional RAM required for intermediary storage, and no additional copy required.
Interrupt driven character queue Read and write A simple mode where FreeRTOS queues are used to buffer data between an interrupt service routine and the read or write operation.




[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ FreeRTOS+ Sitemap ]    [ Main FreeRTOS Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.