next up previous
Next: The A/D Driver Up: Enhancing RTiC-Lab Previous: Adding Tokens

Writing Modules for the Embedded System (Creating I/O Drivers)

There are two reasons why you would need to even consider looking at this section.

  1. You need to tune the performance of your I/O board such as setting up the I/O base address, or the gain values for each of the boards and would like to understand the structure of the I/O driver.

  2. None of the existent I/O drivers work on your specific I/O hardware.

Whichever case applies to you, it turns out that writing a device driver for either RTiC-Lab or RTLinux in general is quite a simple process.

All of the files associated with the I/O boards are located under the directories:

The API that the device writer must use, however, is slightly different that one would be normally used to. The following describes the API as declared in RTiC-Lab. Generally speaking, the API described below has the exact same functionality as its Linux-specific lowercase counterpart. However, the difference is that whenever the user defines the noIO token in the user's user_GUI.par, then all I/O will be blocked. This is especially useful for controller logic debugging purposes.

The basic API is defined as follows:

If you create any new device drivers or enhance any of the existing ones, then you are encouraged to submit it to efhilton@fsmlabs.com for inclusion in future revisions of RTiC-Lab.



Subsections
next up previous
Next: The A/D Driver Up: Enhancing RTiC-Lab Previous: Adding Tokens
Michael Barabanov 2001-06-19