embassy/embassy-nrf/src
bors[bot] c7d9729028
Merge #486
486: Pwm ppi events r=Dirbaio a=jacobrosenthal

More PWM yak shaving. I was going to do some safe pwm ppi events stuff but I just dont think it fits this api design.. ppi is just very low level, im not sure how safe it will be in general

* first we should probably have borrows of handlers for ppi with lifetime of the peripheral?  hal does eb4ba6ae42/nrf-hal-common/src/pwm.rs (L714-L716)
* in general having access to tasks can put the state in some configuration the api doesnt understand anymore. for `SequencePwm` ideally id hand you back either only seq_start0 or seq_start1 because youd only use one based on if your `Times` is even or odd.. but again we only know that with this api AFTER start has been called. I dont think were ready for typestates

SO I figured why not add the pwm ppi events but make them unsafe and commit this example since I started it.

Somewhat related drop IS removing the last duty cycle from the pin correctly, but stop DOES NOT..the only thing that sets the pin back is pin.conf() as far as I can tell, so I tried to document that better and got rid of stop for the `SimplePwm` again since that doesnt need it then. However its ackward we dont have a way to unset the pwm without setting a new sequence of 0s, or dropping the peripheral


Co-authored-by: Jacob Rosenthal <jacobrosenthal@gmail.com>
2021-11-26 23:08:24 +00:00
..
chips nrf: add initial nrf5340 support 2021-10-28 03:36:25 +02:00
ppi nrf: add initial nrf5340 support 2021-10-28 03:36:25 +02:00
buffered_uarte.rs Fewer channel traits, more cfg to make the system work 2021-10-26 14:47:34 +02:00
fmt.rs fmt: Add dunmy use to avoid "unused variable" errors when no log is enabled. 2021-06-07 03:21:37 +02:00
gpio.rs nrf: add initial nrf5340 support 2021-10-28 03:36:25 +02:00
gpiote.rs Update embassy-nrf with lifetime bounds on gpio implementations. 2021-11-21 10:25:43 +00:00
lib.rs nrf: add initial nrf5340 support 2021-10-28 03:36:25 +02:00
nvmc.rs nrf/nvmc: make PAGE_SIZE, FLASH_SIZE public. 2021-10-24 18:23:22 +02:00
pwm.rs nrf: pwm clarify stop and disable pin state 2021-11-14 11:26:30 -07:00
qspi.rs embassy: Refactor module structure to remove kitchen-sink util. 2021-09-11 02:35:35 +02:00
rng.rs embassy: Refactor module structure to remove kitchen-sink util. 2021-09-11 02:35:35 +02:00
saadc.rs Some documentation corrections and expansion 2021-11-22 12:26:11 +11:00
spim.rs Undoing unnecessary changes 2021-10-12 11:55:38 +02:00
temp.rs Use async fn instead of impl Future 2021-10-19 20:48:46 +02:00
time_driver.rs Undoing unnecessary changes 2021-10-12 11:55:38 +02:00
timer.rs - Interconnect is now PPI again 2021-10-26 14:47:31 +02:00
twim.rs Undoing unnecessary changes 2021-10-12 11:55:38 +02:00
uarte.rs nrf91: support running in both S and NS mode. 2021-10-26 17:40:07 +02:00
util.rs fix slice_in_ram for arbitrary size types 2021-11-03 18:56:02 -07:00
wdt.rs nrf91: support running in both S and NS mode. 2021-10-26 17:40:07 +02:00