Renamed pico to rp-pico.

This commit is contained in:
Jonathan Pallant (Ferrous Systems) 2021-12-23 11:18:52 +00:00
parent 882868c104
commit 8f0a2788eb
15 changed files with 51 additions and 51 deletions

View file

@ -3,13 +3,13 @@ resolver = "2"
members = [
"rp2040-hal",
"boards/adafruit-feather-rp2040",
"boards/adafruit-qt-py-rp2040",
"boards/adafruit-itsy-bitsy-rp2040",
"boards/adafruit-kb2040",
"boards/pico",
"boards/adafruit-macropad",
"boards/adafruit-qt-py-rp2040",
"boards/pimoroni-pico-explorer",
"boards/pimoroni-pico-lipo-16mb",
"boards/adafruit-macropad",
"boards/rp-pico",
"boards/sparkfun-pro-micro-rp2040",
]

View file

@ -19,5 +19,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial release
[Unreleased]: https://github.com/rp-rs/rp-hal/compare/pico-v0.1.0...HEAD
[0.1.0]: https://github.com/rp-rs/rp-hal/releases/tag/pico-v0.1.0
[Unreleased]: https://github.com/rp-rs/rp-hal/compare/rp-pico-v0.1.0...HEAD
[0.1.0]: https://github.com/rp-rs/rp-hal/releases/tag/rp-pico-v0.1.0

View file

@ -1,5 +1,5 @@
[package]
name = "pico"
name = "rp-pico"
version = "0.1.0"
authors = ["evan <evanmolder@gmail.com>"]
edition = "2018"

View file

