More tagging

This commit is contained in:
Kirill Mikhailov 2025-01-09 14:49:15 +01:00
parent b8a9cd7205
commit bdd3b3f280
5 changed files with 29 additions and 1 deletions

View File

@ -1024,6 +1024,8 @@ macro_rules! io_type {
(Analog, $gpionum:literal) => { (Analog, $gpionum:literal) => {
// FIXME: the implementation shouldn't be in the GPIO module // FIXME: the implementation shouldn't be in the GPIO module
#[cfg(any(esp32c2, esp32c3, esp32c6, esp32h2))] #[cfg(any(esp32c2, esp32c3, esp32c6, esp32h2))]
#[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
impl $crate::gpio::AnalogPin for $crate::gpio::GpioPin<$gpionum> { impl $crate::gpio::AnalogPin for $crate::gpio::GpioPin<$gpionum> {
/// Configures the pin for analog mode. /// Configures the pin for analog mode.
fn set_analog(&self, _: $crate::private::Internal) { fn set_analog(&self, _: $crate::private::Internal) {

View File

@ -8,4 +8,6 @@
pub mod master; pub mod master;
#[cfg(lp_i2c0)] #[cfg(lp_i2c0)]
crate::unstable_module! {
pub mod lp_i2c; pub mod lp_i2c;
}

View File

@ -144,10 +144,13 @@
mod fmt; mod fmt;
#[cfg(riscv)] #[cfg(riscv)]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
pub use esp_riscv_rt::{self, entry, riscv}; pub use esp_riscv_rt::{self, entry, riscv};
#[cfg(xtensa)] #[cfg(xtensa)]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
pub use xtensa_lx; pub use xtensa_lx;
#[cfg(xtensa)] #[cfg(xtensa)]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
pub use xtensa_lx_rt::{self, entry}; pub use xtensa_lx_rt::{self, entry};
// TODO what should we reexport stably? // TODO what should we reexport stably?
@ -190,6 +193,7 @@ mod macros;
#[cfg(feature = "unstable")] #[cfg(feature = "unstable")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))] #[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
pub use procmacros::load_lp_code; pub use procmacros::load_lp_code;
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
pub use procmacros::{handler, ram}; pub use procmacros::{handler, ram};
// can't use instability on inline module definitions, see https://github.com/rust-lang/rust/issues/54727 // can't use instability on inline module definitions, see https://github.com/rust-lang/rust/issues/54727

View File

@ -95,6 +95,7 @@ use crate::{
#[derive(Debug, Hash, EnumSetType)] #[derive(Debug, Hash, EnumSetType)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[non_exhaustive] #[non_exhaustive]
#[instability::unstable]
pub enum SpiInterrupt { pub enum SpiInterrupt {
/// Indicates that the SPI transaction has completed successfully. /// Indicates that the SPI transaction has completed successfully.
/// ///
@ -704,6 +705,11 @@ where
/// ///
/// Sets the specified pin to push-pull output and connects it to the SPI CS /// Sets the specified pin to push-pull output and connects it to the SPI CS
/// signal. /// signal.
///
/// # Current Stability Limitations
/// The hardware chip select functionality is limited; only one CS line can
/// be set, regardless of the total number available. There is no
/// mechanism to select which CS line to use.
#[instability::unstable] #[instability::unstable]
pub fn with_cs<CS: PeripheralOutput>(self, cs: impl Peripheral<P = CS> + 'd) -> Self { pub fn with_cs<CS: PeripheralOutput>(self, cs: impl Peripheral<P = CS> + 'd) -> Self {
crate::into_mapped_ref!(cs); crate::into_mapped_ref!(cs);
@ -741,6 +747,10 @@ where
/// ///
/// Enables both input and output functionality for the pin, and connects it /// Enables both input and output functionality for the pin, and connects it
/// to the SIO2 output and input signals. /// to the SIO2 output and input signals.
///
/// # Current Stability Limitations
/// QSPI operations are unstable, associated pins configuration is
/// inefficient.
#[instability::unstable] #[instability::unstable]
pub fn with_sio2<SIO2: PeripheralOutput>(self, sio2: impl Peripheral<P = SIO2> + 'd) -> Self { pub fn with_sio2<SIO2: PeripheralOutput>(self, sio2: impl Peripheral<P = SIO2> + 'd) -> Self {
// TODO: panic if not QSPI? // TODO: panic if not QSPI?
@ -758,6 +768,10 @@ where
/// ///
/// Enables both input and output functionality for the pin, and connects it /// Enables both input and output functionality for the pin, and connects it
/// to the SIO3 output and input signals. /// to the SIO3 output and input signals.
///
/// # Current Stability Limitations
/// QSPI operations are unstable, associated pins configuration is
/// inefficient.
#[instability::unstable] #[instability::unstable]
pub fn with_sio3<SIO3: PeripheralOutput>(self, sio3: impl Peripheral<P = SIO3> + 'd) -> Self { pub fn with_sio3<SIO3: PeripheralOutput>(self, sio3: impl Peripheral<P = SIO3> + 'd) -> Self {
// TODO: panic if not QSPI? // TODO: panic if not QSPI?

View File

@ -1040,6 +1040,7 @@ impl<'d> Uart<'d, Async> {
#[derive(Debug, EnumSetType)] #[derive(Debug, EnumSetType)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[non_exhaustive] #[non_exhaustive]
#[instability::unstable]
pub enum UartInterrupt { pub enum UartInterrupt {
/// Indicates that the received has detected the configured /// Indicates that the received has detected the configured
/// [`Uart::set_at_cmd`] character. /// [`Uart::set_at_cmd`] character.
@ -1238,21 +1239,25 @@ impl InterruptConfigurable for Uart<'_, Blocking> {
impl Uart<'_, Blocking> { impl Uart<'_, Blocking> {
/// Listen for the given interrupts /// Listen for the given interrupts
#[instability::unstable]
pub fn listen(&mut self, interrupts: impl Into<EnumSet<UartInterrupt>>) { pub fn listen(&mut self, interrupts: impl Into<EnumSet<UartInterrupt>>) {
self.tx.uart.info().enable_listen(interrupts.into(), true) self.tx.uart.info().enable_listen(interrupts.into(), true)
} }
/// Unlisten the given interrupts /// Unlisten the given interrupts
#[instability::unstable]
pub fn unlisten(&mut self, interrupts: impl Into<EnumSet<UartInterrupt>>) { pub fn unlisten(&mut self, interrupts: impl Into<EnumSet<UartInterrupt>>) {
self.tx.uart.info().enable_listen(interrupts.into(), false) self.tx.uart.info().enable_listen(interrupts.into(), false)
} }
/// Gets asserted interrupts /// Gets asserted interrupts
#[instability::unstable]
pub fn interrupts(&mut self) -> EnumSet<UartInterrupt> { pub fn interrupts(&mut self) -> EnumSet<UartInterrupt> {
self.tx.uart.info().interrupts() self.tx.uart.info().interrupts()
} }
/// Resets asserted interrupts /// Resets asserted interrupts
#[instability::unstable]
pub fn clear_interrupts(&mut self, interrupts: EnumSet<UartInterrupt>) { pub fn clear_interrupts(&mut self, interrupts: EnumSet<UartInterrupt>) {
self.tx.uart.info().clear_interrupts(interrupts) self.tx.uart.info().clear_interrupts(interrupts)
} }
@ -1878,6 +1883,7 @@ pub(super) fn intr_handler(uart: &Info, state: &State) {
/// Low-power UART /// Low-power UART
#[cfg(lp_uart)] #[cfg(lp_uart)]
#[instability::unstable]
pub mod lp_uart { pub mod lp_uart {
use crate::{ use crate::{
gpio::lp_io::{LowPowerInput, LowPowerOutput}, gpio::lp_io::{LowPowerInput, LowPowerOutput},