diff options
| author | Ardelean Călin Petru <[email protected]> | 2022-11-22 16:56:04 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-22 16:56:04 +0200 |
| commit | a074cd0625d68e72694c6575063ae53a840d12dc (patch) | |
| tree | 82572a80786e62d6f8509dee171b7bb590b1bcea /examples/std | |
| parent | ca4f615b25d2e135f3f8d6caf99fceaab1e01c24 (diff) | |
Update gpiote.rs
Adding these changes enables us to define a channel using a mutable reference to `GPIOTE_CH(n)`, similar to how we can do with other drivers.
So instead of using:
```rust
let freq_in = InputChannel::new(
p.GPIOTE_CH0,
Input::new(&mut p.P0_19, embassy_nrf::gpio::Pull::Up),
embassy_nrf::gpiote::InputChannelPolarity::HiToLo,
);
```
we can use:
```rust
let freq_in = InputChannel::new(
&mut p.GPIOTE_CH0,
Input::new(&mut p.P0_19, embassy_nrf::gpio::Pull::Up),
embassy_nrf::gpiote::InputChannelPolarity::HiToLo,
);
```
Diffstat (limited to 'examples/std')
0 files changed, 0 insertions, 0 deletions
