diff --git a/imxrt1060-hal/src/adc.rs b/imxrt1060-hal/src/adc.rs index 14ccffd3..93e365d9 100644 --- a/imxrt1060-hal/src/adc.rs +++ b/imxrt1060-hal/src/adc.rs @@ -4,10 +4,10 @@ //! //! # Example //! ```no_run -//! use imxrt1062_hal::{self, adc}; +//! use imxrt1060_hal::{self, adc}; //! use embedded_hal::adc::OneShot; //! -//! let mut peripherals = imxrt1062_hal::Peripherals::take().unwrap(); +//! let mut peripherals = imxrt1060_hal::Peripherals::take().unwrap(); //! let (adc1_builder, _) = peripherals.adc.clock(&mut peripherals.ccm.handle); //! //! let mut adc1 = adc1_builder.build(adc::ClockSelect::default(), adc::ClockDivision::default()); diff --git a/imxrt1060-hal/src/dma.rs b/imxrt1060-hal/src/dma.rs index 228a4f1c..fd4ff1ea 100644 --- a/imxrt1060-hal/src/dma.rs +++ b/imxrt1060-hal/src/dma.rs @@ -34,7 +34,7 @@ //! handler, since we're enabling an interrupt when the receive completes. //! //! ```no_run -//! use imxrt1062_hal::dma::{Circular, Buffer, Linear, Peripheral, bidirectional_u16}; +//! use imxrt1060_hal::dma::{Circular, Buffer, Linear, Peripheral, bidirectional_u16}; //! //! // Circular buffers have alignment requirements //! #[repr(align(512))] @@ -44,7 +44,7 @@ //! static RX_BUFFER: Buffer<[u16; 256]> = Buffer::new([0; 256]); //! static TX_BUFFER: Align = Align(Buffer::new([0; 256])); //! -//! let mut peripherals = imxrt1062_hal::Peripherals::take().unwrap(); +//! let mut peripherals = imxrt1060_hal::Peripherals::take().unwrap(); //! //! // //! // SPI setup... @@ -52,8 +52,8 @@ //! //! let (_, _, _, spi4_builder) = peripherals.spi.clock( //! &mut peripherals.ccm.handle, -//! imxrt1062_hal::ccm::spi::ClockSelect::Pll2, -//! imxrt1062_hal::ccm::spi::PrescalarSelect::LPSPI_PODF_5, +//! imxrt1060_hal::ccm::spi::ClockSelect::Pll2, +//! imxrt1060_hal::ccm::spi::PrescalarSelect::LPSPI_PODF_5, //! ); //! //! let mut spi4 = spi4_builder.build( @@ -453,7 +453,7 @@ pub enum Error

