From 8a384b4589cf417c0d1e74063d70deba68458000 Mon Sep 17 00:00:00 2001 From: rmsyn Date: Thu, 4 Jul 2024 00:47:21 +0000 Subject: [PATCH] fixup: move `result` into `riscv-pac` --- riscv-pac/CHANGELOG.md | 4 ++++ riscv-pac/src/lib.rs | 2 ++ {riscv => riscv-pac}/src/result.rs | 0 riscv/Cargo.toml | 1 + riscv/src/lib.rs | 2 +- 5 files changed, 8 insertions(+), 1 deletion(-) rename {riscv => riscv-pac}/src/result.rs (100%) diff --git a/riscv-pac/CHANGELOG.md b/riscv-pac/CHANGELOG.md index ab888408..0303047f 100644 --- a/riscv-pac/CHANGELOG.md +++ b/riscv-pac/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Added + +- Add `result` module for `Error` and `Result` types + ## [v0.1.1] - 2024-02-15 - Fix crates.io badge links diff --git a/riscv-pac/src/lib.rs b/riscv-pac/src/lib.rs index 934e7aad..c14514cc 100644 --- a/riscv-pac/src/lib.rs +++ b/riscv-pac/src/lib.rs @@ -1,5 +1,7 @@ #![no_std] +pub mod result; + /// Trait for enums of target-specific external interrupt numbers. /// /// This trait should be implemented by a peripheral access crate (PAC) diff --git a/riscv/src/result.rs b/riscv-pac/src/result.rs similarity index 100% rename from riscv/src/result.rs rename to riscv-pac/src/result.rs diff --git a/riscv/Cargo.toml b/riscv/Cargo.toml index 45f07f36..a783bb1c 100644 --- a/riscv/Cargo.toml +++ b/riscv/Cargo.toml @@ -26,3 +26,4 @@ critical-section-single-hart = ["critical-section/restore-state-bool"] [dependencies] critical-section = "1.1.2" embedded-hal = "1.0.0" +riscv-pac = { path = "../riscv-pac", version = "0.1.1", default-features = false } diff --git a/riscv/src/lib.rs b/riscv/src/lib.rs index 3fa21e01..ee7b24a7 100644 --- a/riscv/src/lib.rs +++ b/riscv/src/lib.rs @@ -40,7 +40,7 @@ pub(crate) mod bits; pub mod delay; pub mod interrupt; pub mod register; -pub mod result; +pub use riscv_pac::result; #[macro_use] mod macros;