Skip to content

Minimalistic platform/hardware abstraction layer

License

LGPL-3.0 and 2 other licenses found

Licenses found

LGPL-3.0
LICENSE
GPL-3.0
COPYING
LGPL-3.0
COPYING.LESSER
Notifications You must be signed in to change notification settings

lexus2k/tinyhal

TinyHal
Build Status Coverage Status Documentation

Introduction

Tinyhal is platform / hardware abstraction layer library that implements synchronization objects, time count functions, some hardware related API for different platforms in C-style API, making available to write platform independent code. It is intended to be used for the systems with low resources. It is also can be compiled for desktop Linux system, and it can be built it for Windows.

Key Features

Main features:

  • Serial port support (Windows & Linux)
  • Mutex
  • Event Groups
  • Time tick functions

Supported platforms

  • Any platform, where C/C++ compiler is available (C99, C++11)
  • If platform is not supported, the library will use default implementation (no_platform)

Easy to use

Usage of light TinyHal in C can look like this:

#include "hal/tiny_types.h"

tiny_mutex_t mutex;
...
    tiny_mutex_create(&mutex);
    tiny_mutex_lock(&mutex);
    tiny_mutex_unlock(&mutex);
    tiny_mutex_destroy(&mutex);

How to build

Linux

make
# === OR ===
mkdir build
cd build
cmake ..
make

Windows

mkdir build
cd build
cmake -G "Visual Studio 16 2019" ..

Setting up

For more information about this library, please, visit https://github.com/lexus2k/tinyhal. Doxygen documentation can be found at codedocs.xyz site. If you found any problem or have any idea, please, report to Issues section.

License

Copyright 2016-2020 (C) Alexey Dynda

This file is part of Tiny HAL Library.

Tiny HAL Library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Tiny HAL Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Tiny HAL Library. If not, see http://www.gnu.org/licenses/.