Go to file
Hmvp ffa97842e2
Improve clock frequency stuff for uninitialized clocks and add some examples (#64)
* Improve clock frequency stuff for uninitialized clocks

- Made clocks singletons so the frequency handling actually works as expected
- Added initial frequencies
- Improved the docs
- Added a Clock trait

* Add pico examples.

These have the benefit of knowing which external crystal is attached.
Even though it always should be a 12 MHz crystal.
Thus we can setup the clocks properly

I also changed the rp2040 examples to work out of the box for pico boards since that will probably be used most of the time
2021-07-26 20:24:58 +10:00
.cargo Add input support, examples, SIO/PADS ownership 2021-04-24 16:18:57 -05:00
.github/workflows Deny warnings in ci 2021-07-25 02:17:43 +10:00
boards Improve clock frequency stuff for uninitialized clocks and add some examples (#64) 2021-07-26 20:24:58 +10:00
rp2040-hal Improve clock frequency stuff for uninitialized clocks and add some examples (#64) 2021-07-26 20:24:58 +10:00
.gitignore Add input support, examples, SIO/PADS ownership 2021-04-24 16:18:57 -05:00
APACHE2.0 Initial Commit: Updated author information. 2021-01-22 09:18:12 -05:00
Cargo.toml Add Adafruit Macropad BSP 2021-07-26 10:04:36 +10:00
CODE_OF_CONDUCT.md Rename CONTRIBUTING.md to CODE_OF_CONDUCT.md 2021-01-28 16:31:47 -05:00
memory.x Add input support, examples, SIO/PADS ownership 2021-04-24 16:18:57 -05:00
MIT Initial Commit: Updated author information. 2021-01-22 09:18:12 -05:00
README.md Improve clock frequency stuff for uninitialized clocks and add some examples (#64) 2021-07-26 20:24:58 +10:00


Logo

rp-hal

A Rust HAL impl for the RP family of microcontrollers from the Raspberry Pi Foundation
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

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

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Installation

  1. Clone the repo or use the crate

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

    or

    cargo install rpXXXX-hal
    

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

Run examples

Install uf2conv and cargo-binutils as well as the llvm-tools-preview component:

cargo install uf2conv cargo-binutils
rustup component add llvm-tools-preview

For boards with uf2 flashloaders you can use the following lines to run the examples:

export RPI_MOUNT_FOLDER=/media/RPI-RP2/
export EXAMPLE=pico_blinky; # See `cargo check --example` for valid values
cargo check --example $EXAMPLE && \
cargo objcopy --release --example $EXAMPLE -- -O binary target/$EXAMPLE.bin && \
uf2conv target/$EXAMPLE.bin --base 0x10000000 --family 0xe48bff56 --output target/$EXAMPLE.uf2 && \
cp target/$EXAMPLE.uf2 $RPI_MOUNT_FOLDER

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).

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

Acknowledgements