Skip to content

Commit

Permalink
Merge #421
Browse files Browse the repository at this point in the history
421: HL trait instead of H generic r=therealprof a=burrbull



Co-authored-by: Andrey Zgarbul <[email protected]>
  • Loading branch information
bors[bot] and burrbull authored Mar 15, 2022
2 parents cdc21db + 5dcdf0a commit f9b24f4
Show file tree
Hide file tree
Showing 6 changed files with 261 additions and 216 deletions.
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

0 comments on commit f9b24f4

Please sign in to comment.