Giter Club home page Giter Club logo

lpc55-hal's Introduction

Hardware Abstraction Layer (HAL) for NXP LPC55 series Cortex-M33 microcontrollers, written in Rust.

Build Status crates.io LICENSE Documentation Documentation (master)

LPC55 HAL provides a high-level interface to the features of these LPC55 family of MCUs, which is safe, convenient and efficient. It leverages Rust's type system to prevent common mistakes, such as attempting to use an uninitialized peripheral; these will be caught by compile-time errors.

This library implements the embedded-hal, a collection of traits intended to abstract over platform-dependencies, allowing firmware and drivers to be quite portable.

It also implements the usb-device framework.

Moreover, this library is compatible with the Cortex-M implementation of RTIC, a concurrency framework supporting preemptive multitasking with minimal footprint.

Status

Very much work-in-progress!

Current peripherals that mostly work:

  • I2C, SPI, Serial (with all pins)
  • USB FS device

Next up will be:

See also the low-level companion library LPC55S6x PAC.

This HAL is intended to work with cortex-m-rtic v0.5.

Documentation

The API documentation is located at https://docs.rs/lpc55-hal.

In addition, make fetch-docs downloads various vendor-supplied documentation:

Examples

The intention of the examples/ is to showcase the functionality of this library.

They run on the LPCXpresso55S69 development board.

After flashing J-Link firmware on the on-board LPCXpresso V2 debugger:

# in one terminal
make jlink

# in another terminal
make run-example EXAMPLE=rtic_led  # or any other example

Setup

To install rust, follow the install instructions from here: https://rust-embedded.github.io/book/intro/install.html

You also need following targets:

  • thumbv8m.main-none-eabi
  • thumbv8m.main-none-eabihf

Just use following command:

  rustup target add thumbv8m.main-none-eabi
  rustup target add thumbv8m.main-none-eabihf

License

Apache-2.0 or MIT.

Parts of the code are directly lifted from the LPC8xx HAL, others from the various STM32 HALs.

lpc55-hal's People

Contributors

nickray avatar conorpp avatar samueltardieu avatar robin-nitrokey avatar jolo1581 avatar

Stargazers

 avatar

Watchers

 avatar

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.