@ -1,4 +1,4 @@
# [pico] - Board Support for the [Raspberry Pi Pico]
# [rp-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.
@ -7,7 +7,7 @@ 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
[rp-pico]: https://github.com/rp-rs/rp-hal/tree/main/boards/rp-pico
[rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal
[Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/
@ -16,10 +16,10 @@ RP2040 chip according to how it is connected up on the Pico.
To use this crate, your `Cargo.toml` file should contain:
```toml
pico = "0.1.0"
rp-pico = "0.1.0"
```
In your program, you will need to call `pico::Pins::new` to create
In your program, you will need to call `rp_pico::Pins::new` to create
a new `Pins` structure. This will set up all the GPIOs for any on-board
devices. See the [examples](./examples) folder for more details.
@ -30,7 +30,7 @@ devices. See the [examples](./examples) folder for more details.
To compile an example, clone the _rp-hal_ repository and run:
```console
rp-hal/boards/pico $ cargo build --release --example <name>
rp-hal/boards/rp-pico $ cargo build --release --example <name>
```
You will get an ELF file called
@ -44,7 +44,7 @@ USB drive exported by the RP2040 bootloader, simply boot your board into
bootloader mode and run:
```console
rp-hal/boards/pico $ cargo run --release --example <name>
rp-hal/boards/rp-pico $ cargo run --release --example <name>
```
If you get an error about not being able to find `elf2uf2-rs`, try:

View file

@ -24,15 +24,15 @@ use embedded_time::rate::*;
use panic_halt as _;
// Pull in any important traits
use pico::hal::prelude::*;
use rp_pico::hal::prelude::*;
// A shorter alias for the Peripheral Access Crate, which provides low-level
// register access
use pico::hal::pac;
use rp_pico::hal::pac;
// A shorter alias for the Hardware Abstraction Layer, which provides
// higher-level drivers.
use pico::hal;
use rp_pico::hal;
/// Entry point to our bare-metal application.
///
@ -54,7 +54,7 @@ fn main() -> ! {
//
// The default is to generate a 125 MHz system clock
let clocks = hal::clocks::init_clocks_and_plls(
pico::XOSC_CRYSTAL_FREQ,
rp_pico::XOSC_CRYSTAL_FREQ,
pac.XOSC,
pac.CLOCKS,
pac.PLL_SYS,
@ -73,7 +73,7 @@ fn main() -> ! {
let sio = hal::Sio::new(pac.SIO);
// Set the pins up according to their function on this particular board
let pins = pico::Pins::new(
let pins = rp_pico::Pins::new(
pac.IO_BANK0,
pac.PADS_BANK0,
sio.gpio_bank0,

View file

@ -27,11 +27,11 @@ use panic_halt as _;
// A shorter alias for the Peripheral Access Crate, which provides low-level
// register access
use pico::hal::pac;
use rp_pico::hal::pac;
// A shorter alias for the Hardware Abstraction Layer, which provides
// higher-level drivers.
use pico::hal;
use rp_pico::hal;
#[entry]
fn main() -> ! {
@ -45,7 +45,7 @@ fn main() -> ! {
//
// The default is to generate a 125 MHz system clock
let _clocks = hal::clocks::init_clocks_and_plls(
pico::XOSC_CRYSTAL_FREQ,
rp_pico::XOSC_CRYSTAL_FREQ,
pac.XOSC,
pac.CLOCKS,
pac.PLL_SYS,
@ -64,7 +64,7 @@ fn main() -> ! {
let sio = hal::Sio::new(pac.SIO);
// Set the pins up according to their function on this particular board
let pins = pico::Pins::new(
let pins = rp_pico::Pins::new(
pac.IO_BANK0,
pac.PADS_BANK0,
sio.gpio_bank0,

View file

@ -24,11 +24,11 @@ use panic_halt as _;
// A shorter alias for the Peripheral Access Crate, which provides low-level
// register access
use pico::hal::pac;
use rp_pico::hal::pac;
// A shorter alias for the Hardware Abstraction Layer, which provides
// higher-level drivers.
use pico::hal;
use rp_pico::hal;
/// Entry point to our bare-metal application.
///
@ -49,7 +49,7 @@ fn main() -> ! {
let sio = hal::Sio::new(pac.SIO);
// Set the pins up according to their function on this particular board
let pins = pico::Pins::new(
let pins = rp_pico::Pins::new(
pac.IO_BANK0,
pac.PADS_BANK0,
sio.gpio_bank0,

View file

@ -28,15 +28,15 @@ use embedded_time::rate::*;
use panic_halt as _;
// Pull in any important traits
use pico::hal::prelude::*;
use rp_pico::hal::prelude::*;
// A shorter alias for the Peripheral Access Crate, which provides low-level
// register access
use pico::hal::pac;
use rp_pico::hal::pac;
// A shorter alias for the Hardware Abstraction Layer, which provides
// higher-level drivers.
use pico::hal;
use rp_pico::hal;
/// Prints the temperature received from the sensor
fn print_temperature(serial: &mut impl FmtWrite, temp: [u8; 2]) {
@ -66,7 +66,7 @@ fn main() -> ! {
//
// The default is to generate a 125 MHz system clock
let clocks = hal::clocks::init_clocks_and_plls(
pico::XOSC_CRYSTAL_FREQ,
rp_pico::XOSC_CRYSTAL_FREQ,
pac.XOSC,
pac.CLOCKS,
pac.PLL_SYS,
@ -81,7 +81,7 @@ fn main() -> ! {
let sio = hal::Sio::new(pac.SIO);
// Set the pins up according to their function on this particular board
let pins = pico::Pins::new(
let pins = rp_pico::Pins::new(
pac.IO_BANK0,
pac.PADS_BANK0,
sio.gpio_bank0,

View file

@ -24,15 +24,15 @@ use embedded_time::rate::*;
use panic_halt as _;
// Pull in any important traits
use pico::hal::prelude::*;
use rp_pico::hal::prelude::*;
// A shorter alias for the Peripheral Access Crate, which provides low-level
// register access
use pico::hal::pac;
use rp_pico::hal::pac;
// A shorter alias for the Hardware Abstraction Layer, which provides
// higher-level drivers.
use pico::hal;
use rp_pico::hal;
// The minimum PWM value (i.e. LED brightness) we want
const LOW: u16 = 0;
@ -60,7 +60,7 @@ fn main() -> ! {
//
// The default is to generate a 125 MHz system clock
let clocks = hal::clocks::init_clocks_and_plls(
pico::XOSC_CRYSTAL_FREQ,
rp_pico::XOSC_CRYSTAL_FREQ,
pac.XOSC,
pac.CLOCKS,
pac.PLL_SYS,
@ -75,7 +75,7 @@ fn main() -> ! {
let sio = hal::Sio::new(pac.SIO);
// Set the pins up according to their function on this particular board
let pins = pico::Pins::new(
let pins = rp_pico::Pins::new(
pac.IO_BANK0,
pac.PADS_BANK0,
sio.gpio_bank0,

View file

@ -3,12 +3,12 @@
use panic_halt as _;
#[rtic::app(device = pico::hal::pac, peripherals = true)]
#[rtic::app(device = rp_pico::hal::pac, peripherals = true)]
mod app {
use embedded_hal::digital::v2::OutputPin;
use embedded_time::duration::Extensions;
use pico::{
use rp_pico::{
hal::{self, clocks::init_clocks_and_plls, watchdog::Watchdog, Sio},
XOSC_CRYSTAL_FREQ,
};
@ -42,7 +42,7 @@ mod app {
.unwrap();
let sio = Sio::new(c.device.SIO);
let pins = pico::Pins::new(
let pins = rp_pico::Pins::new(
c.device.IO_BANK0,
c.device.PADS_BANK0,
sio.gpio_bank0,

View file

@ -21,11 +21,11 @@ use panic_halt as _;
// A shorter alias for the Peripheral Access Crate, which provides low-level
// register access
use pico::hal::pac;
use rp_pico::hal::pac;
// A shorter alias for the Hardware Abstraction Layer, which provides
// higher-level drivers.
use pico::hal;
use rp_pico::hal;
// USB Device support
use usb_device::{class_prelude::*, prelude::*};
@ -52,7 +52,7 @@ fn main() -> ! {
//
// The default is to generate a 125 MHz system clock
let clocks = hal::clocks::init_clocks_and_plls(
pico::XOSC_CRYSTAL_FREQ,
rp_pico::XOSC_CRYSTAL_FREQ,
pac.XOSC,
pac.CLOCKS,
pac.PLL_SYS,

View file

@ -16,7 +16,7 @@
use cortex_m_rt::entry;
// The macro for marking our interrupt functions
use pico::hal::pac::interrupt;
use rp_pico::hal::pac::interrupt;
// GPIO traits
use embedded_hal::digital::v2::OutputPin;
@ -29,15 +29,15 @@ use embedded_time::rate::*;
use panic_halt as _;
// Pull in any important traits
use pico::hal::prelude::*;
use rp_pico::hal::prelude::*;
// A shorter alias for the Peripheral Access Crate, which provides low-level
// register access
use pico::hal::pac;
use rp_pico::hal::pac;
// A shorter alias for the Hardware Abstraction Layer, which provides
// higher-level drivers.
use pico::hal;
use rp_pico::hal;
// USB Device support
use usb_device::{class_prelude::*, prelude::*};
@ -74,7 +74,7 @@ fn main() -> ! {
//
// The default is to generate a 125 MHz system clock
let clocks = hal::clocks::init_clocks_and_plls(
pico::XOSC_CRYSTAL_FREQ,
rp_pico::XOSC_CRYSTAL_FREQ,
pac.XOSC,
pac.CLOCKS,
pac.PLL_SYS,
@ -137,7 +137,7 @@ fn main() -> ! {
let sio = hal::Sio::new(pac.SIO);
// Set the pins up according to their function on this particular board
let pins = pico::Pins::new(
let pins = rp_pico::Pins::new(
pac.IO_BANK0,
pac.PADS_BANK0,
sio.gpio_bank0,

View file

@ -18,7 +18,7 @@
use cortex_m_rt::entry;
// The macro for marking our interrupt functions
use pico::hal::pac::interrupt;
use rp_pico::hal::pac::interrupt;
// Ensure we halt the program on panic (if we don't mention this crate it won't
// be linked)
@ -26,15 +26,15 @@ use panic_halt as _;
// Pull in any important traits
use embedded_time::fixed_point::FixedPoint;
use pico::hal::prelude::*;
use rp_pico::hal::prelude::*;
// A shorter alias for the Peripheral Access Crate, which provides low-level
// register access
use pico::hal::pac;
use rp_pico::hal::pac;
// A shorter alias for the Hardware Abstraction Layer, which provides
// higher-level drivers.
use pico::hal;
use rp_pico::hal;
// USB Device support
use usb_device::{class_prelude::*, prelude::*};
@ -72,7 +72,7 @@ fn main() -> ! {
//
// The default is to generate a 125 MHz system clock
let clocks = hal::clocks::init_clocks_and_plls(
pico::XOSC_CRYSTAL_FREQ,
rp_pico::XOSC_CRYSTAL_FREQ,
pac.XOSC,
pac.CLOCKS,
pac.PLL_SYS,