|Tollos – device libraries|
Microcontroller applications consist of code running on the microcontroller which controls a variety of peripherals (devices). Some of these are included on the microcontroller chip itself (e.g., UART and I2C bus interfaces), and some are ‘hard wired’ on a development board (most have user-settable LEDs, for example). Other devices might be on the board itself or might be attached separately via some serial bus.
The low-level interfaces to peripherals vary significantly, so Tollos attempts to provide generic interfaces for common cases, for example:
These are intended to be useful for basic control of more than one specific device of the same kind, so these generic interface modules also require low-level glue functions, and these are held in device libraries. Tollos function names in device libraries all have the suffix ‘IO’.
For example, the Tollos generic interface for accelerometers is the tollosAcc module, which is part of the Tollos library. This invokes low-level functions such as accInitIO which are provided in the library for each device:
Hence, if a Tollos application only needs the basic functions provided in the generic interface then it can use either accelerometer device simply by linking with the chosen library. Even if more sophisticated functions are needed, the Tollos functions should allow a quick start with the device which can then be extended as required.
Let me know if you see a basic (and widely applicable) function missing from a Tollos generic interface. Note, however, that the purpose of the Tollos generic interfaces is to provide cross-device support, not to try and provide access to every feature of every device.
The following libraries are currently included in the Tollos download
|Tollos and these web pages were written by Mike Cowlishaw; Please send me any corrections, suggestions, etc.|
All content © Mike Cowlishaw, 2010–2012, except where marked
otherwise. All rights reserved. The pages here are for non-commercial
use only (see the separate licence for Tollos source code).
records no personal information and sets no ‘cookies’.
However, statistics, etc. might be recorded by the web hosting
This page was last updated on 2011-01-16 by mfc.