Skip to content

Commit 98baabe

Browse files
committed
Added skeleton for HAL and updated readme
1 parent 22a3669 commit 98baabe

20 files changed

+67
-18
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea/

README.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,7 @@
2727
<details open="open">
2828
<summary><h2 style="display: inline-block">Table of Contents</h2></summary>
2929
<ol>
30-
<li>
31-
<a href="#about-the-project">About The Project</a>
32-
<ul>
33-
<li><a href="#built-with">Built With</a></li>
34-
</ul>
35-
</li>
36-
<li>
30+
<li>
3731
<a href="#getting-started">Getting Started</a>
3832
<ul>
3933
<li><a href="#prerequisites">Prerequisites</a></li>
@@ -81,6 +75,8 @@ For more examples, please refer to the [Documentation](https://github.com/rp-rs/
8175
<!-- ROADMAP -->
8276
## Roadmap
8377

78+
NOTE This HAL is under active development. As such, it is likely to remain volatile until a 1.0.0 release.
79+
8480
See the [open issues](https://github.com/rp-rs/rp-hal/issues) for a list of proposed features (and known issues).
8581

8682

File renamed without changes.

boards/pico-bsc/Cargo.toml boards/pico-bsp/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
2-
name = "pico-bsc"
2+
name = "pico-bsp"
33
version = "0.1.0"
44
authors = ["evan <[email protected]>"]
55
edition = "2018"
66
homepage = "https://github.com/rp-rs/rp-hal/boards/pico-bsc"
7-
description = "Board Support Crate for the Raspberry Pi Pico"
7+
description = "Board Support Package for the Raspberry Pi Pico"
88
license = "MIT OR Apache-2.0"
99

1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
File renamed without changes.
File renamed without changes.

rp2040-hal/Cargo.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ license = "MIT OR Apache-2.0"
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
rp2040-pac = "0.1.0"
14-
embedded-hal = "1.0.0-alpha.4"
13+
cortex-m = "0.7.1"
14+
embedded-hal = "0.2.4"
15+
nb = "1.0.0"
16+
rp2040-pac = "0.1.1"

rp2040-hal/src/adc.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Analog-Digital Converter (ADC)
2+
// See [Chapter 4 Section 9](https://datasheets.raspberrypi.org/rp2040/rp2040_datasheet.pdf) for more details
3+
// TODO

rp2040-hal/src/i2c.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Inter-Integrated Circuit (I2C) bus
2+
// See [Chapter 4 Section 3](https://datasheets.raspberrypi.org/rp2040/rp2040_datasheet.pdf) for more details
3+
// TODO

rp2040-hal/src/lib.rs

+25-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
1-
#[cfg(test)]
2-
mod tests {
3-
#[test]
4-
fn it_works() {
5-
assert_eq!(2 + 2, 4);
6-
}
7-
}
1+
//! HAL for the RP2040 microcontroller
2+
//!
3+
//! This is an implementation of the [`embedded-hal`] traits for the RP2040 microcontroller
4+
//! NOTE This HAL is still under active development. This API will remain volatile until 1.0.0
5+
6+
#![deny(missing_docs)]
7+
#![deny(warnings)]
8+
#![no_std]
9+
10+
extern crate cortex_m;
11+
extern crate embedded_hal as hal;
12+
extern crate nb;
13+
pub extern crate rp2040_pac as pac;
14+
15+
pub mod adc;
16+
pub mod i2c;
17+
pub mod prelude;
18+
pub mod pwm;
19+
pub mod rtc;
20+
pub mod spi;
21+
pub mod ssi;
22+
pub mod timer;
23+
pub mod uart;
24+
pub mod usb;
25+
pub mod watchdog;

rp2040-hal/src/prelude.rs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//! Prelude

rp2040-hal/src/pwm.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Pulse Width Modulation (PWM)
2+
// See [Chapter 4 Section 5](https://datasheets.raspberrypi.org/rp2040/rp2040_datasheet.pdf) for more details
3+
// TODO

rp2040-hal/src/rtc.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Real Time Clock (RTC)
2+
// See [Chapter 4 Section 8](https://datasheets.raspberrypi.org/rp2040/rp2040_datasheet.pdf) for more details
3+
// TODO

rp2040-hal/src/spi.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Serial Peripheral Interface (SPI)
2+
// See [Chapter 4 Section 4](https://datasheets.raspberrypi.org/rp2040/rp2040_datasheet.pdf) for more details
3+
// TODO

rp2040-hal/src/ssi.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Synchronous Serial Interface (SSI)
2+
// See [Chapter 4 Section 10](https://datasheets.raspberrypi.org/rp2040/rp2040_datasheet.pdf) for more details
3+
// TODO

rp2040-hal/src/time.rs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//! Time units

rp2040-hal/src/timer.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Timers
2+
// See [Chapter 4 Section 6](https://datasheets.raspberrypi.org/rp2040/rp2040_datasheet.pdf) for more details
3+
// TODO

rp2040-hal/src/uart.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Universal asynchronous receiver-transmitter (UART)
2+
// See [Chapter 4 Section 2](https://datasheets.raspberrypi.org/rp2040/rp2040_datasheet.pdf) for more details
3+
// TODO

rp2040-hal/src/usb.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Universal Serial Bus (USB)
2+
// See [Chapter 4 Section 1](https://datasheets.raspberrypi.org/rp2040/rp2040_datasheet.pdf) for more details
3+
// TODO

rp2040-hal/src/watchdog.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//! Watchdog
2+
// See [Chapter 4 Section 7](https://datasheets.raspberrypi.org/rp2040/rp2040_datasheet.pdf) for more details
3+
// TODO

0 commit comments

Comments
 (0)