15 releases (9 breaking)

0.10.0 Mar 10, 2024
0.9.1 Nov 12, 2023
0.8.2 May 17, 2023
0.8.0 Feb 16, 2023
0.1.0 Jan 21, 2021

#25 in Embedded development

Download history 1529/week @ 2024-01-03 1875/week @ 2024-01-10 1837/week @ 2024-01-17 1932/week @ 2024-01-24 1997/week @ 2024-01-31 2273/week @ 2024-02-07 1897/week @ 2024-02-14 2398/week @ 2024-02-21 2461/week @ 2024-02-28 2639/week @ 2024-03-06 2946/week @ 2024-03-13 3112/week @ 2024-03-20 2958/week @ 2024-03-27 2460/week @ 2024-04-03 2612/week @ 2024-04-10 2401/week @ 2024-04-17

10,841 downloads per month
Used in 54 crates (49 directly)

MIT/Apache

675KB
13K SLoC


Logo

rp-hal

High-level Rust drivers for the Raspberry Silicon RP2040 Microcontroller
Explore the API docs »

View Demos · Report a Bug · Chat on Matrix

Table of Contents

  1. Introduction
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgements

Introduction

This is the rp2040-hal package - a library crate of high-level Rust drivers for the Raspberry Silicon RP2040 microcontroller, along with a collection of non-board specific example programs for you to study. You should use this crate in your application if you want to write code for the RP2040 microcontroller. The HAL in the name standards for Hardware Abstraction Layer, and comes from the fact that many of the drivers included implement the generic hardware-abstraction interfaces defined in the Rust Embedded Working Group's embedded-hal crate.

We also provide a series of Board Support Package (BSP) crates, which take this HAL crate and pre-configure the pins according to a specific PCB design. If you are using one of the supported boards, you should use one of those crates in preference, and return here to see documentation about specific peripherals on the RP2040 and how to use them. See the boards folder in https://github.com/rp-rs/rp-hal-boards/ for more details.

Getting Started

To include this crate in your project, amend your Cargo.toml file to include

rp2040-hal = "0.10.0"

To obtain a copy of the source code (e.g. if you want to propose a bug-fix or new feature, or simply to study the code), run:

$ git clone https://github.com/rp-rs/rp-hal.git

For details on how to program an RP2040 microcontroller, see the top-level rp-hal README.

Roadmap

NOTE This HAL is under active development. As such, it is likely to remain volatile until a 1.0.0 release.

See the open issues for a list of proposed features (and known issues).

Implemented traits

This crate aims to implement all traits from embedded-hal, both version 0.2 and 1.0. They can be used at the same time, so you can upgrade drivers incrementally.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT OR Apache2.0 License. See MIT or APACHE2.0 for more information.

Contact

Project Link: https://github.com/rp-rs/rp-hal/issues Matrix: #rp-rs:matrix.org

Acknowledgements

Dependencies

~8MB
~165K SLoC