AMiRo-LLD

This low-level driver (LLD) library is mainly developed on the context of the AMiRo platform, but is platform independent by design.
Besides the increasing number of drivers its main feature is the platform independent periphery abstraction layer periphAL.


periphAL (periphery abstraction layer)

The periphery abstraction layer of AMiRo-LLD defines interface functions for debugging and accessing hardware interfaces like GPIOs, I²C, SPI, etc.
While defined by AMiRo-LLD (see source:amiro-lld|templates/periphAL.h), the interface must be implemented by the code incorporating AMiRo-LLD, typically an operating system.
All data structures and types are defined in a dedicated header (source:amiro-lld|periphALtypes.h), which should be used as-is by any implementation.
The reference implementation is - of course - given in AMiRo-OS: source:amiro-os|periphery-lld/periphAL.h and source:amiro-os|periphery-lld/periphAL.c resprectively.


LLD library structure

All low-level drivers are usually named identically to the component name.
Furthermore, there are additional sub-folders for each driver to support multiple implementations like vast overhauls without breaking existing software, which can still uses the legacy driver version.
Additional makefiles are provided to allow smooth integration of the library.


configuration

AMiRo-LLD expects the header file amirolldconf.h to be available in the project include paths.
The purposes of this file are:
  • version checks
  • periphAL configuration (e.g. with of time type)
  • LLD specific parameters

Especially the latter can be very useful for configuration of individual drivers at compile time.
If, for instance, a component supports both UART and SPI, an according flag can be used to select one of those interfaces at compile time so to reduce code size.