Crates.io | lpc55-hal |
lib.rs | lpc55-hal |
version | 0.4.0 |
source | src |
created_at | 2020-01-06 01:16:46.803808 |
updated_at | 2024-10-25 09:31:42.232429 |
description | Hardware Abstraction Layer (HAL) for the NXP LPC55S6x ARM Cortex-33 microcontrollers |
homepage | |
repository | https://github.com/lpc55/lpc55-hal |
max_upload_size | |
id | 195639 |
size | 551,272 |
Hardware Abstraction Layer (HAL) for NXP LPC55 series Cortex-M33 microcontrollers, written in Rust.
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.
Very much work-in-progress!
Current peripherals that mostly work:
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.
The API documentation is located at https://docs.rs/lpc55-hal.
In addition, make fetch-docs
downloads various vendor-supplied documentation:
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
To install rust, follow the install instructions from here: https://rust-embedded.github.io/book/intro/install.html
You also need following targets:
Just use following command:
rustup target add thumbv8m.main-none-eabi
rustup target add thumbv8m.main-none-eabihf
Apache-2.0 or MIT.
Parts of the code are directly lifted from the LPC8xx HAL, others from the various STM32 HALs.