lpc55s6x-hal

Crates.iolpc55s6x-hal
lib.rslpc55s6x-hal
version0.0.2
sourcesrc
created_at2019-08-17 23:52:10.969373
updated_at2019-11-09 01:47:50.350008
descriptionHardware Abstraction Layer (HAL) for the NXP LPC55S6x ARM Cortex-33 microcontrollers
homepage
repositoryhttps://github.com/nickray/lpc55s6x-hal
max_upload_size
id157719
size329,243
Nicolas Stalder (nickray)

documentation

https://docs.rs/lpc55s6x-hal

README

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

LPC55S6x HAL provides a high-level interface to the features of these LPC55S6x 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 RTFM, a concurrency framework supporting preemptive multitasking with minimal footprint.

crates.io Documentation LICENSE Build Status

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-rtfm v0.5.

Documentation

The API documentation is located at https://docs.rs/lpc55s6x-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=rtfm_led  # or any other example

License

Apache-2.0 or MIT.

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

Commit count: 225

cargo fmt