Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GPIO input interrupts #109

Closed
mciantyre opened this issue Jun 28, 2021 · 9 comments · Fixed by #110
Closed

Support GPIO input interrupts #109

mciantyre opened this issue Jun 28, 2021 · 9 comments · Fixed by #110
Labels
enhancement New feature or request

Comments

@mciantyre
Copy link
Member

The 0.4 HAL does not have any way to support interrupts on GPIO inputs. This also applies to any previous version of imxrt-hal. Add and document an API that supports

  • enabling / disabling interrupts on a GPIO input
  • selecting the various edge / level configurations

Since this should be a brand-new feature, it should be possible to release in 0.4.5 without issues.

@mciantyre mciantyre added the enhancement New feature or request label Jun 28, 2021
@mciantyre
Copy link
Member Author

mciantyre commented Jun 28, 2021

There's a proof-of-concept in the prototype imxrt-async-hal. This method shows one way of setting the interrupt configuration (called a "trigger"). That method might be ported here without too much changing.

@algesten
Copy link
Contributor

algesten commented Jun 29, 2021

@mciantyre I'm happy to look into providing a PR. You kindly offered to mentor me, thanks!!! Just be warned that although I did hack 68000 assembler back in the 90s, I'm completely new to this microcontroller world. The three-letter acronyms do make my head spin at times.

Given the async example above, I understand which registers to modify in the ral. What is unclear to me is:

  • Would the user of teensy4-bsp register the ISR using [cortex_m_rt::interrupt] or do we do that for them? You say "...there's one ISR for every 16 GPIOs" (like GPIO4_Combined_16_31), I assume that means you get on interrupt for any of 16 pins. When interrupt fires, would we figure out which pin it concerned and dispatch to a per-pin provided ISR, or would we provide an API to figure out the pin that fired?

This is from the ral interrupts:

    GPIO1_INT0,
    GPIO1_INT1,
    GPIO1_INT2,
    GPIO1_INT3,
    GPIO1_INT4,
    GPIO1_INT5,
    GPIO1_INT6,
    GPIO1_INT7,
    GPIO1_Combined_0_15,
    GPIO1_Combined_16_31,
    GPIO2_Combined_0_15,
    GPIO2_Combined_16_31,
    GPIO3_Combined_0_15,
    GPIO3_Combined_16_31,
    GPIO4_Combined_0_15,
    GPIO4_Combined_16_31,
    GPIO5_Combined_0_15,
    GPIO5_Combined_16_31,
  • Now I understand the GPIO1_Combined_0_15 etc, but what are the GPIO1_INT0...?

