Skip to content

Commit f9b24f4

Browse files
bors[bot]burrbull
andauthored
Merge #421
421: HL trait instead of H generic r=therealprof a=burrbull Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
2 parents cdc21db + 5dcdf0a commit f9b24f4

File tree

6 files changed

+261
-216
lines changed

6 files changed

+261
-216
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

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

1213
### Breaking changes
1314

examples/exti.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn EXTI9_5() {
4040
#[entry]
4141
fn main() -> ! {
4242
// initialization phase
43-
let p = pac::Peripherals::take().unwrap();
43+
let mut p = pac::Peripherals::take().unwrap();
4444
let _cp = cortex_m::peripheral::Peripherals::take().unwrap();
4545
{
4646
// the scope ensures that the int_pin reference is dropped before the first ISR can be executed.
@@ -55,8 +55,8 @@ fn main() -> ! {
5555
let int_pin = unsafe { &mut *INT_PIN.as_mut_ptr() };
5656
*int_pin = gpioa.pa7.into_floating_input(&mut gpioa.crl);
5757
int_pin.make_interrupt_source(&mut afio);
58-
int_pin.trigger_on_edge(&p.EXTI, Edge::RisingFalling);
59-
int_pin.enable_interrupt(&p.EXTI);
58+
int_pin.trigger_on_edge(&mut p.EXTI, Edge::RisingFalling);
59+
int_pin.enable_interrupt(&mut p.EXTI);
6060
} // initialization ends here
6161

6262
unsafe {

0 commit comments

Comments
 (0)