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

HL trait instead of H generic #421

Merged
merged 3 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

- `gpio`: port and pin generics first, then mode, `PinMode` for modes instead of pins, other cleanups
- `gpio`: port and pin generics first, then mode,
`PinMode` for modes instead of pins, `HL` trait, other cleanups

### Breaking changes

Expand Down
6 changes: 3 additions & 3 deletions examples/exti.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn EXTI9_5() {
#[entry]
fn main() -> ! {
// initialization phase
let p = pac::Peripherals::take().unwrap();
let mut p = pac::Peripherals::take().unwrap();
let _cp = cortex_m::peripheral::Peripherals::take().unwrap();
{
// the scope ensures that the int_pin reference is dropped before the first ISR can be executed.
Expand All @@ -55,8 +55,8 @@ fn main() -> ! {
let int_pin = unsafe { &mut *INT_PIN.as_mut_ptr() };
*int_pin = gpioa.pa7.into_floating_input(&mut gpioa.crl);
int_pin.make_interrupt_source(&mut afio);
int_pin.trigger_on_edge(&p.EXTI, Edge::RisingFalling);
int_pin.enable_interrupt(&p.EXTI);
int_pin.trigger_on_edge(&mut p.EXTI, Edge::RisingFalling);
int_pin.enable_interrupt(&mut p.EXTI);
} // initialization ends here

unsafe {
Expand Down
Loading