Skip to content

Commit a35fde8

Browse files
Merge pull request #219 from rmsyn/riscv/csr-macro
riscv: add CSR-defining macros
2 parents 7096e0a + b568220 commit a35fde8

File tree

10 files changed

+829
-86
lines changed

10 files changed

+829
-86
lines changed

riscv/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2525
- Add `Mstatus` vector extension support
2626
- Add fallible counterparts to all functions that `panic`
2727
- Add `riscv-pac` as a dependency
28+
- Add CSR-defining macros to create in-memory types
2829

2930
### Fixed
3031

riscv/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ critical-section = "1.1.2"
2929
embedded-hal = "1.0.0"
3030
riscv-pac = { path = "../riscv-pac", version = "0.2.0" }
3131
riscv-macros = { path = "macros", version = "0.1.0", optional = true }
32+
paste = "1.0.15"

riscv/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@
3535
#![no_std]
3636
#![allow(clippy::missing_safety_doc)]
3737

38+
pub use paste::paste;
39+
3840
pub mod asm;
39-
pub(crate) mod bits;
41+
pub mod bits;
4042
pub mod delay;
4143
pub mod interrupt;
4244
pub mod register;

riscv/src/register.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ pub mod minstreth;
107107
mod mhpmeventx;
108108
pub use self::mhpmeventx::*;
109109

110+
#[cfg(test)]
111+
mod tests;
112+
110113
// TODO: Debug/Trace Registers (shared with Debug Mode)
111114

112115
// TODO: Debug Mode Registers

0 commit comments

Comments
 (0)