mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-23 04:31:30 +11:00
Update README with examples (#124)
* Update CoC with copy from REWG. * Expand on HAL and BSP crates. * Expand on contribution process and acknowledgements.
This commit is contained in:
parent
904b6f0ab9
commit
dd3c136650
|
@ -1 +1,39 @@
|
|||
Contribution to these projects is organized under the terms of the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct)
|
||||
# The Rust Code of Conduct
|
||||
|
||||
## Conduct
|
||||
|
||||
**Contact**: [rp-rs team][team]
|
||||
|
||||
* We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic.
|
||||
* On IRC, please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all.
|
||||
* Please be kind and courteous. There's no need to be mean or rude.
|
||||
* Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.
|
||||
* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
|
||||
* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behavior. We interpret the term "harassment" as including the definition in the [Citizen Code of Conduct](http://citizencodeofconduct.org/); if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don't tolerate behavior that excludes people in socially marginalized groups.
|
||||
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [rp-rs team][team] immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back.
|
||||
* Likewise any spamming, trolling, flaming, baiting or other attention-stealing behavior is not welcome.
|
||||
|
||||
## Moderation
|
||||
|
||||
These are the policies for upholding our community's standards of conduct.
|
||||
|
||||
1. Remarks that violate the Rust standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.)
|
||||
2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed.
|
||||
3. Moderators will first respond to such remarks with a warning.
|
||||
4. If the warning is unheeded, the user will be "kicked," i.e., kicked out of the communication channel to cool off.
|
||||
5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded.
|
||||
6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology.
|
||||
7. If a moderator bans someone and you think it was unjustified, please take it up with that moderator, or with a different moderator, **in private**. Complaints about bans in-channel are not allowed.
|
||||
8. Moderators are held to a higher standard than other community members. If a moderator creates an inappropriate situation, they should expect less leeway than others.
|
||||
|
||||
In the Rust community we strive to go the extra step to look out for each other. Don't just aim to be technically unimpeachable, try to be your best self. In particular, avoid flirting with offensive or sensitive issues, particularly if they're off-topic; this all too often leads to unnecessary fights, hurt feelings, and damaged trust; worse, it can drive people away from the community entirely.
|
||||
|
||||
And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could've communicated better — remember that it's your responsibility to make your fellow Rustaceans comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust.
|
||||
|
||||
The enforcement policies listed above apply to all official embedded rp-rs venues; including official Matrix channels (##rp-rs) and GitHub repositories under rp-rs.
|
||||
|
||||
*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](https://www.contributor-covenant.org/version/1/3/0/).*
|
||||
|
||||
*Text kindly borrowed from the Rust Embedded Working Group*
|
||||
|
||||
[team]: https://github.com/orgs/rp-rs/teams/rp-rs
|
||||
|
|
133
README.md
133
README.md
|
@ -39,14 +39,102 @@
|
|||
<!-- GETTING STARTED -->
|
||||
## Packages
|
||||
|
||||
- [rp2040-hal](https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal)
|
||||
- Board Support Packages:
|
||||
- [Adafruit Macropad](https://github.com/rp-rs/rp-hal/tree/main/boards/adafruit_macropad)
|
||||
- [Adafruit Feather RP2040](https://github.com/rp-rs/rp-hal/tree/main/boards/feather_rp2040)
|
||||
- [Raspberry Pi Pico](https://github.com/rp-rs/rp-hal/tree/main/boards/pico)
|
||||
- [Pimoroni Pico Explorer](https://github.com/rp-rs/rp-hal/tree/main/boards/pico_explorer)
|
||||
- [Pimoroni Pico Lipo 16mb](https://github.com/rp-rs/rp-hal/tree/main/boards/pico_lipo_16mb)
|
||||
This git repository is organised as a [Cargo Workspace].
|
||||
|
||||
There is a _Hardware Abstraction Layer_ (or HAL) crate for the RP2040 chip,
|
||||
and _Board Support Package_ crates for a number of RP2040 based PCBs. If you
|
||||
are writing code that should run on any microcontroller, consider using the
|
||||
generic Rust Embedded Working Group's [Embedded HAL].
|
||||
|
||||
If you are writing code that should work on any RP2040 device, use the _HAL_
|
||||
crate. If you are running code on a specific board, use the appropriate _BSP_
|
||||
crate (which will include the _HAL_ crate for you). Please note, you cannot
|
||||
depend on multiple _BSP_ crates; you have to pick one, or use [Cargo Features]
|
||||
to select one at build time.
|
||||
|
||||
Each BSP will include some examples to show off the features of that particular board.
|
||||
|
||||
[Cargo Workspace]: https://doc.rust-lang.org/cargo/reference/workspaces.html]
|
||||
[Embedded HAL]: https://github.com/rust-embedded/embedded-hal
|
||||
[Cargo Features]: https://doc.rust-lang.org/cargo/reference/features.html
|
||||
|
||||
### [rp2040-hal] - The HAL for the [Raspberry Pi Silicon RP2040]
|
||||
|
||||
You should include this crate in your project if you want to write a driver or
|
||||
library that runs on the [Raspberry Pi Silicon RP2040], or if you are writing a Board
|
||||
Support Package (see later on).
|
||||
|
||||
The crate provides high-level drivers for the RP2040's internal peripherals,
|
||||
such as the SPI Controller and the I²C Controller. It doesn't know anything
|
||||
about how your particular board is wired up (such as what each IO pin of the
|
||||
RP2040 is connected to).
|
||||
|
||||
There are examples in this crate to show how to use various peripherals
|
||||
(GPIO, I²C, SPI, UART, etc) but note that the pin-outs may not match any
|
||||
particular board.
|
||||
|
||||
[rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal
|
||||
[Raspberry Pi Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/
|
||||
|
||||
### [pico] - Board Support for the [Raspberry Pi Pico]
|
||||
|
||||
You should include this crate if you are writing code that you want to run on
|
||||
a [Raspberry Pi Pico] - the original launch PCB for the RP2040 chip.
|
||||
|
||||
This crate includes the [rp2040-hal], but also configures each pin of the
|
||||
RP2040 chip according to how it is connected up on the Pico.
|
||||
|
||||
[Raspberry Pi Pico]: https://www.raspberrypi.org/products/raspberry-pi-pico/
|
||||
[pico]: https://github.com/rp-rs/rp-hal/tree/main/boards/pico
|
||||
|
||||
### [adafruit_macropad] - Board Support for the [Adafruit Macropad]
|
||||
|
||||
You should include this crate if you are writing code that you want to run on
|
||||
an [Adafruit Macropad] - a 3x4 keyboard and OLED combo board from Adafruit.
|
||||
|
||||
This crate includes the [rp2040-hal], but also configures each pin of the
|
||||
RP2040 chip according to how it is connected up on the Macropad.
|
||||
|
||||
[adafruit_macropad]: https://github.com/rp-rs/rp-hal/tree/main/boards/adafruit_macropad
|
||||
[Adafruit Macropad]: https://www.adafruit.com/product/5128
|
||||
|
||||
### [feather_rp2040] - Board Support for the [Adafruit Feather RP2040]
|
||||
|
||||
You should include this crate if you are writing code that you want to run on
|
||||
an [Adafruit Feather RP2040] - a Feather form-factor RP2040 board from Adafruit.
|
||||
|
||||
This crate includes the [rp2040-hal], but also configures each pin of the
|
||||
RP2040 chip according to how it is connected up on the Feather RP2040.
|
||||
|
||||
[Adafruit Feather RP2040]: https://www.adafruit.com/product/4884
|
||||
[feather_rp2040]: https://github.com/rp-rs/rp-hal/tree/main/boards/feather_rp2040
|
||||
|
||||
### [pico_explorer] - Board Support for the [Pimoroni Pico Explorer]
|
||||
|
||||
You should include this crate if you are writing code that you want to run on
|
||||
a [Pimoroni Pico Explorer] - a board featuring a small LCD screen, a
|
||||
breadboard and some breakout headers.
|
||||
|
||||
This crate includes the [rp2040-hal], but also configures each pin of the
|
||||
RP2040 chip according to how it is connected up on the Pico Explorer.
|
||||
|
||||
[Pimoroni Pico Explorer]: https://shop.pimoroni.com/products/pico-explorer-base
|
||||
[pico_explorer]: https://github.com/rp-rs/rp-hal/tree/main/boards/pico_explorer
|
||||
|
||||
### [pico_lipo_16mb] - Board Support for the [Pimoroni Pico Lipo 16MB]
|
||||
|
||||
You should include this crate if you are writing code that you want to run on
|
||||
a [Pimoroni Pico Lipo 16MB] - a board with USB-C, STEMMA QT/Qwiic connectors,
|
||||
plus a Li-Po battery charging circuit.
|
||||
|
||||
This crate includes the [rp2040-hal], but also configures each pin of the
|
||||
RP2040 chip according to how it is connected up on the Pico Liop.
|
||||
|
||||
Note that if you use this crate the compiler will expect the full 16MB flash
|
||||
space, and so it may not work if you only have the 4MB variant.
|
||||
|
||||
[Pimoroni Pico Lipo 16MB]: https://shop.pimoroni.com/products/pimoroni-pico-lipo?variant=39335427080275
|
||||
[pico_lipo_16mb]: https://github.com/rp-rs/rp-hal/tree/main/boards/pico_lipo_16mb
|
||||
|
||||
<!-- ROADMAP -->
|
||||
## Roadmap
|
||||
|
@ -61,20 +149,37 @@ See the [open issues](https://github.com/rp-rs/rp-hal/issues) for a list of prop
|
|||
|
||||
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
|
||||
The steps are:
|
||||
|
||||
1. Fork the Project by clicking the 'Fork' button at the top of the page.
|
||||
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
|
||||
3. Make some changes to the code or documentation.
|
||||
4. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
|
||||
5. Push to the Feature Branch (`git push origin feature/AmazingFeature`)
|
||||
6. Create a [New Pull Request](https://github.com/rp-rs/rp-hal/pulls)
|
||||
7. An admin will review the Pull Request and discuss any changes that may be required.
|
||||
8. Once everyone is happy, the Pull Request can be merged by an admin, and your work is part of our project!
|
||||
|
||||
<!-- CODE OF CONDUCT -->
|
||||
## Code of Conduct
|
||||
|
||||
Contribution to this crate is organized under the terms of the [Rust Code of
|
||||
Conduct][CoC], and the maintainer of this crate, the [rp-rs team], promises
|
||||
to intervene to uphold that code of conduct.
|
||||
|
||||
[CoC]: CODE_OF_CONDUCT.md
|
||||
[rp-rs team]: https://github.com/orgs/rp-rs/teams/rp-rs
|
||||
|
||||
<!-- LICENSE -->
|
||||
## License
|
||||
|
||||
Distributed under the MIT OR Apache2.0 License. See `MIT` or `APACHE2.0` for more information.
|
||||
|
||||
The contents of this repository are dual-licensed under the _MIT OR Apache
|
||||
2.0_ License. That means you can chose either the MIT licence or the
|
||||
Apache-2.0 when you re-use this code. See `MIT` or `APACHE2.0` for more
|
||||
information on each specific licence.
|
||||
|
||||
Any submissions to this project (e.g. as Pull Requests) must be made available
|
||||
under these terms.
|
||||
|
||||
<!-- CONTACT -->
|
||||
## Contact
|
||||
|
@ -87,3 +192,5 @@ Matrix: [#rp-rs:matrix.org](https://matrix.to/#/#rp-rs:matrix.org)
|
|||
## Acknowledgements
|
||||
|
||||
* [Othneil Drew's README template](https://github.com/othneildrew)
|
||||
* [Rust Embedded Working Group](https://github.com/rust-embedded)
|
||||
* [Raspberry Pi](https://raspberrypi.org) and the [Pico SDK](https://github.com/raspberrypi/pico-sdk)
|
||||
|
|
Loading…
Reference in a new issue