Code Monkey home page Code Monkey logo

.github's Introduction

libhal

โœ…CI GitHub stars GitHub forks GitHub issues

The foundation of the libhal ecosystem, containing the core hardware interfaces used to make the whole ecosystem work.

๐Ÿ“š Software APIs & Usage

To learn about the available drivers and APIs see the API Reference documentation page or look at the include/libhal directory.

๐Ÿงฐ Setup

Following the ๐Ÿš€ Getting Started instructions.

๐Ÿ“ฆ Adding libhal to your project

This section assumes you are using the libhal-starter project.

Add the following to your requirements() method to the ConanFile class:

    def requirements(self):
          self.requires("libhal/[^4.0.0]", transitive_headers=True)

The version number can be changed to whatever is appropriate for your application. If you don't know, using the latest is usually a good choice.

Normally, this is not done, as usually libhal is into the code base via implementation libraries such libhal-lpc40 and libhal-stm32f1 for peripheral drivers, or, libhal-esp8266 and libhal-mpu for device drivers.

๐Ÿ‘ฅ Contributing

See CONTRIBUTING.md for details.

License

Apache 2.0; see LICENSE for details.

.github's People

Contributors

kammce avatar malialabor avatar

Forkers

malialabor

.github's Issues

Add `pico-sdk` & `libhal-rp2040` library

The pico-sdk code is BSD-3 which is compatible with libhal's Apache 2 license. We should make a 3P library for the pico-sdk, have libhal-rp2040 require it and use it to implement the libhal interfaces. Unlike NXP and STM software with restrictive licenses, we can simply borrow code from the pico sdk. Note that I strongly feel that the libhal team should implement drivers for SDKs with problematic code. But if the software is shown to work well and is stable, then we should opt for the faster option of utilizing the software that already exists.

Note about ST's license. I plan to use the libhal-stm32f1 and any others that we support with copycat hardware from gigadevice to the others. From ARM to RISC-V. The drivers work as expected, but need to be mapped to different locations. If we had used the original st software, we wouldn't be able to do this and their SDK wouldn't be designed in a way that makes it easy for us to port to the copy cats.

Add `llvm` or `clang` conan package to make cross compiler installation easier

Using a package to download the binaries for clang and llvm will prove very helpful in the future as currently, users tend to have issues with ensuring that the correct version of clang or llvm is used. Even with the path to the c and c++ compilers set in the profiles, they still need to ensure that the compiler is preinstalled on their machine. We could elevate this need and move everything to conan to make the setup requirements simpler.

Devs using libhal may still want to install llvm and clang on their machines simply to use clangd. But if we could figure out a way to use the clangd from our package in a way that doesn't get nuked when the the .conan2/ folder gets deleted. Or if possible, somehow ensure that the path to llvm/clang package is the same between installs.

[epic] Low Power State Story

libhal does not have a low power story which means that libhal cannot provide a consistent pattern for putting devices into low power. This should be investigated to determine the categories of low power states and how those could be applied to libhal libraries. I could imagine that there are the following low power categories:

  • low_power(): Put the device into an idle mode that requires very little work to reactivate
  • deep_sleep(): Like low power but a bit deeper and may require some startup time before the APIs resolve themselves.
  • shutdown(): Completely turn off the device. The assumption is that the device loses all state in this mode and would need to be reinitialized to allow APIs to work.

Note

If you are interested in helping build this story, comment and I can add you as an assignee.

Use a single yaml script to deploy any version

Rather than a new yaml script for each deployment version, just have a single one that reads the tag version it is launched against. If a different version of CI is required to work with this, then an additional yaml script can be made just for those older versions.

We get the same benefit as we did before without needing to make a new file each time which is tedious. I'm not sure why I didn't think of doing this originally.

Add repo `libhal-doom`

libhal-doom takes the portable doom code and implements it using libhal interfaces and drivers. A suitable MVP for this project is the ability to use libhal-micromod, a display following libhal's display interface, and the wii classic controller and play doom. With the libhal-micromod project you should be able to compile for every single MicroMod libhal supports so long as it has the components to drive the display and i2c to talk to the controller.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.