diff --git a/boards/feather_rp2040/examples/feather_neopixel_rainbow.rs b/boards/feather_rp2040/examples/feather_neopixel_rainbow.rs index 939df16..ba50fb1 100644 --- a/boards/feather_rp2040/examples/feather_neopixel_rainbow.rs +++ b/boards/feather_rp2040/examples/feather_neopixel_rainbow.rs @@ -14,9 +14,9 @@ use feather_rp2040::{ hal::{ clocks::{init_clocks_and_plls, Clock}, pac, - sio::Sio, timer::Timer, watchdog::Watchdog, + Sio, }, Pins, XOSC_CRYSTAL_FREQ, }; diff --git a/boards/itsy_bitsy_rp2040/examples/itsy_bitsy_blinky.rs b/boards/itsy_bitsy_rp2040/examples/itsy_bitsy_blinky.rs index de8e549..b4f5f7e 100644 --- a/boards/itsy_bitsy_rp2040/examples/itsy_bitsy_blinky.rs +++ b/boards/itsy_bitsy_rp2040/examples/itsy_bitsy_blinky.rs @@ -70,7 +70,7 @@ fn main() -> ! { let mut delay = cortex_m::delay::Delay::new(core.SYST, clocks.system_clock.freq().integer()); // The single-cycle I/O block controls our GPIO pins - let sio = hal::sio::Sio::new(pac.SIO); + let sio = hal::Sio::new(pac.SIO); // Set the pins to their default state let pins = hal::gpio::Pins::new( diff --git a/boards/itsy_bitsy_rp2040/examples/itsy_bitsy_rainbow.rs b/boards/itsy_bitsy_rp2040/examples/itsy_bitsy_rainbow.rs index 34089d2..9446354 100644 --- a/boards/itsy_bitsy_rp2040/examples/itsy_bitsy_rainbow.rs +++ b/boards/itsy_bitsy_rp2040/examples/itsy_bitsy_rainbow.rs @@ -16,8 +16,8 @@ use itsy_bitsy_rp2040::{ hal::{ clocks::{init_clocks_and_plls, Clock}, pac, - sio::Sio, watchdog::Watchdog, + Sio, }, Pins, XOSC_CRYSTAL_FREQ, }; diff --git a/boards/kb2040/examples/kb2040_rainbow.rs b/boards/kb2040/examples/kb2040_rainbow.rs index ab3589e..49f78d9 100644 --- a/boards/kb2040/examples/kb2040_rainbow.rs +++ b/boards/kb2040/examples/kb2040_rainbow.rs @@ -18,9 +18,9 @@ use kb2040::{ hal::{ clocks::{init_clocks_and_plls, Clock}, pac, - sio::Sio, timer::Timer, watchdog::Watchdog, + Sio, }, XOSC_CRYSTAL_FREQ, }; diff --git a/boards/pico/examples/pico_blinky.rs b/boards/pico/examples/pico_blinky.rs index f4630aa..e3a065b 100644 --- a/boards/pico/examples/pico_blinky.rs +++ b/boards/pico/examples/pico_blinky.rs @@ -76,7 +76,7 @@ fn main() -> ! { let mut delay = cortex_m::delay::Delay::new(core.SYST, clocks.system_clock.freq().integer()); // The single-cycle I/O block controls our GPIO pins - let sio = hal::sio::Sio::new(pac.SIO); + let sio = hal::Sio::new(pac.SIO); // Set the pins up according to their function on this particular board let pins = pico::Pins::new( diff --git a/boards/pico/examples/pico_countdown_blinky.rs b/boards/pico/examples/pico_countdown_blinky.rs index 0233d7d..36af2b3 100644 --- a/boards/pico/examples/pico_countdown_blinky.rs +++ b/boards/pico/examples/pico_countdown_blinky.rs @@ -65,7 +65,7 @@ fn main() -> ! { let mut count_down = timer.count_down(); // The single-cycle I/O block controls our GPIO pins - let sio = hal::sio::Sio::new(pac.SIO); + let sio = hal::Sio::new(pac.SIO); // Set the pins up according to their function on this particular board let pins = pico::Pins::new( diff --git a/boards/pico/examples/pico_gpio_in_out.rs b/boards/pico/examples/pico_gpio_in_out.rs index a91fc16..9a92b45 100644 --- a/boards/pico/examples/pico_gpio_in_out.rs +++ b/boards/pico/examples/pico_gpio_in_out.rs @@ -52,7 +52,7 @@ fn main() -> ! { // at it's default clock speed. // The single-cycle I/O block controls our GPIO pins - let sio = hal::sio::Sio::new(pac.SIO); + let sio = hal::Sio::new(pac.SIO); // Set the pins up according to their function on this particular board let pins = pico::Pins::new( diff --git a/boards/pico/examples/pico_i2c_controller_peripheral/main.rs b/boards/pico/examples/pico_i2c_controller_peripheral/main.rs index 814b9e9..ae5705d 100644 --- a/boards/pico/examples/pico_i2c_controller_peripheral/main.rs +++ b/boards/pico/examples/pico_i2c_controller_peripheral/main.rs @@ -31,8 +31,8 @@ use hal::{ gpio::{bank0, FunctionI2C, Pin}, i2c::{peripheral::I2CPeripheralEventIterator, I2C}, pac, - sio::Sio, watchdog::Watchdog, + Sio, }; use pico::{hal, Pins, XOSC_CRYSTAL_FREQ}; diff --git a/boards/pico/examples/pico_i2c_pio.rs b/boards/pico/examples/pico_i2c_pio.rs index 43db613..43242f4 100644 --- a/boards/pico/examples/pico_i2c_pio.rs +++ b/boards/pico/examples/pico_i2c_pio.rs @@ -84,7 +84,7 @@ fn main() -> ! { .unwrap(); // The single-cycle I/O block controls our GPIO pins - let sio = hal::sio::Sio::new(pac.SIO); + let sio = hal::Sio::new(pac.SIO); // Set the pins up according to their function on this particular board let pins = pico::Pins::new( diff --git a/boards/pico/examples/pico_pwm_blink.rs b/boards/pico/examples/pico_pwm_blink.rs index 657e1de..c8745e5 100644 --- a/boards/pico/examples/pico_pwm_blink.rs +++ b/boards/pico/examples/pico_pwm_blink.rs @@ -78,7 +78,7 @@ fn main() -> ! { .unwrap(); // The single-cycle I/O block controls our GPIO pins - let sio = hal::sio::Sio::new(pac.SIO); + let sio = hal::Sio::new(pac.SIO); // Set the pins up according to their function on this particular board let pins = pico::Pins::new( diff --git a/boards/pico/examples/pico_rtic.rs b/boards/pico/examples/pico_rtic.rs index 44704c8..b594585 100644 --- a/boards/pico/examples/pico_rtic.rs +++ b/boards/pico/examples/pico_rtic.rs @@ -13,7 +13,7 @@ mod app { use embedded_hal::digital::v2::OutputPin; use pico::{ - hal::{self, clocks::init_clocks_and_plls, pac, sio::Sio, watchdog::Watchdog}, + hal::{self, clocks::init_clocks_and_plls, pac, watchdog::Watchdog, Sio}, XOSC_CRYSTAL_FREQ, }; diff --git a/boards/pico/examples/pico_usb_serial_interrupt.rs b/boards/pico/examples/pico_usb_serial_interrupt.rs index 6cbc00f..7977ec2 100644 --- a/boards/pico/examples/pico_usb_serial_interrupt.rs +++ b/boards/pico/examples/pico_usb_serial_interrupt.rs @@ -140,7 +140,7 @@ fn main() -> ! { let mut delay = cortex_m::delay::Delay::new(core.SYST, clocks.system_clock.freq().integer()); // The single-cycle I/O block controls our GPIO pins - let sio = hal::sio::Sio::new(pac.SIO); + let sio = hal::Sio::new(pac.SIO); // Set the pins up according to their function on this particular board let pins = pico::Pins::new( diff --git a/boards/pico_explorer/examples/pico_explorer_showcase.rs b/boards/pico_explorer/examples/pico_explorer_showcase.rs index 1643752..8702b35 100644 --- a/boards/pico_explorer/examples/pico_explorer_showcase.rs +++ b/boards/pico_explorer/examples/pico_explorer_showcase.rs @@ -12,7 +12,7 @@ use embedded_graphics::{ }; use embedded_hal::digital::v2::OutputPin; use embedded_time::rate::*; -use hal::{adc::Adc, clocks::*, sio::Sio, watchdog::Watchdog}; +use hal::{adc::Adc, clocks::*, watchdog::Watchdog, Sio}; use panic_halt as _; use pico_explorer::{hal, pac, Button, PicoExplorer, XOSC_CRYSTAL_FREQ}; diff --git a/boards/pico_lipo_16mb/examples/pico_lipo_16mb_blinky.rs b/boards/pico_lipo_16mb/examples/pico_lipo_16mb_blinky.rs index f2813f6..f42dac2 100644 --- a/boards/pico_lipo_16mb/examples/pico_lipo_16mb_blinky.rs +++ b/boards/pico_lipo_16mb/examples/pico_lipo_16mb_blinky.rs @@ -76,7 +76,7 @@ fn main() -> ! { let mut delay = cortex_m::delay::Delay::new(core.SYST, clocks.system_clock.freq().integer()); // The single-cycle I/O block controls our GPIO pins - let sio = hal::sio::Sio::new(pac.SIO); + let sio = hal::Sio::new(pac.SIO); // Set the pins up according to their function on this particular board let pins = pico_lipo_16_mb::Pins::new( diff --git a/boards/pro_micro_rp2040/examples/pro_micro_rainbow.rs b/boards/pro_micro_rp2040/examples/pro_micro_rainbow.rs index 0e8ab28..993fbc3 100644 --- a/boards/pro_micro_rp2040/examples/pro_micro_rainbow.rs +++ b/boards/pro_micro_rp2040/examples/pro_micro_rainbow.rs @@ -18,9 +18,9 @@ use pro_micro_rp2040::{ hal::{ clocks::{init_clocks_and_plls, Clock}, pac, - sio::Sio, timer::Timer, watchdog::Watchdog, + Sio, }, XOSC_CRYSTAL_FREQ, }; diff --git a/boards/qt_py_rp2040/examples/qt_py_rainbow.rs b/boards/qt_py_rp2040/examples/qt_py_rainbow.rs index 3edb1b2..1cdd702 100644 --- a/boards/qt_py_rp2040/examples/qt_py_rainbow.rs +++ b/boards/qt_py_rp2040/examples/qt_py_rainbow.rs @@ -16,8 +16,8 @@ use qt_py_rp2040::{ hal::{ clocks::{init_clocks_and_plls, Clock}, pac, - sio::Sio, watchdog::Watchdog, + Sio, }, Pins, XOSC_CRYSTAL_FREQ, }; diff --git a/rp2040-hal/examples/i2c.rs b/rp2040-hal/examples/i2c.rs index 184dc63..aed8739 100644 --- a/rp2040-hal/examples/i2c.rs +++ b/rp2040-hal/examples/i2c.rs @@ -65,7 +65,7 @@ fn main() -> ! { .unwrap(); // The single-cycle I/O block controls our GPIO pins - let sio = hal::sio::Sio::new(pac.SIO); + let sio = hal::Sio::new(pac.SIO); // Set the pins to their default state let pins = hal::gpio::Pins::new( diff --git a/rp2040-hal/examples/pio_blink.rs b/rp2040-hal/examples/pio_blink.rs index 3c4778e..d0ea164 100644 --- a/rp2040-hal/examples/pio_blink.rs +++ b/rp2040-hal/examples/pio_blink.rs @@ -8,7 +8,7 @@ use cortex_m_rt::entry; use hal::gpio::{FunctionPio0, Pin}; use hal::pac; use hal::pio::PIOExt; -use hal::sio::Sio; +use hal::Sio; use panic_halt as _; use rp2040_hal as hal; diff --git a/rp2040-hal/examples/pio_proc_blink.rs b/rp2040-hal/examples/pio_proc_blink.rs index b82658a..4dff296 100644 --- a/rp2040-hal/examples/pio_proc_blink.rs +++ b/rp2040-hal/examples/pio_proc_blink.rs @@ -8,7 +8,7 @@ use cortex_m_rt::entry; use hal::gpio::{FunctionPio0, Pin}; use hal::pac; use hal::pio::PIOExt; -use hal::sio::Sio; +use hal::Sio; use panic_halt as _; use rp2040_hal as hal; diff --git a/rp2040-hal/examples/watchdog.rs b/rp2040-hal/examples/watchdog.rs index a5156f9..e7ec88e 100644 --- a/rp2040-hal/examples/watchdog.rs +++ b/rp2040-hal/examples/watchdog.rs @@ -73,7 +73,7 @@ fn main() -> ! { let mut delay = cortex_m::delay::Delay::new(core.SYST, clocks.system_clock.freq().integer()); // The single-cycle I/O block controls our GPIO pins - let sio = hal::sio::Sio::new(pac.SIO); + let sio = hal::Sio::new(pac.SIO); // Set the pins to their default state let pins = hal::gpio::Pins::new( diff --git a/rp2040-hal/src/adc.rs b/rp2040-hal/src/adc.rs index 5f8afb3..54804c2 100644 --- a/rp2040-hal/src/adc.rs +++ b/rp2040-hal/src/adc.rs @@ -7,7 +7,7 @@ //! Capture ADC reading from a pin //! ```no_run //! use embedded_hal::adc::OneShot; -//! use rp2040_hal::{adc::Adc, gpio::Pins, pac, sio::Sio}; +//! use rp2040_hal::{adc::Adc, gpio::Pins, pac, Sio}; //! let mut peripherals = pac::Peripherals::take().unwrap(); //! let sio = Sio::new(peripherals.SIO); //! let pins = Pins::new(peripherals.IO_BANK0, peripherals.PADS_BANK0, sio.gpio_bank0, &mut peripherals.RESETS); @@ -22,7 +22,7 @@ //! Capture ADC reading from temperature sensor. Note that this needs conversion to be a real-world temperature. //! ```no_run //! use embedded_hal::adc::OneShot; -//! use rp2040_hal::{adc::Adc, gpio::Pins, pac, sio::Sio}; +//! use rp2040_hal::{adc::Adc, gpio::Pins, pac, Sio}; //! let mut peripherals = pac::Peripherals::take().unwrap(); //! let sio = Sio::new(peripherals.SIO); //! let pins = Pins::new(peripherals.IO_BANK0, peripherals.PADS_BANK0, sio.gpio_bank0, &mut peripherals.RESETS); diff --git a/rp2040-hal/src/clocks/mod.rs b/rp2040-hal/src/clocks/mod.rs index cd502cd..b1a546c 100644 --- a/rp2040-hal/src/clocks/mod.rs +++ b/rp2040-hal/src/clocks/mod.rs @@ -15,7 +15,7 @@ //! ## Usage extended //! ```no_run //! use embedded_time::rate::*; -//! use rp2040_hal::{clocks::{Clock, ClocksManager, ClockSource, InitError}, gpio::Pins, pac, pll::{common_configs::{PLL_SYS_125MHZ, PLL_USB_48MHZ}, setup_pll_blocking}, sio::Sio, watchdog::Watchdog, xosc::setup_xosc_blocking}; +//! use rp2040_hal::{clocks::{Clock, ClocksManager, ClockSource, InitError}, gpio::Pins, pac, pll::{common_configs::{PLL_SYS_125MHZ, PLL_USB_48MHZ}, setup_pll_blocking}, Sio, watchdog::Watchdog, xosc::setup_xosc_blocking}; //! //! # fn func() -> Result<(), InitError> { //! let mut peripherals = pac::Peripherals::take().unwrap(); diff --git a/rp2040-hal/src/gpio/dynpin.rs b/rp2040-hal/src/gpio/dynpin.rs index dd4c455..7a29a62 100644 --- a/rp2040-hal/src/gpio/dynpin.rs +++ b/rp2040-hal/src/gpio/dynpin.rs @@ -18,7 +18,7 @@ //! //! ```no_run //! // Move a pin out of the Pins struct and convert to a DynPin -//! # use rp2040_hal::{pac, gpio::{DynPin, bank0::Gpio12, Pins}, sio::Sio}; +//! # use rp2040_hal::{pac, gpio::{DynPin, bank0::Gpio12, Pins}, Sio}; //! # let mut peripherals = pac::Peripherals::take().unwrap(); //! # let sio = Sio::new(peripherals.SIO); //! # let pins = Pins::new(peripherals.IO_BANK0,peripherals.PADS_BANK0,sio.gpio_bank0, &mut peripherals.RESETS); @@ -30,7 +30,7 @@ //! API. //! //! ```no_run -//! # use rp2040_hal::{pac, gpio::{DynPin, Pins}, sio::Sio}; +//! # use rp2040_hal::{pac, gpio::{DynPin, Pins}, Sio}; //! # let mut peripherals = pac::Peripherals::take().unwrap(); //! # let sio = Sio::new(peripherals.SIO); //! # let pins = Pins::new(peripherals.IO_BANK0,peripherals.PADS_BANK0,sio.gpio_bank0, &mut peripherals.RESETS); @@ -54,7 +54,7 @@ //! //! ```no_run //! # use core::convert::TryInto; -//! # use rp2040_hal::{pac, gpio::{DynPin, bank0::Gpio12, Pin, Pins, FloatingInput}, sio::Sio}; +//! # use rp2040_hal::{pac, gpio::{DynPin, bank0::Gpio12, Pin, Pins, FloatingInput}, Sio}; //! # let mut peripherals = pac::Peripherals::take().unwrap(); //! # let sio = Sio::new(peripherals.SIO); //! # let pins = Pins::new(peripherals.IO_BANK0,peripherals.PADS_BANK0,sio.gpio_bank0, &mut peripherals.RESETS); diff --git a/rp2040-hal/src/gpio/mod.rs b/rp2040-hal/src/gpio/mod.rs index 7d543ea..2e0041d 100644 --- a/rp2040-hal/src/gpio/mod.rs +++ b/rp2040-hal/src/gpio/mod.rs @@ -5,7 +5,7 @@ //! ## Basic usage //! ```no_run //! use embedded_hal::digital::v2::{InputPin, OutputPin}; -//! use rp2040_hal::{clocks::init_clocks_and_plls, gpio::Pins, watchdog::Watchdog, pac, sio::Sio}; +//! use rp2040_hal::{clocks::init_clocks_and_plls, gpio::Pins, watchdog::Watchdog, pac, Sio}; //! let mut peripherals = pac::Peripherals::take().unwrap(); //! let mut watchdog = Watchdog::new(peripherals.WATCHDOG); //! const XOSC_CRYSTAL_FREQ: u32 = 12_000_000; // Typically found in BSP crates diff --git a/rp2040-hal/src/i2c.rs b/rp2040-hal/src/i2c.rs index e0994b2..463f287 100644 --- a/rp2040-hal/src/i2c.rs +++ b/rp2040-hal/src/i2c.rs @@ -5,7 +5,7 @@ //! ## Usage //! ```no_run //! use embedded_time::rate::Extensions; -//! use rp2040_hal::{i2c::I2C, gpio::Pins, pac, sio::Sio}; +//! use rp2040_hal::{i2c::I2C, gpio::Pins, pac, Sio}; //! let mut peripherals = pac::Peripherals::take().unwrap(); //! let sio = Sio::new(peripherals.SIO); //! let pins = Pins::new(peripherals.IO_BANK0, peripherals.PADS_BANK0, sio.gpio_bank0, &mut peripherals.RESETS); diff --git a/rp2040-hal/src/multicore.rs b/rp2040-hal/src/multicore.rs index 3b59ff9..cdffc0e 100644 --- a/rp2040-hal/src/multicore.rs +++ b/rp2040-hal/src/multicore.rs @@ -63,7 +63,7 @@ pub struct Multicore<'p> { impl<'p> Multicore<'p> { /// Create a new |Multicore| instance. - pub fn new(psm: &'p mut pac::PSM, ppb: &'p mut pac::PPB, sio: &'p mut crate::sio::Sio) -> Self { + pub fn new(psm: &'p mut pac::PSM, ppb: &'p mut pac::PPB, sio: &'p mut crate::Sio) -> Self { Self { cores: [ Core { inner: None }, @@ -82,7 +82,7 @@ impl<'p> Multicore<'p> { /// A handle for controlling a logical core. pub struct Core<'p> { - inner: Option<(&'p mut pac::PSM, &'p mut pac::PPB, &'p mut crate::sio::Sio)>, + inner: Option<(&'p mut pac::PSM, &'p mut pac::PPB, &'p mut crate::Sio)>, } impl<'p> Core<'p> { diff --git a/rp2040-hal/src/pwm/mod.rs b/rp2040-hal/src/pwm/mod.rs index 6690a66..f23f8f7 100644 --- a/rp2040-hal/src/pwm/mod.rs +++ b/rp2040-hal/src/pwm/mod.rs @@ -23,7 +23,7 @@ //! Once you have the PWM slice struct, you can add individual pins: //! //! ```no_run -//! # use rp2040_hal::{prelude::*, gpio::Pins, sio::Sio, pwm::{InputHighRunning, Slices}}; +//! # use rp2040_hal::{prelude::*, gpio::Pins, Sio, pwm::{InputHighRunning, Slices}}; //! # let mut pac = rp2040_pac::Peripherals::take().unwrap(); //! # let pwm_slices = Slices::new(pac.PWM, &mut pac.RESETS); //! # let mut pwm = pwm_slices.pwm4.into_mode::(); diff --git a/rp2040-hal/src/spi.rs b/rp2040-hal/src/spi.rs index babc486..7244dd0 100644 --- a/rp2040-hal/src/spi.rs +++ b/rp2040-hal/src/spi.rs @@ -7,7 +7,7 @@ //! ```no_run //! use embedded_hal::spi::MODE_0; //! use embedded_time::rate::*; -//! use rp2040_hal::{spi::Spi, gpio::{Pins, FunctionSpi}, pac, sio::Sio}; +//! use rp2040_hal::{spi::Spi, gpio::{Pins, FunctionSpi}, pac, Sio}; //! //! let mut peripherals = pac::Peripherals::take().unwrap(); //! let sio = Sio::new(peripherals.SIO); diff --git a/rp2040-hal/src/uart.rs b/rp2040-hal/src/uart.rs index 0bd3f49..3657633 100644 --- a/rp2040-hal/src/uart.rs +++ b/rp2040-hal/src/uart.rs @@ -6,7 +6,7 @@ //! //! See [examples/uart.rs](https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal/examples/uart.rs) for a more complete example //! ```no_run -//! use rp2040_hal::{clocks::init_clocks_and_plls, gpio::{Pins, FunctionUart}, pac, sio::Sio, uart::{self, UartPeripheral}, watchdog::Watchdog}; +//! use rp2040_hal::{clocks::init_clocks_and_plls, gpio::{Pins, FunctionUart}, pac, Sio, uart::{self, UartPeripheral}, watchdog::Watchdog}; //! //! const XOSC_CRYSTAL_FREQ: u32 = 12_000_000; // Typically found in BSP crates //! diff --git a/rp2040-hal/src/usb.rs b/rp2040-hal/src/usb.rs index db262f2..810825c 100644 --- a/rp2040-hal/src/usb.rs +++ b/rp2040-hal/src/usb.rs @@ -4,7 +4,7 @@ //! //! Initialize the Usb Bus forcing the VBUS detection. //! ```no_run -//! use rp2040_hal::{clocks::init_clocks_and_plls, pac, sio::Sio, usb::UsbBus, watchdog::Watchdog}; +//! use rp2040_hal::{clocks::init_clocks_and_plls, pac, Sio, usb::UsbBus, watchdog::Watchdog}; //! use usb_device::class_prelude::UsbBusAllocator; //! //! const XOSC_CRYSTAL_FREQ: u32 = 12_000_000; // Typically found in BSP crates