b76631bebe
1069: GPIOTE InputChannel with mutable reference. r=Dirbaio a=Ardelean-Calin 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 p = embassy_nrf::init(config); 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 p = embassy_nrf::init(config); 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, ); ``` therefore not giving ownership to GPIOTE_CH0. Co-authored-by: Ardelean Călin Petru <ardelean.calin@outlook.com> Co-authored-by: Ardelean Calin <ardelean.calin@proton.me> |
||
---|---|---|
.. | ||
chips | ||
ppi | ||
buffered_uarte.rs | ||
fmt.rs | ||
gpio.rs | ||
gpiote.rs | ||
lib.rs | ||
nvmc.rs | ||
pdm.rs | ||
pwm.rs | ||
qdec.rs | ||
qspi.rs | ||
rng.rs | ||
saadc.rs | ||
spim.rs | ||
spis.rs | ||
temp.rs | ||
time_driver.rs | ||
timer.rs | ||
twim.rs | ||
twis.rs | ||
uarte.rs | ||
usb.rs | ||
util.rs | ||
wdt.rs |