{ /// Use [`clock()`](struct.Unclocked.html#method.clock) to initialize and acquire all DMA channels /// /// ```no_run -/// let mut peripherals = imxrt1062_hal::Peripherals::take().unwrap(); +/// let mut peripherals = imxrt1060_hal::Peripherals::take().unwrap(); /// /// let mut dma_channels = peripherals.dma.clock(&mut peripherals.ccm.handle); /// let channel_27 = dma_channels[27].take().unwrap(); diff --git a/imxrt1060-hal/src/dma/buffer.rs b/imxrt1060-hal/src/dma/buffer.rs index 5d6fd056..3669bc51 100644 --- a/imxrt1060-hal/src/dma/buffer.rs +++ b/imxrt1060-hal/src/dma/buffer.rs @@ -21,7 +21,7 @@ use core::{ /// `Buffer`s should store arrays of `u8`, `u16`, or `u32` elements. /// /// ``` -/// use imxrt1062_hal::dma; +/// use imxrt1060_hal::dma; /// static UART2_DMA_RX: dma::Buffer<[u8; 256]> = dma::Buffer::new([0; 256]); /// ``` /// @@ -47,7 +47,7 @@ impl Buffer { /// May be used to allocate a `static` buffer. /// /// ``` - /// use imxrt1062_hal::dma; + /// use imxrt1060_hal::dma; /// static UART2_DMA_RX: dma::Buffer<[u8; 256]> = dma::Buffer::new([0; 256]); /// ``` pub const fn new(memory: B) -> Self { @@ -75,7 +75,7 @@ impl Buffer { /// the same buffer. /// /// ``` -/// use imxrt1062_hal::dma; +/// use imxrt1060_hal::dma; /// /// static DMA1_BUFFER: dma::Buffer<[u8; 256]> = dma::Buffer::new([0; 256]); /// @@ -150,7 +150,7 @@ where /// that there are no other mutable references to this memory. /// /// ``` - /// use imxrt1062_hal::dma; + /// use imxrt1060_hal::dma; /// /// let mut my_buffer: [u32; 128] = [0; 128]; /// // my_buffer is stack-allocated, so we need to ensure that the lifetime of @@ -270,7 +270,7 @@ unsafe impl Send for Linear {} /// # Example /// /// ``` -/// use imxrt1062_hal::dma; +/// use imxrt1060_hal::dma; /// /// // A newtype to enforce the required alignment /// #[repr(align(1024))] // 512 * 2 for size of u16 @@ -304,7 +304,7 @@ unsafe impl Send for Linear {} /// circular DMA queue: /// /// ``` -/// # use imxrt1062_hal::dma; +/// # use imxrt1060_hal::dma; /// #[repr(align(64))] /// struct Align(dma::Buffer<[u16; 30]>); /// static BUFFER: Align = Align(dma::Buffer::new([0; 30])); @@ -316,7 +316,7 @@ unsafe impl Send for Linear {} /// If the alignment is not a multiple of the size, we cannot create a circular DMA queue: /// /// ```no_run -/// # use imxrt1062_hal::dma; +/// # use imxrt1060_hal::dma; /// #[repr(align(256))] // Should be 1024 to account for u32 size /// struct Align(dma::Buffer<[u32; 256]>); /// static BUFFER: Align = Align(dma::Buffer::new([0; 256])); @@ -411,7 +411,7 @@ impl Circular { /// the memory. Caller must ensure that there are no other mutable references to this memory. /// /// ``` - /// use imxrt1062_hal::dma; + /// use imxrt1060_hal::dma; /// /// #[repr(align(64))] /// struct Align([u8; 64]); @@ -456,7 +456,7 @@ impl Circular { /// Clears the readable contents from the queue /// /// ``` - /// # use imxrt1062_hal::dma; + /// # use imxrt1060_hal::dma; /// # #[repr(align(64))] /// # struct Align(dma::Buffer<[u16; 32]>); /// # static BUFFER: Align = Align(dma::Buffer::new([0; 32])); @@ -504,7 +504,7 @@ impl Circular { /// `insert` may *not* insert all the elements into the buffer. /// /// ``` - /// use imxrt1062_hal::dma; + /// use imxrt1060_hal::dma; /// /// #[repr(align(64))] /// struct Align(dma::Buffer<[u16; 32]>); @@ -558,7 +558,7 @@ impl Circular { /// elements remain in the queue. /// /// ``` - /// # use imxrt1062_hal::dma; + /// # use imxrt1060_hal::dma; /// # #[repr(align(64))] /// # struct Align(dma::Buffer<[u16; 32]>); /// # static BUFFER: Align = Align(dma::Buffer::new([0; 32])); diff --git a/imxrt1060-hal/src/dma/memcpy.rs b/imxrt1060-hal/src/dma/memcpy.rs index 898e7885..d4cd27af 100644 --- a/imxrt1060-hal/src/dma/memcpy.rs +++ b/imxrt1060-hal/src/dma/memcpy.rs @@ -18,12 +18,12 @@ use core::{ /// # Example /// /// ```no_run -/// use imxrt1062_hal::dma; +/// use imxrt1060_hal::dma; /// /// static SOURCE: dma::Buffer<[u8; 32]> = dma::Buffer::new([0; 32]); /// static DESTINATION: dma::Buffer<[u8; 64]> = dma::Buffer::new([0; 64]); /// -/// let mut peripherals = imxrt1062_hal::Peripherals::take().unwrap(); +/// let mut peripherals = imxrt1060_hal::Peripherals::take().unwrap(); /// let mut dma_channels = peripherals.dma.clock(&mut peripherals.ccm.handle); /// let mut dma_channel = dma_channels[7].take().unwrap(); /// dma_channel.set_interrupt_on_completion(false); diff --git a/imxrt1060-hal/src/gpio.rs b/imxrt1060-hal/src/gpio.rs index f9cfe06a..9369940e 100644 --- a/imxrt1060-hal/src/gpio.rs +++ b/imxrt1060-hal/src/gpio.rs @@ -10,9 +10,9 @@ //! # Example //! //! ```no_run -//! use imxrt1062_hal::{self, gpio::GPIO}; +//! use imxrt1060_hal::{self, gpio::GPIO}; //! -//! let mut peripherals = imxrt1062_hal::Peripherals::take().unwrap(); +//! let mut peripherals = imxrt1060_hal::Peripherals::take().unwrap(); //! let input = GPIO::new(peripherals.iomuxc.ad_b0.p11); //! //! assert!(!input.is_set()); diff --git a/imxrt1060-hal/src/gpt.rs b/imxrt1060-hal/src/gpt.rs index 56f4cc12..f4683e4b 100644 --- a/imxrt1060-hal/src/gpt.rs +++ b/imxrt1060-hal/src/gpt.rs @@ -87,33 +87,33 @@ //! # Example //! //! ```no_run -//! use imxrt1062_hal; +//! use imxrt1060_hal; //! -//! let mut peripherals = imxrt1062_hal::Peripherals::take().unwrap(); +//! let mut peripherals = imxrt1060_hal::Peripherals::take().unwrap(); //! //! let (_, ipg_hz) = peripherals.ccm.pll1.set_arm_clock( -//! imxrt1062_hal::ccm::PLL1::ARM_HZ, +//! imxrt1060_hal::ccm::PLL1::ARM_HZ, //! &mut peripherals.ccm.handle, //! &mut peripherals.dcdc, //! ); //! //! let mut cfg = peripherals.ccm.perclk.configure( //! &mut peripherals.ccm.handle, -//! imxrt1062_hal::ccm::perclk::PODF::DIVIDE_3, -//! imxrt1062_hal::ccm::perclk::CLKSEL::IPG(ipg_hz), +//! imxrt1060_hal::ccm::perclk::PODF::DIVIDE_3, +//! imxrt1060_hal::ccm::perclk::CLKSEL::IPG(ipg_hz), //! ); //! //! let mut gpt1 = peripherals.gpt1.clock(&mut cfg); //! //! gpt1.set_output_interrupt_on_compare( -//! imxrt1062_hal::gpt::OutputCompareRegister::Three, +//! imxrt1060_hal::gpt::OutputCompareRegister::Three, //! true, //! ); //! gpt1.set_wait_mode_enable(true); -//! gpt1.set_mode(imxrt1062_hal::gpt::Mode::FreeRunning); +//! gpt1.set_mode(imxrt1060_hal::gpt::Mode::FreeRunning); //! //! gpt1.set_output_compare_duration( -//! imxrt1062_hal::gpt::OutputCompareRegister::Three, +//! imxrt1060_hal::gpt::OutputCompareRegister::Three, //! core::time::Duration::from_micros(765), //! ); //! ``` diff --git a/imxrt1060-hal/src/i2c.rs b/imxrt1060-hal/src/i2c.rs index 5f3b7e0b..5f026773 100644 --- a/imxrt1060-hal/src/i2c.rs +++ b/imxrt1060-hal/src/i2c.rs @@ -3,16 +3,16 @@ //! # Example //! //! ```no_run -//! use imxrt1062_hal; -//! use imxrt1062_hal::i2c::ClockSpeed; +//! use imxrt1060_hal; +//! use imxrt1060_hal::i2c::ClockSpeed; //! use embedded_hal::blocking::i2c::WriteRead; //! -//! let mut peripherals = imxrt1062_hal::Peripherals::take().unwrap(); +//! let mut peripherals = imxrt1060_hal::Peripherals::take().unwrap(); //! //! let (_, _, i2c3_builder, _) = peripherals.i2c.clock( //! &mut peripherals.ccm.handle, -//! imxrt1062_hal::ccm::i2c::ClockSelect::OSC, // 24MHz clock... -//! imxrt1062_hal::ccm::i2c::PrescalarSelect::DIVIDE_3, // Divide by 3 +//! imxrt1060_hal::ccm::i2c::ClockSelect::OSC, // 24MHz clock... +//! imxrt1060_hal::ccm::i2c::PrescalarSelect::DIVIDE_3, // Divide by 3 //! ); //! //! let mut i2c3 = i2c3_builder.build( diff --git a/imxrt1060-hal/src/pit.rs b/imxrt1060-hal/src/pit.rs index 1cffb708..b8fc43bf 100644 --- a/imxrt1060-hal/src/pit.rs +++ b/imxrt1060-hal/src/pit.rs @@ -3,21 +3,21 @@ //! # Example //! //! ```no_run -//! use imxrt1062_hal; +//! use imxrt1060_hal; //! use embedded_hal::timer::CountDown; //! -//! let mut peripherals = imxrt1062_hal::Peripherals::take().unwrap(); +//! let mut peripherals = imxrt1060_hal::Peripherals::take().unwrap(); //! //! let (_, ipg_hz) = peripherals.ccm.pll1.set_arm_clock( -//! imxrt1062_hal::ccm::PLL1::ARM_HZ, +//! imxrt1060_hal::ccm::PLL1::ARM_HZ, //! &mut peripherals.ccm.handle, //! &mut peripherals.dcdc, //! ); //! //! let mut cfg = peripherals.ccm.perclk.configure( //! &mut peripherals.ccm.handle, -//! imxrt1062_hal::ccm::perclk::PODF::DIVIDE_3, -//! imxrt1062_hal::ccm::perclk::CLKSEL::IPG(ipg_hz), +//! imxrt1060_hal::ccm::perclk::PODF::DIVIDE_3, +//! imxrt1060_hal::ccm::perclk::CLKSEL::IPG(ipg_hz), //! ); //! //! let (_, _, _, mut timer) = peripherals.pit.clock(&mut cfg); diff --git a/imxrt1060-hal/src/pwm.rs b/imxrt1060-hal/src/pwm.rs index 6f628dd1..74de59d7 100644 --- a/imxrt1060-hal/src/pwm.rs +++ b/imxrt1060-hal/src/pwm.rs @@ -16,16 +16,16 @@ //! # Example //! //! ```no_run -//! use imxrt1062_hal; -//! use imxrt1062_hal::pwm::Channel; +//! use imxrt1060_hal; +//! use imxrt1060_hal::pwm::Channel; //! use embedded_hal::Pwm; //! -//! let mut p = imxrt1062_hal::Peripherals::take().unwrap(); +//! let mut p = imxrt1060_hal::Peripherals::take().unwrap(); //! //! let (_, ipg_hz) = //! p.ccm //! .pll1 -//! .set_arm_clock(imxrt1062_hal::ccm::PLL1::ARM_HZ, &mut p.ccm.handle, &mut p.dcdc); +//! .set_arm_clock(imxrt1060_hal::ccm::PLL1::ARM_HZ, &mut p.ccm.handle, &mut p.dcdc); //! //! let mut pwm2 = p.pwm2.clock(&mut p.ccm.handle); //! @@ -35,9 +35,9 @@ //! &mut pwm2.handle, //! p.iomuxc.b0.p10, //! p.iomuxc.b0.p11, -//! imxrt1062_hal::pwm::Timing { -//! clock_select: imxrt1062_hal::ccm::pwm::ClockSelect::IPG(ipg_hz), -//! prescalar: imxrt1062_hal::ccm::pwm::Prescalar::PRSC_5, +//! imxrt1060_hal::pwm::Timing { +//! clock_select: imxrt1060_hal::ccm::pwm::ClockSelect::IPG(ipg_hz), +//! prescalar: imxrt1060_hal::ccm::pwm::Prescalar::PRSC_5, //! switching_period: core::time::Duration::from_micros(1000), //! }, //! ) diff --git a/imxrt1060-hal/src/spi.rs b/imxrt1060-hal/src/spi.rs index 99672757..309d9740 100644 --- a/imxrt1060-hal/src/spi.rs +++ b/imxrt1060-hal/src/spi.rs @@ -16,15 +16,15 @@ //! # Example //! //! ```no_run -//! use imxrt1062_hal; +//! use imxrt1060_hal; //! use embedded_hal::blocking::spi::Transfer; //! -//! let mut peripherals = imxrt1062_hal::Peripherals::take().unwrap(); +//! let mut peripherals = imxrt1060_hal::Peripherals::take().unwrap(); //! //! let (_, _, _, spi4_builder) = peripherals.spi.clock( //! &mut peripherals.ccm.handle, -//! imxrt1062_hal::ccm::spi::ClockSelect::Pll2, -//! imxrt1062_hal::ccm::spi::PrescalarSelect::LPSPI_PODF_5, +//! imxrt1060_hal::ccm::spi::ClockSelect::Pll2, +//! imxrt1060_hal::ccm::spi::PrescalarSelect::LPSPI_PODF_5, //! ); //! //! let mut spi4 = spi4_builder.build( @@ -35,7 +35,7 @@ //! //! spi4.enable_chip_select_0(peripherals.iomuxc.b0.p00); //! -//! spi4.set_clock_speed(imxrt1062_hal::spi::ClockSpeed(1_000_000)).unwrap(); +//! spi4.set_clock_speed(imxrt1060_hal::spi::ClockSpeed(1_000_000)).unwrap(); //! //! let mut buffer: [u8; 3] = [1, 2, 3]; //! spi4.transfer(&mut buffer).unwrap(); diff --git a/imxrt1060-hal/src/srtc.rs b/imxrt1060-hal/src/srtc.rs index 4b6f7a2b..c34579c2 100644 --- a/imxrt1060-hal/src/srtc.rs +++ b/imxrt1060-hal/src/srtc.rs @@ -10,9 +10,9 @@ //! # Example //! //! ```no_run -//! use imxrt1062_hal; +//! use imxrt1060_hal; //! -//! let mut peripherals = imxrt1062_hal::Peripherals::take().unwrap(); +//! let mut peripherals = imxrt1060_hal::Peripherals::take().unwrap(); //! //! let mut srtc = peripherals.srtc.enable_and_set(&mut peripherals.ccm.handle, 1600000000, 0); //! // Interpreted as Unix time: Sep 13 2020 12:26:40.000 diff --git a/imxrt1060-hal/src/uart.rs b/imxrt1060-hal/src/uart.rs index 7e899d07..ff5fa684 100644 --- a/imxrt1060-hal/src/uart.rs +++ b/imxrt1060-hal/src/uart.rs @@ -9,15 +9,15 @@ //! # Example //! //! ```no_run -//! use imxrt1062_hal; +//! use imxrt1060_hal; //! use embedded_hal::serial::{Read, Write}; //! -//! let mut peripherals = imxrt1062_hal::Peripherals::take().unwrap(); +//! let mut peripherals = imxrt1060_hal::Peripherals::take().unwrap(); //! //! let uarts = peripherals.uart.clock( //! &mut peripherals.ccm.handle, -//! imxrt1062_hal::ccm::uart::ClockSelect::OSC, -//! imxrt1062_hal::ccm::uart::PrescalarSelect::DIVIDE_1, +//! imxrt1060_hal::ccm::uart::ClockSelect::OSC, +//! imxrt1060_hal::ccm::uart::PrescalarSelect::DIVIDE_1, //! ); //! //! let mut uart = uarts @@ -31,7 +31,7 @@ //! //! uart.set_tx_fifo(core::num::NonZeroU8::new(3)); //! uart.set_rx_fifo(true); -//! uart.set_parity(Some(imxrt1062_hal::uart::Parity::Even)); +//! uart.set_parity(Some(imxrt1060_hal::uart::Parity::Even)); //! uart.set_rx_inversion(true); //! uart.set_tx_inversion(false); //!