Skip to content

Commit

Permalink
Hide unstable singletons
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Jan 16, 2025
1 parent 20ad8d1 commit 9aefa35
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions esp-hal/src/aes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ pub mod dma {
}

/// A DMA capable AES instance.
#[instability::unstable]
pub struct AesDma<'d> {
/// The underlying [`Aes`](super::Aes) driver
pub aes: super::Aes<'d>,
Expand Down
2 changes: 2 additions & 0 deletions esp-hal/src/parl_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ where
}

/// Parallel IO TX channel
#[instability::unstable]
pub struct ParlIoTx<'d, Dm>
where
Dm: DriverMode,
Expand Down Expand Up @@ -987,6 +988,7 @@ where
}

/// Parallel IO RX channel
#[instability::unstable]
pub struct ParlIoRx<'d, Dm>
where
Dm: DriverMode,
Expand Down
10 changes: 6 additions & 4 deletions esp-hal/src/peripheral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ mod peripheral_macros {
$crate::create_peripheral!($name <= $from_pac);
)*
$(
$crate::create_peripheral!($unstable_name <= $unstable_from_pac);
$crate::create_peripheral!(#[instability::unstable] $unstable_name <= $unstable_from_pac);
)*
}

Expand Down Expand Up @@ -383,6 +383,7 @@ mod peripheral_macros {
)*

$(
#[instability::unstable]
pub use peripherals::$unstable_name;
$(
impl peripherals::$unstable_name {
Expand Down Expand Up @@ -427,7 +428,8 @@ mod peripheral_macros {
#[macro_export]
/// Macro to create a peripheral structure.
macro_rules! create_peripheral {
($name:ident <= virtual) => {
($(#[$attr:meta])? $name:ident <= virtual) => {
$(#[$attr])?
#[derive(Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[non_exhaustive]
Expand Down Expand Up @@ -459,8 +461,8 @@ mod peripheral_macros {
impl $crate::private::Sealed for $name {}
};

($name:ident <= $base:ident) => {
$crate::create_peripheral!($name <= virtual);
($(#[$attr:meta])? $name:ident <= $base:ident) => {
$crate::create_peripheral!($(#[$attr])? $name <= virtual);

impl $name {
#[doc = r"Pointer to the register block"]
Expand Down
1 change: 1 addition & 0 deletions esp-hal/src/soc/esp32/cpu_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ unsafe fn internal_park_core(core: Cpu) {

impl<'d> CpuControl<'d> {
/// Creates a new instance of `CpuControl`.
#[instability::unstable]
pub fn new(cpu_control: impl Peripheral<P = CPU_CTRL> + 'd) -> CpuControl<'d> {
crate::into_ref!(cpu_control);

Expand Down
1 change: 1 addition & 0 deletions esp-hal/src/soc/esp32s3/cpu_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ unsafe fn internal_park_core(core: Cpu) {

impl<'d> CpuControl<'d> {
/// Creates a new instance of `CpuControl`.
#[instability::unstable]
pub fn new(cpu_control: impl Peripheral<P = CPU_CTRL> + 'd) -> CpuControl<'d> {
crate::into_ref!(cpu_control);

Expand Down

0 comments on commit 9aefa35

Please sign in to comment.