2021-01-23 01:18:12 +11:00
<!-- PROJECT LOGO -->
< br / >
< p align = "center" >
< a href = "https://github.com/rp-rs/rp2040-hal" >
< img src = "https://www.svgrepo.com/show/281119/microchip.svg" alt = "Logo" width = "140" height = "140" >
< / a >
< h3 align = "center" > rp-hal< / h3 >
< p align = "center" >
A Rust HAL impl for the RP family of microcontrollers from the Raspberry Pi Foundation
< br / >
< a href = "https://github.com/rp-rs/rp-hal" > < strong > Explore the docs »< / strong > < / a >
< br / >
< br / >
< a href = "https://github.com/rp-rs/rp-hal" > View Demo< / a >
·
< a href = "https://github.com/rp-rs/rp-hal/issues" > Report Bug< / a >
·
< a href = "https://github.com/rp-rs/rp-hal/issues" > Request Feature< / a >
< / p >
< / p >
<!-- TABLE OF CONTENTS -->
< details open = "open" >
< summary > < h2 style = "display: inline-block" > Table of Contents< / h2 > < / summary >
< ol >
2021-01-26 07:42:43 +11:00
< li >
2021-01-23 01:18:12 +11:00
< a href = "#getting-started" > Getting Started< / a >
< ul >
< li > < a href = "#prerequisites" > Prerequisites< / a > < / li >
< li > < a href = "#installation" > Installation< / a > < / li >
< / ul >
< / li >
< li > < a href = "#usage" > Usage< / a > < / li >
< li > < a href = "#roadmap" > Roadmap< / a > < / li >
< li > < a href = "#contributing" > Contributing< / a > < / li >
< li > < a href = "#license" > License< / a > < / li >
< li > < a href = "#contact" > Contact< / a > < / li >
< li > < a href = "#acknowledgements" > Acknowledgements< / a > < / li >
< / ol >
< / details >
<!-- GETTING STARTED -->
## Getting Started
To get a local copy up and running follow these simple steps.
### Prerequisites
* A [Rust ](https://www.rust-lang.org/tools/install ) toolchain
### Installation
1. Clone the repo or use the crate
2021-07-26 20:24:58 +10:00
```sh
2021-01-23 01:18:12 +11:00
git clone https://github.com/rp-rs/rp-hal
```
2021-07-26 20:24:58 +10:00
or
```sh
2021-01-23 01:18:12 +11:00
cargo install rpXXXX-hal
```
<!-- USAGE EXAMPLES -->
## Usage
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the [Documentation ](https://github.com/rp-rs/rp-hal )
2021-07-26 20:24:58 +10:00
### Run examples
2021-01-23 01:18:12 +11:00
2021-07-31 08:20:32 +10:00
#### UF2
For boards with uf2 flashloaders like the raspberry pi pico. Install [`elf2uf2-rs` ](https://github.com/JoNil/elf2uf2-rs ):
2021-07-26 20:24:58 +10:00
```sh
2021-07-31 08:20:32 +10:00
cargo install elf2uf2-rs
2021-07-26 20:24:58 +10:00
```
2021-07-31 08:20:32 +10:00
Make sure .cargo/config contains the following (it should by default):
```toml
runner = "elf2uf2-rs -d"
```
2021-07-26 20:24:58 +10:00
```sh
2021-07-31 08:20:32 +10:00
cargo run --example pico_pwm_blink # Run `cargo run --example` for more examples
2021-07-26 20:24:58 +10:00
```
2021-01-23 01:18:12 +11:00
<!-- ROADMAP -->
## Roadmap
2021-01-26 07:42:43 +11:00
NOTE This HAL is under active development. As such, it is likely to remain volatile until a 1.0.0 release.
2021-01-23 01:18:12 +11:00
See the [open issues ](https://github.com/rp-rs/rp-hal/issues ) for a list of proposed features (and known issues).
<!-- CONTRIBUTING -->
## 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 -->
## License
Distributed under the MIT OR Apache2.0 License. See `MIT` or `APACHE2.0` for more information.
<!-- CONTACT -->
## Contact
Project Link: [https://github.com/rp-rs/rp-hal/issues ](https://github.com/rp-rs/rp-hal/issues )
<!-- ACKNOWLEDGEMENTS -->
## Acknowledgements
* [Othneil Drew's README template ](https://github.com/othneildrew )