It would be very helpful if we could sketch out (in pseudocode) the surface API in imxrt-hal (and maybe also teensy4-bsp if there's a level of abstraction there), and I can then figure out the in-between.

@mciantyre
Copy link
Member Author

mciantyre commented Jun 30, 2021

Would the user of teensy4-bsp register the ISR using [cortex_m_rt::interrupt] or do we do that for them?

To get started, let's require that the BSP or HAL end-user implements the interrupt with #[cortex_m_rt::interrupt]. The user will figure out which GPIO triggered, respond, and clear the interrupt. This will keep our implementation easier, and expose all the capabilities to the end user. We can revisit per-pin dispatch later, or build it separately and generally.

Now I understand the GPIO1_Combined_0_15 etc, but what are the GPIO1_INT0...?

For i.MX RT chips in the 1060 family, the first eight pins of GPIO1 can dispatch to a dedicated ISR. These eight interrupts complement what would also be signaled through GPIO1_Combined_0_15.

However, these interrupts aren't available on all i.MX RT chips. Take a look at the 1011 interrupts to see a chip variant that doesn't support anything like this. (Today's HAL is focused on the 1060, so this is just a note for the future.)

Additionally, the 1060 has the GPIO6_7_8_9 interrupt, sitting at the back of the vector table. When GPIOs are configured for fast mode, they'll trigger that interrupt, which handles up to 32 * 4 GPIO inputs. This also isn't supported on all i.MX RT chips. But, we'll need to handle the transitions from normal to fast GPIO modes when considering interrupt configurations.

It would be very helpful if we could sketch out (in pseudocode) the surface API in imxrt-hal (and maybe also teensy4-bsp if there's a level of abstraction there)

I think these five GPIO input methods would be all we need:

/// GPIO input interrupt configurations.
///
/// These configurations do not take effect until
/// GPIO input interrupts are enabled.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u32)]
pub enum InterruptConfiguration {
    LowLevelSensitive = 0,
    HighLevelSensitive = 1,
    RisingEdgeSensitive = 2,
    FallingEdgeSensitive = 3,
    EitherEdgeSensitive = 4,
}

impl<P> GPIO<P, Input>
where
    P: Pin,
{
    /// Enable (`true`) or disable (`false`) interrupts for this
    /// GPIO input
    pub fn set_interrupt_enable(&mut self, enable: bool) { /* ... */ }

    /// Indicates if interrupts are (`true`) or are not (`false`)
    /// enabled for this GPIO input
    pub fn is_interrupt_enabled(&self) -> bool { /* ... */  }

    /// Set the interrupt configuration for this GPIO input
    pub fn set_interrupt_configuration(&mut self, interrupt_configuration: InterruptConfiguration) { /* ... */ }

    /// Indicates if this GPIO input triggered an interrupt.
    pub fn is_interrupt_status(&self) -> bool { /* ... */ }

    /// Clear the interrupt status flag.
    pub fn clear_interrupt_status(&mut self) { /* ... */ }
}

with usage in a BSP resembling

use cortex_m::interrupt::{self, Mutex};
use core::cell::RefCell;
use imxrt_hal::gpio::{GPIO, Input, InterruptConfiguration};

type InputPin = GPIO<Input, /* Pad that maps to GPIO1_18... */>;

static INPUT_PIN: Mutex<RefCell<Optional<InputPin>>> = Mutex::new(RefCell::new(None));

#[cortex_m_rt::interrupt]
fn GPIO1_Combined_16_31() {
    interrupt::free(|cs| {
        let input = INPUT_PIN.borrow(cs);
        let mut input = input.borrow_mut();
        let input = input.as_mut().unwrap();

        if input.is_interrupt_status() {
            // This pin triggered! Do something here...
            input.clear_interupt_status();
        }
    });
}

#[cortex_m_rt::entry]
fn main() -> ! {
    // Get peripherals...
    // Set up pins...
    // Set up GPIO1_18...
    gpio1_18.set_interrupt_configuration(InterruptConfiguration::RisingEdgeSensitive);
    gpio1_18.set_interrupt_enable(true);
    // Move gpio1_18 into INPUT_PIN mutex...
    // Unmask GPIO1_Combined_16_31 in NVIC...
    loop { /* Do things, wait for interrupt */ }
}

@algesten
Copy link
Contributor

algesten commented Jun 30, 2021

@mciantyre Thanks for the guidance. That all makes sense. I've taken a first stab at the PR, but for some reason I can't get it to work just yet. Maybe there is some obviously problem you spot?

If it all looks good, I'll continue testing and debugging it. Here's my test code.

type InputPin = GPIO<P6, Input>;

fn setup_gpio_interrupt(mut pin: InputPin) {
    static INPUT_PIN: Mutex<RefCell<Option<InputPin>>> = Mutex::new(RefCell::new(None));

    #[cortex_m_rt::interrupt]
    fn GPIO1_Combined_0_15() {
        cortex_m::interrupt::free(|cs| {
            info!("interrupt!");

            INPUT_PIN.borrow(cs).borrow_mut().as_mut().map(|pin| {
                info!("Is interrupt: {}", pin.is_interrupt_status());
                pin.clear_interrupt_status();
            });
        });
    }

    cortex_m::interrupt::free(|cs| {
        pin.set_interrupt_configuration(InterruptConfiguration::RisingEdgeSensitive);
        pin.set_interrupt_enable(true);

        *INPUT_PIN.borrow(cs).borrow_mut() = Some(pin);

        unsafe { cortex_m::peripheral::NVIC::unmask(bsp::interrupt::GPIO1_Combined_0_15) };
    });
}

Things I'm unsure about:

  • P6 is B0_10, which I hope is in GPIO1_Combined_0_15, is that so?
  • I've added a pull-down resistor to GND on P6, is that needed?
  • Does the order of set_interrupt_configuration and set_interrupt_enable matter?
  • A few questions in the PR as well.

@mciantyre
Copy link
Member Author

The setup_gpio_interrupt function looks good! Great use of scoping.

P6 is B0_10, which I hope is in GPIO1_Combined_0_15, is that so?

Pin 6 on the Teensy 4 is B0_10. But, B0_10 is GPIO2_6. Our function is registering a GPIO1 interrupt. This might be why we're seeing issues. We could try to change the interrupt to GPIO2_Combined_0_15.

There's two ways to correlate a pad to a GPIO:

  • Check the reference manual. Chapter 10 of the i.MX RT 1060 reference manual has a table of pads to functions. To source the reference manual, check the contributing guide.
  • We can use the imxrt-iomuxc crate's documentation. Browse to the gpio::Pin documentation, and scroll down to see the implementors. Expand the implementation for B0_06, and it reveals the GPIO implementation.

I've added a pull-down resistor to GND on P6, is that needed?

Depends on the rest of the circuit. The imxrt-iomuxc crate provides the pin configuration API if you'd like to change the pin's internal settings.

When prototyping in the imxrt-async-hal crate, I wired Teensy 4 pins directly together without changing the pad configurations. Worked for prototyping, but I might have been lucky.

Does the order of set_interrupt_configuration and set_interrupt_enable matter?

As written in the critical section, the order shouldn't matter. Without the critical section, we'll need to consider if the enable call could immediately trigger an interrupt before we could set the configuration, and if that's OK.

@algesten
Copy link
Contributor

algesten commented Jul 4, 2021

@mciantyre thanks! That makes sense.

I've made amends in the PR based on your feedback, and two more questions popped up (see PR).

I understand how to get from pin to interrupt now, however it's a bit opaque. Maybe we can make a point of documenting that well in the example we land after this PR?

The breadboard is currently stashed away (I rage quit after failing to get this I/O expander chip to talk SPI with me), but it's coming out in a couple of days, I'll rig and test the interrupt code then.

@algesten
Copy link
Contributor

algesten commented Jul 5, 2021

So, I got the breadboard up again, and there's some progress.

I tested using Pin6 with GPIO2_Combined_0_15 and also Pin20 which I believe is GPIO1_Combined_16_31. Both with similar result. I have the pin with external pull-down to GND (4.7K) and then use a 3.3V lead to touch it.

  • For EitherEdge, it seems to work. It fires both when touching and removing - often more than once which I assume is because I don't make a perfect immediate connection.
  • For any other edge config, the ISR is just constantly firing until I touch the pin with 3.3V, in which case it pauses.

I assume I got some error in the set_interrupt_configuration - I need to dig into that more tomorrow. See if I can understand the reference manual on this.

@algesten
Copy link
Contributor

algesten commented Jul 5, 2021

Actually. I just figured it out. Test error. All works well!

@algesten
Copy link
Contributor

algesten commented Jul 5, 2021

The only thing left to test in that PR is the fast switching. I'll do that tomorrow.

mciantyre added a commit to mciantyre/imxrt-hal that referenced this issue Sep 18, 2021
Documentation and examples came from development discussions. See
discussions on imxrt-rs#109 for details.
mciantyre added a commit to algesten/imxrt-hal that referenced this issue Sep 18, 2021
Documentation and examples came from development discussions. See
discussions on imxrt-rs#109 for details.
teburd pushed a commit that referenced this issue Oct 28, 2021
Documentation and examples came from development discussions. See
discussions on #109 for details.
mciantyre added a commit to mciantyre/imxrt-hal that referenced this issue Dec 3, 2021
Documentation and examples came from development discussions. See
discussions on imxrt-rs#109 for details.
dstric-aqueduct added a commit to aqueductfluidics/imxrt-hal that referenced this issue Dec 14, 2022
commit 68677eb
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Dec 12 16:21:30 2022 -0500

    resolve PR Issues

    artifacts of non-existent feature: imxrt-rs#122 (comment)

    remove constrain function and use core::cmp::Ordering::clamp trait: imxrt-rs#122 (comment)

commit 081d027
Merge: 2ab80a7 6da6c97
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Dec 12 16:00:55 2022 -0500

    Merge branch 'dev/can' into maint-v0.4

commit 6da6c97
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Dec 12 10:03:39 2022 -0500

    package update

commit 111f429
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Dec 12 09:59:11 2022 -0500

    rename package

commit e071a4d
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Dec 12 07:28:15 2022 -0500

    update

commit 13b396c
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sat Dec 10 13:12:28 2022 -0500

    Update frame.rs

commit 118d51e
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sat Dec 10 11:53:47 2022 -0500

    update

commit e51d7dc
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Fri Dec 9 13:24:22 2022 -0500

    updates

commit e9d8df8
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Dec 8 07:34:16 2022 -0500

    init refactor

commit 8831af2
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Dec 7 14:40:45 2022 -0500

    update

commit b4b52d1
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Dec 7 07:03:21 2022 -0500

    mask update

commit fef5223
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Tue Dec 6 20:04:47 2022 -0500

    update

commit bc428c0
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Tue Dec 6 05:39:18 2022 -0500

    Update mod.rs

commit adbd1bd
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Fri Dec 2 07:48:31 2022 -0500

    update

commit 4ab5ee0
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Dec 1 16:07:04 2022 -0500

    Update mod.rs

commit 8026f2a
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Dec 1 12:14:10 2022 -0500

    update

commit 588ac9b
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Dec 1 08:35:08 2022 -0500

    update

commit 486a7c4
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 30 13:22:08 2022 -0500

    Update id.rs

commit b0e15d7
Merge: 687af5b 0ec2e73
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 30 06:43:22 2022 -0500

    Merge branch 'dev/can' of https://github.com/dstric-aqueduct/imxrt-hal into dev/can

commit 687af5b
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 30 06:43:20 2022 -0500

    update

commit 0ec2e73
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 30 06:41:53 2022 -0500

    update

commit a12871c
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 28 10:21:22 2022 -0500

    Update isotp.rs

commit 52934a6
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sun Nov 27 08:02:55 2022 -0500

    update

commit 78183fc
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sun Nov 27 07:09:41 2022 -0500

    Update mod.rs

commit c367a4e
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sun Nov 27 06:53:55 2022 -0500

    Update mod.rs

commit ff22943
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sat Nov 26 18:41:20 2022 -0500

    update

commit 037b404
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sat Nov 26 07:11:48 2022 -0500

    update

commit ae00b21
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sat Nov 26 06:08:08 2022 -0500

    Update mod.rs

commit a9e80e8
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Fri Nov 25 06:03:13 2022 -0500

    Update mod.rs

commit 284997f
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Nov 24 10:51:20 2022 -0500

    Update mod.rs

commit ecca971
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 23 18:25:35 2022 -0500

    Update mod.rs

commit 1de0d0c
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 23 18:23:39 2022 -0500

    Update mod.rs

commit 5bf1d98
Merge: 1ebb9e6 0ef6987
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 23 05:51:14 2022 -0500

    Merge branch 'dev/can' of https://github.com/dstric-aqueduct/imxrt-hal into dev/can

commit 1ebb9e6
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 23 05:48:57 2022 -0500

    Update mod.rs

commit 0ef6987
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 21 19:22:07 2022 -0500

    Update mod.rs

commit 83c0c2a
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 21 15:43:32 2022 -0500

    Update mod.rs

commit 6e16125
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 21 14:24:56 2022 -0500

    Update mod.rs

commit e27f4d5
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 21 10:04:34 2022 -0500

    Update mod.rs

commit 10a66d2
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 21 07:23:49 2022 -0500

    updates

commit 6362ad6
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Nov 17 13:52:52 2022 -0500

    init

commit 2ab80a7
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Sun Jan 9 23:21:22 2022 +0100

    impr. docs

commit 90f36ef
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Sat Jan 8 23:03:38 2022 +0100

    review

commit 1322f91
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Thu Jan 6 20:02:23 2022 +0100

    use modify_reg

commit 386b680
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Thu Jan 6 18:07:02 2022 +0100

    review fixes

commit 229d3ae
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Wed Jan 5 21:27:43 2022 +0100

    figuring out that ```ignore fixed the pipeline

commit be68c9c
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Wed Jan 5 11:16:16 2022 +0100

    fixing documentation

commit 173b525
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Wed Jan 5 11:08:00 2022 +0100

    changing to mC to avoid f32

commit 5daf3cc
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Tue Jan 4 19:52:55 2022 +0100

    add tempmon support

commit 9b85614
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Tue Jan 4 19:00:32 2022 +0100

    add tempmon

commit 08aa861
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Dec 2 19:15:32 2021 -0500

    Bump HAL version to 0.4.5

commit 7437482
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Dec 2 19:11:59 2021 -0500

    Document 0.4.5 release in CHANGELOG

commit 50d3677
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Dec 2 19:04:01 2021 -0500

    Update CHANGELOG with TRNG error code fix

commit 18fabf3
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Thu Dec 2 00:08:59 2021 -0800

    Follow rand_core API

commit 9a3727f
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sat Sep 18 13:24:38 2021 -0400

    Add GPIO interrupt documentation, code snippet

    Documentation and examples came from development discussions. See
    discussions on imxrt-rs#109 for details.

commit 7121735
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sat Sep 18 12:40:25 2021 -0400

    Update CHANGELOG

commit 44c76a7
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sat Sep 18 11:10:37 2021 -0400

    Implement icr_mask for GPIO inputs

commit f69bd80
Author: Martin Algesten <martin@algesten.se>
Date:   Mon Jul 12 22:51:50 2021 +0200

    Update imxrt1060-hal/src/gpio.rs

    Co-authored-by: Ian McIntyre <ianpmcintyre@gmail.com>

commit 7218aa2
Author: Martin Algesten <martin@algesten.se>
Date:   Mon Jul 5 22:37:45 2021 +0200

    Fix error 032 vs 0u32

commit 87bc829
Author: Martin Algesten <martin@algesten.se>
Date:   Sun Jul 4 11:13:08 2021 +0200

    Clear out interrupt config when transitioning to output

commit 7259132
Author: Martin Algesten <martin@algesten.se>
Date:   Sun Jul 4 11:12:45 2021 +0200

    Preserve interrupt config on set_fast()

commit 5a158ff
Author: Martin Algesten <martin@algesten.se>
Date:   Sun Jul 4 10:50:35 2021 +0200

    Amends after PR feedback

commit 1703b81
Author: Martin Algesten <martin@algesten.se>
Date:   Sun Jul 4 10:43:24 2021 +0200

    Update imxrt1060-hal/src/gpio.rs

    Co-authored-by: Ian McIntyre <ianpmcintyre@gmail.com>

commit 9bab8d3
Author: Martin Algesten <martin@algesten.se>
Date:   Wed Jun 30 17:22:02 2021 +0200

    GPIO functions to enable / configure interrupts

    cortex_m_rt provides the hook for the ISR and the `NVIC::unmask`,
    however to configure a GPIO interrupt there are some additional
    steps needed.

    This commit provides set_interrupt_enable, set_interrupt_configuration
    and clear_interrupt_status (and some additional query functions).

commit e6e9e47
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Jun 28 22:11:08 2021 -0400

    Isolate fast / normal GPIO configuration copy

    The new implementation is consistent with the previous behavior. We're
    setting the stage for copying over interrupt settings.

commit b79b4de
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Jun 28 21:57:31 2021 -0400

    Rename GPIO "offset" to "mask"

    The usage resembles a bitmask with a single set bit. The name is easier
    to reason about.

commit cd6e3f5
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Fri Apr 23 18:42:43 2021 -0400

    Bump imxrt-ral to 0.4.4

commit f9c58fe
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Fri Apr 23 18:41:09 2021 -0400

    Document 0.4.4 release date in CHANGELOG

    Fix 0.4.3 release date (wrong year).

commit 418e97c
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Apr 22 20:33:53 2021 -0400

    Update CHANGELOG with PWM fix

commit 29cc21a
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Apr 22 20:25:23 2021 -0400

    Prepare PWM pins when constructing outputs

    In the 0.3 HAL, we relied on the user to set the pin alternate
    settings. But after introducing the IOMUXC crate in 0.4, we made pin
    muxing part of the driver's responsibility, and added calls to prepare
    pins. We missed the requirement in the PWM driver. This commit
    corrects the PWM driver, which has been broken since the 0.4 release.

    Tested in the teensy4-rs repo. Users who are not able to adopt the
    next patch release could add equivalent iomuxc calls before
    constructing their PWM driver.

commit 124a811
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Apr 5 20:20:00 2021 -0400

    Bump imxrt-hal to 0.4.3

commit 98c8cbd
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Apr 5 20:19:35 2021 -0400

    Add 0.4.3 CHANGELOG entry

commit 2a97740
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Wed Mar 31 22:50:56 2021 -0400

    Update CHANGELOG

commit 4935e6a
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Wed Mar 31 22:21:23 2021 -0400

    Allow deprecated atomic::spin_loop_hint()

    Clippy suggests that we start using core::hint::spin_loop(). This new
    function was introduced in Rust 1.49, and replaces spin_loop_hint().
    We're not going to issue that breaking change right now. So, we'll
    mark the existing usages as OK.

    TODO:

    - Pin a clippy, compiler, toolchain version in CI
    - Figure out a MSRV, maybe

commit 27d8518
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Wed Mar 31 22:18:32 2021 -0400

    Allow upper case names, acronyms

    New clippy is very aggressive about proper naming. We're not
    following proper naming in the 0.4 HAL. Disable the warnings for
    now.

commit 2658b74
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Wed Mar 31 21:33:38 2021 -0400

    Address clippy warnings in AdcSource

commit be6006e
Author: Lane Kolbly <lane@rscheme.org>
Date:   Sun Mar 28 10:15:10 2021 -0500

    Implement ADC DMA source

    This commit makes the ADCs a possible source for DMA operations.

commit 8f457ed
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Mar 22 20:10:44 2021 -0400

    Update CHANGELOG

commit 227f375
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Mar 22 20:06:14 2021 -0400

    Add CI for 1061, 1064 features

commit e3c77a0
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Mar 22 19:59:05 2021 -0400

    Add support for the 1061

    See the data sheet for differences. One notable change is that the
    1061 doesn't have the graphics features (LCD, CSI, pixel pipeline).
    We don't have drivers for these peripherals today, so the HAL can
    support these features without issue.

commit 5256dd9
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sat Mar 20 19:46:39 2021 -0400

    Enable the imxrt1064 feature

    The HAL builds with the `imxrt1064` feature:

      cd imxrt-hal
      cargo build --features imxrt1064

    It has not been tested on hardware. Only thing that seems to change
    is the FlexSPI2 IOMUXC registers are reserved. Everything else is the
    same.

commit 357a71a
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Tue Nov 17 19:36:06 2020 -0500

    Bump imxrt-hal to 0.4.2

commit f8514f9
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Tue Nov 17 19:40:10 2020 -0500

    Update CHANGELOG

commit 61dccd9
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Tue Nov 17 19:33:40 2020 -0500

    Explicitly depend on imxrt-iomuxc 0.1.2

    That release introduces the ADC pins, which are required for the
    current HAL.

commit c4a4111
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Tue Nov 17 19:30:58 2020 -0500

    Update README and release docs

    The documentation in this branch should still be useful. This commit
    revises our documentation to reflect the broader imxrt-rs org.

commit 0567ab4
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Tue Nov 17 19:08:25 2020 -0500

    Remove iomuxc crate from 0.4 branch

    It's been moved to a separate repo. This change is to prevent someone
    from accidentally releasing the iomuxc crate from this repo.

commit 8efe35c
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Nov 16 20:44:37 2020 -0500

    Remove RAL from 0.4 branch

    Manually removing the RAL, since it's already been removed in master.
    This is to ensure that we don't accidentally depend on something in
    this 0.4 maintenance branch that isn't correctly reflected in our RAL
    repo.

commit bf0bbfa
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Nov 16 19:39:22 2020 -0500

    Fix CHANGELOG entrie for unreleased fixes

    Added the error correction to the wrong "Fix" header

commit f1301cc
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Nov 16 19:27:38 2020 -0500

    Update CHANGELOG describing fix for errors

commit 429b9fa
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Sun Nov 15 08:41:46 2020 -0800

    Only allow HAL to create I2C/SPI config errors

commit 0878f7a
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Nov 16 19:34:32 2020 -0500

    Update CHANGELOG with TRNG addition

commit c697e69
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Tue Nov 17 11:43:32 2020 -0800

    Fix comment, don't preserve bad value

commit 7470642
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Sun Nov 15 08:33:16 2020 -0800

    Preserve settings, fix error privacy

commit 12dba78
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Sat Nov 14 06:05:44 2020 -0800

    Add optional RngCore impl

commit 51f4644
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Fri Oct 9 03:23:32 2020 -0700

    Implement basic support for the TRNG

    Limited configurability but it works.

commit f819cc5
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Oct 15 18:52:25 2020 -0400

    hal: add CHANGELOG entry for ADC feature

commit de9cdca
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Wed Oct 14 21:46:21 2020 -0400

    (Hopefully) removed Cargo.toml from changes

commit 93bb6cd
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Wed Oct 14 20:40:34 2020 -0400

    Implemented suggestions

commit fdae6ed
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Wed Oct 7 13:06:54 2020 -0400

    3rd time's a charm, fix CI issues

commit b2335df
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Wed Oct 7 12:41:52 2020 -0400

    Hopefully actually fixed build issues

commit 8a966bc
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Tue Oct 6 22:54:22 2020 -0400

    Fixed issues from checks

commit 88d02cd
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Tue Oct 6 22:36:58 2020 -0400

    Finished up comments & example

commit 1f6aa15
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Tue Oct 6 00:16:22 2020 -0400

    Changed AnalogPin creation

commit 22ac89b
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Mon Oct 5 21:12:12 2020 -0400

    Added adc to peripherals

commit 684592e
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Mon Oct 5 21:05:44 2020 -0400

    Added input data for all IMXRT106x pins

commit 744ce70
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Mon Oct 5 20:58:36 2020 -0400

    Potential ADC implementation take 1

commit 3f98a20
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Sun Oct 4 23:54:02 2020 -0400

    Transfer work to fork

commit b7a1a56
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sat Oct 10 20:58:36 2020 -0400

    imxrt-hal: add CHANGELOG entry for SRTC

commit 24b73db
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Thu Oct 8 22:32:09 2020 -0700

    Update following review

commit f9b71bd
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Tue Oct 6 17:00:38 2020 -0700

    Use microseconds, add get_with_micros

commit 0bea36d
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Tue Oct 6 14:02:07 2020 -0700

    Revert "Add get_f64"

    This reverts commit aec0ed6.

commit 597a113
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Sun Oct 4 22:37:34 2020 -0700

    Add get_f64

commit 665e1c8
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Sun Oct 4 21:28:19 2020 -0700

    Update for review and sub-second times

    Now exclusively enables and uses the SRTC.

commit 72f57aa
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Fri Oct 2 17:04:38 2020 -0700

    Implement basic RTC support

    Supports enabling and setting the clocks.

commit f77c16a
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sun Sep 13 08:01:34 2020 -0400

    hal: Prepare release 0.4.1

commit c1a7d32
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sun Sep 13 07:51:33 2020 -0400

    hal: Add CHANGELOG entry for GPIO fast mode fix

commit c8ff33f
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sun Sep 13 07:48:16 2020 -0400

    gpio: Clarify 'state' in set_fast() documentation

commit 887a8e1
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sun Sep 13 07:33:48 2020 -0400

    gpio: Fix GPIO high-speed state inconsistency

    There are two valid ways to prepare a high-speed GPIO output:

    ```rust
    pub fn configure_led(pad: LedPadType) -> LED {
        let mut led = hal::gpio::GPIO::new(pad);
        led.set_fast(true);
        led.output()
    }
    ```

    and

    ```rust
    pub fn configure_led(pad: LedPadType) -> LED {
        let mut led = hal::gpio::GPIO::new(pad).output();
        led.set_fast(true);
        led
    }
    ```

    the former will put the GPIO into high-speed, or 'fast,' mode before
    setting 'output mode.' The latter will put the GPIO into output mode
    before fast mode.

    After transitioning into fast mode, the GPIO will start to reference
    a different GPIO register block. The issue is that, after entering
    fast mode, the output / input state of the pin is not maintained. In
    the second snippet, the set_fast(true) call ends up reverting the
    GPIO state back to 'input,' since the newly-referenced register block
    does not maintain the same GPIO input / output configuration.

    This commit updates the set_fast() method to maintain the GPIO I/O
    state for the new register block. It makes it so that either of the
    above patterns work.
dstric-aqueduct added a commit to aqueductfluidics/imxrt-hal that referenced this issue Dec 14, 2022
remove const def of base registers

fix to hard code Can clock source to OSC

see: imxrt-rs#122 (comment)

Squashed commit of the following:

commit 68677eb
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Dec 12 16:21:30 2022 -0500

    resolve PR Issues

    artifacts of non-existent feature: imxrt-rs#122 (comment)

    remove constrain function and use core::cmp::Ordering::clamp trait: imxrt-rs#122 (comment)

commit 081d027
Merge: 2ab80a7 6da6c97
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Dec 12 16:00:55 2022 -0500

    Merge branch 'dev/can' into maint-v0.4

commit 6da6c97
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Dec 12 10:03:39 2022 -0500

    package update

commit 111f429
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Dec 12 09:59:11 2022 -0500

    rename package

commit e071a4d
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Dec 12 07:28:15 2022 -0500

    update

commit 13b396c
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sat Dec 10 13:12:28 2022 -0500

    Update frame.rs

commit 118d51e
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sat Dec 10 11:53:47 2022 -0500

    update

commit e51d7dc
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Fri Dec 9 13:24:22 2022 -0500

    updates

commit e9d8df8
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Dec 8 07:34:16 2022 -0500

    init refactor

commit 8831af2
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Dec 7 14:40:45 2022 -0500

    update

commit b4b52d1
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Dec 7 07:03:21 2022 -0500

    mask update

commit fef5223
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Tue Dec 6 20:04:47 2022 -0500

    update

commit bc428c0
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Tue Dec 6 05:39:18 2022 -0500

    Update mod.rs

commit adbd1bd
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Fri Dec 2 07:48:31 2022 -0500

    update

commit 4ab5ee0
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Dec 1 16:07:04 2022 -0500

    Update mod.rs

commit 8026f2a
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Dec 1 12:14:10 2022 -0500

    update

commit 588ac9b
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Dec 1 08:35:08 2022 -0500

    update

commit 486a7c4
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 30 13:22:08 2022 -0500

    Update id.rs

commit b0e15d7
Merge: 687af5b 0ec2e73
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 30 06:43:22 2022 -0500

    Merge branch 'dev/can' of https://github.com/dstric-aqueduct/imxrt-hal into dev/can

commit 687af5b
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 30 06:43:20 2022 -0500

    update

commit 0ec2e73
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 30 06:41:53 2022 -0500

    update

commit a12871c
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 28 10:21:22 2022 -0500

    Update isotp.rs

commit 52934a6
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sun Nov 27 08:02:55 2022 -0500

    update

commit 78183fc
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sun Nov 27 07:09:41 2022 -0500

    Update mod.rs

commit c367a4e
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sun Nov 27 06:53:55 2022 -0500

    Update mod.rs

commit ff22943
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sat Nov 26 18:41:20 2022 -0500

    update

commit 037b404
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sat Nov 26 07:11:48 2022 -0500

    update

commit ae00b21
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Sat Nov 26 06:08:08 2022 -0500

    Update mod.rs

commit a9e80e8
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Fri Nov 25 06:03:13 2022 -0500

    Update mod.rs

commit 284997f
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Nov 24 10:51:20 2022 -0500

    Update mod.rs

commit ecca971
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 23 18:25:35 2022 -0500

    Update mod.rs

commit 1de0d0c
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 23 18:23:39 2022 -0500

    Update mod.rs

commit 5bf1d98
Merge: 1ebb9e6 0ef6987
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 23 05:51:14 2022 -0500

    Merge branch 'dev/can' of https://github.com/dstric-aqueduct/imxrt-hal into dev/can

commit 1ebb9e6
Author: dstric-aqueduct <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Wed Nov 23 05:48:57 2022 -0500

    Update mod.rs

commit 0ef6987
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 21 19:22:07 2022 -0500

    Update mod.rs

commit 83c0c2a
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 21 15:43:32 2022 -0500

    Update mod.rs

commit 6e16125
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 21 14:24:56 2022 -0500

    Update mod.rs

commit e27f4d5
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 21 10:04:34 2022 -0500

    Update mod.rs

commit 10a66d2
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Mon Nov 21 07:23:49 2022 -0500

    updates

commit 6362ad6
Author: djstrickland <96876452+dstric-aqueduct@users.noreply.github.com>
Date:   Thu Nov 17 13:52:52 2022 -0500

    init

commit 2ab80a7
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Sun Jan 9 23:21:22 2022 +0100

    impr. docs

commit 90f36ef
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Sat Jan 8 23:03:38 2022 +0100

    review

commit 1322f91
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Thu Jan 6 20:02:23 2022 +0100

    use modify_reg

commit 386b680
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Thu Jan 6 18:07:02 2022 +0100

    review fixes

commit 229d3ae
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Wed Jan 5 21:27:43 2022 +0100

    figuring out that ```ignore fixed the pipeline

commit be68c9c
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Wed Jan 5 11:16:16 2022 +0100

    fixing documentation

commit 173b525
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Wed Jan 5 11:08:00 2022 +0100

    changing to mC to avoid f32

commit 5daf3cc
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Tue Jan 4 19:52:55 2022 +0100

    add tempmon support

commit 9b85614
Author: Alex Halemba <alex-halemba@gmx.de>
Date:   Tue Jan 4 19:00:32 2022 +0100

    add tempmon

commit 08aa861
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Dec 2 19:15:32 2021 -0500

    Bump HAL version to 0.4.5

commit 7437482
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Dec 2 19:11:59 2021 -0500

    Document 0.4.5 release in CHANGELOG

commit 50d3677
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Dec 2 19:04:01 2021 -0500

    Update CHANGELOG with TRNG error code fix

commit 18fabf3
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Thu Dec 2 00:08:59 2021 -0800

    Follow rand_core API

commit 9a3727f
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sat Sep 18 13:24:38 2021 -0400

    Add GPIO interrupt documentation, code snippet

    Documentation and examples came from development discussions. See
    discussions on imxrt-rs#109 for details.

commit 7121735
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sat Sep 18 12:40:25 2021 -0400

    Update CHANGELOG

commit 44c76a7
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sat Sep 18 11:10:37 2021 -0400

    Implement icr_mask for GPIO inputs

commit f69bd80
Author: Martin Algesten <martin@algesten.se>
Date:   Mon Jul 12 22:51:50 2021 +0200

    Update imxrt1060-hal/src/gpio.rs

    Co-authored-by: Ian McIntyre <ianpmcintyre@gmail.com>

commit 7218aa2
Author: Martin Algesten <martin@algesten.se>
Date:   Mon Jul 5 22:37:45 2021 +0200

    Fix error 032 vs 0u32

commit 87bc829
Author: Martin Algesten <martin@algesten.se>
Date:   Sun Jul 4 11:13:08 2021 +0200

    Clear out interrupt config when transitioning to output

commit 7259132
Author: Martin Algesten <martin@algesten.se>
Date:   Sun Jul 4 11:12:45 2021 +0200

    Preserve interrupt config on set_fast()

commit 5a158ff
Author: Martin Algesten <martin@algesten.se>
Date:   Sun Jul 4 10:50:35 2021 +0200

    Amends after PR feedback

commit 1703b81
Author: Martin Algesten <martin@algesten.se>
Date:   Sun Jul 4 10:43:24 2021 +0200

    Update imxrt1060-hal/src/gpio.rs

    Co-authored-by: Ian McIntyre <ianpmcintyre@gmail.com>

commit 9bab8d3
Author: Martin Algesten <martin@algesten.se>
Date:   Wed Jun 30 17:22:02 2021 +0200

    GPIO functions to enable / configure interrupts

    cortex_m_rt provides the hook for the ISR and the `NVIC::unmask`,
    however to configure a GPIO interrupt there are some additional
    steps needed.

    This commit provides set_interrupt_enable, set_interrupt_configuration
    and clear_interrupt_status (and some additional query functions).

commit e6e9e47
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Jun 28 22:11:08 2021 -0400

    Isolate fast / normal GPIO configuration copy

    The new implementation is consistent with the previous behavior. We're
    setting the stage for copying over interrupt settings.

commit b79b4de
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Jun 28 21:57:31 2021 -0400

    Rename GPIO "offset" to "mask"

    The usage resembles a bitmask with a single set bit. The name is easier
    to reason about.

commit cd6e3f5
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Fri Apr 23 18:42:43 2021 -0400

    Bump imxrt-ral to 0.4.4

commit f9c58fe
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Fri Apr 23 18:41:09 2021 -0400

    Document 0.4.4 release date in CHANGELOG

    Fix 0.4.3 release date (wrong year).

commit 418e97c
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Apr 22 20:33:53 2021 -0400

    Update CHANGELOG with PWM fix

commit 29cc21a
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Apr 22 20:25:23 2021 -0400

    Prepare PWM pins when constructing outputs

    In the 0.3 HAL, we relied on the user to set the pin alternate
    settings. But after introducing the IOMUXC crate in 0.4, we made pin
    muxing part of the driver's responsibility, and added calls to prepare
    pins. We missed the requirement in the PWM driver. This commit
    corrects the PWM driver, which has been broken since the 0.4 release.

    Tested in the teensy4-rs repo. Users who are not able to adopt the
    next patch release could add equivalent iomuxc calls before
    constructing their PWM driver.

commit 124a811
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Apr 5 20:20:00 2021 -0400

    Bump imxrt-hal to 0.4.3

commit 98c8cbd
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Apr 5 20:19:35 2021 -0400

    Add 0.4.3 CHANGELOG entry

commit 2a97740
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Wed Mar 31 22:50:56 2021 -0400

    Update CHANGELOG

commit 4935e6a
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Wed Mar 31 22:21:23 2021 -0400

    Allow deprecated atomic::spin_loop_hint()

    Clippy suggests that we start using core::hint::spin_loop(). This new
    function was introduced in Rust 1.49, and replaces spin_loop_hint().
    We're not going to issue that breaking change right now. So, we'll
    mark the existing usages as OK.

    TODO:

    - Pin a clippy, compiler, toolchain version in CI
    - Figure out a MSRV, maybe

commit 27d8518
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Wed Mar 31 22:18:32 2021 -0400

    Allow upper case names, acronyms

    New clippy is very aggressive about proper naming. We're not
    following proper naming in the 0.4 HAL. Disable the warnings for
    now.

commit 2658b74
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Wed Mar 31 21:33:38 2021 -0400

    Address clippy warnings in AdcSource

commit be6006e
Author: Lane Kolbly <lane@rscheme.org>
Date:   Sun Mar 28 10:15:10 2021 -0500

    Implement ADC DMA source

    This commit makes the ADCs a possible source for DMA operations.

commit 8f457ed
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Mar 22 20:10:44 2021 -0400

    Update CHANGELOG

commit 227f375
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Mar 22 20:06:14 2021 -0400

    Add CI for 1061, 1064 features

commit e3c77a0
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Mar 22 19:59:05 2021 -0400

    Add support for the 1061

    See the data sheet for differences. One notable change is that the
    1061 doesn't have the graphics features (LCD, CSI, pixel pipeline).
    We don't have drivers for these peripherals today, so the HAL can
    support these features without issue.

commit 5256dd9
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sat Mar 20 19:46:39 2021 -0400

    Enable the imxrt1064 feature

    The HAL builds with the `imxrt1064` feature:

      cd imxrt-hal
      cargo build --features imxrt1064

    It has not been tested on hardware. Only thing that seems to change
    is the FlexSPI2 IOMUXC registers are reserved. Everything else is the
    same.

commit 357a71a
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Tue Nov 17 19:36:06 2020 -0500

    Bump imxrt-hal to 0.4.2

commit f8514f9
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Tue Nov 17 19:40:10 2020 -0500

    Update CHANGELOG

commit 61dccd9
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Tue Nov 17 19:33:40 2020 -0500

    Explicitly depend on imxrt-iomuxc 0.1.2

    That release introduces the ADC pins, which are required for the
    current HAL.

commit c4a4111
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Tue Nov 17 19:30:58 2020 -0500

    Update README and release docs

    The documentation in this branch should still be useful. This commit
    revises our documentation to reflect the broader imxrt-rs org.

commit 0567ab4
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Tue Nov 17 19:08:25 2020 -0500

    Remove iomuxc crate from 0.4 branch

    It's been moved to a separate repo. This change is to prevent someone
    from accidentally releasing the iomuxc crate from this repo.

commit 8efe35c
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Nov 16 20:44:37 2020 -0500

    Remove RAL from 0.4 branch

    Manually removing the RAL, since it's already been removed in master.
    This is to ensure that we don't accidentally depend on something in
    this 0.4 maintenance branch that isn't correctly reflected in our RAL
    repo.

commit bf0bbfa
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Nov 16 19:39:22 2020 -0500

    Fix CHANGELOG entrie for unreleased fixes

    Added the error correction to the wrong "Fix" header

commit f1301cc
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Nov 16 19:27:38 2020 -0500

    Update CHANGELOG describing fix for errors

commit 429b9fa
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Sun Nov 15 08:41:46 2020 -0800

    Only allow HAL to create I2C/SPI config errors

commit 0878f7a
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Mon Nov 16 19:34:32 2020 -0500

    Update CHANGELOG with TRNG addition

commit c697e69
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Tue Nov 17 11:43:32 2020 -0800

    Fix comment, don't preserve bad value

commit 7470642
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Sun Nov 15 08:33:16 2020 -0800

    Preserve settings, fix error privacy

commit 12dba78
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Sat Nov 14 06:05:44 2020 -0800

    Add optional RngCore impl

commit 51f4644
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Fri Oct 9 03:23:32 2020 -0700

    Implement basic support for the TRNG

    Limited configurability but it works.

commit f819cc5
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Thu Oct 15 18:52:25 2020 -0400

    hal: add CHANGELOG entry for ADC feature

commit de9cdca
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Wed Oct 14 21:46:21 2020 -0400

    (Hopefully) removed Cargo.toml from changes

commit 93bb6cd
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Wed Oct 14 20:40:34 2020 -0400

    Implemented suggestions

commit fdae6ed
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Wed Oct 7 13:06:54 2020 -0400

    3rd time's a charm, fix CI issues

commit b2335df
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Wed Oct 7 12:41:52 2020 -0400

    Hopefully actually fixed build issues

commit 8a966bc
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Tue Oct 6 22:54:22 2020 -0400

    Fixed issues from checks

commit 88d02cd
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Tue Oct 6 22:36:58 2020 -0400

    Finished up comments & example

commit 1f6aa15
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Tue Oct 6 00:16:22 2020 -0400

    Changed AnalogPin creation

commit 22ac89b
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Mon Oct 5 21:12:12 2020 -0400

    Added adc to peripherals

commit 684592e
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Mon Oct 5 21:05:44 2020 -0400

    Added input data for all IMXRT106x pins

commit 744ce70
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Mon Oct 5 20:58:36 2020 -0400

    Potential ADC implementation take 1

commit 3f98a20
Author: DavidTheFighter <19dallen@gmail.com>
Date:   Sun Oct 4 23:54:02 2020 -0400

    Transfer work to fork

commit b7a1a56
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sat Oct 10 20:58:36 2020 -0400

    imxrt-hal: add CHANGELOG entry for SRTC

commit 24b73db
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Thu Oct 8 22:32:09 2020 -0700

    Update following review

commit f9b71bd
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Tue Oct 6 17:00:38 2020 -0700

    Use microseconds, add get_with_micros

commit 0bea36d
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Tue Oct 6 14:02:07 2020 -0700

    Revert "Add get_f64"

    This reverts commit aec0ed6.

commit 597a113
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Sun Oct 4 22:37:34 2020 -0700

    Add get_f64

commit 665e1c8
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Sun Oct 4 21:28:19 2020 -0700

    Update for review and sub-second times

    Now exclusively enables and uses the SRTC.

commit 72f57aa
Author: Malloc Voidstar <1284317+AlyoshaVasilieva@users.noreply.github.com>
Date:   Fri Oct 2 17:04:38 2020 -0700

    Implement basic RTC support

    Supports enabling and setting the clocks.

commit f77c16a
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sun Sep 13 08:01:34 2020 -0400

    hal: Prepare release 0.4.1

commit c1a7d32
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sun Sep 13 07:51:33 2020 -0400

    hal: Add CHANGELOG entry for GPIO fast mode fix

commit c8ff33f
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sun Sep 13 07:48:16 2020 -0400

    gpio: Clarify 'state' in set_fast() documentation

commit 887a8e1
Author: Ian McIntyre <ianpmcintyre@gmail.com>
Date:   Sun Sep 13 07:33:48 2020 -0400

    gpio: Fix GPIO high-speed state inconsistency

    There are two valid ways to prepare a high-speed GPIO output:

    ```rust
    pub fn configure_led(pad: LedPadType) -> LED {
        let mut led = hal::gpio::GPIO::new(pad);
        led.set_fast(true);
        led.output()
    }
    ```

    and

    ```rust
    pub fn configure_led(pad: LedPadType) -> LED {
        let mut led = hal::gpio::GPIO::new(pad).output();
        led.set_fast(true);
        led
    }
    ```

    the former will put the GPIO into high-speed, or 'fast,' mode before
    setting 'output mode.' The latter will put the GPIO into output mode
    before fast mode.

    After transitioning into fast mode, the GPIO will start to reference
    a different GPIO register block. The issue is that, after entering
    fast mode, the output / input state of the pin is not maintained. In
    the second snippet, the set_fast(true) call ends up reverting the
    GPIO state back to 'input,' since the newly-referenced register block
    does not maintain the same GPIO input / output configuration.

    This commit updates the set_fast() method to maintain the GPIO I/O
    state for the new register block. It makes it so that either of the
    above patterns work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants