Commit Graph

905 Commits

Author SHA1 Message Date
5d19f87acb cleanup example 2021-12-15 12:30:48 -07:00
61f12324ff enable USB peripheral for relevant chips 2021-12-15 10:23:19 -07:00
79502330de rename to UsbBus 2021-12-15 09:59:56 -07:00
1374ad2ab6 Introduces split on the nRF Uarte
A new `split` method is introduced such that the Uarte tx and rx can be used from separate tasks. An MPSC is used to illustrate how data may be passed between these tasks.
2021-12-15 18:31:52 +11:00
5f0fefbd25 dont rely on nrf-usdb 2021-12-14 16:51:34 -07:00
3debe604fb sorta works, too many interupts? 2021-12-14 16:48:48 -07:00
07cbd41131 dont expose embedded_hal_common::usb 2021-12-14 15:47:54 -07:00
f31140a70b revert 2021-12-14 13:51:50 -07:00
1a7b9e3279 Merge #542
542: nrf/gpiote: remove PortInput, move impls to Input/FlexPin. r=Dirbaio a=Dirbaio

`PortInput` is just a dumb wrapper around `Input`, it has no reason whatsoever to exist. This PR moves the `wait_for_x` functionality to `Input` directly.

It also adds it to `FlexPin` for completeness and consistency with `Input`.

(The reason `PortInput` exists is a while ago `GPIOTE` was an owned singleton that you had to initialize, so `PortInput::new()` would require it to enforce it's been initialized. This doesn't apply anymore now that GPIOTE is "global")

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2021-12-14 14:09:59 +00:00
153b1bbdbf nrf/gpiote: remove PortInput, move impls to Input. 2021-12-14 13:23:40 +01:00
535d30335a make send, consolidate usb types 2021-12-13 18:13:42 -07:00
83a1237ea3 stub out the embassy registers for usbd 2021-12-13 18:04:54 -07:00
a65c2bc2b4 [examples] Add examples for STM32F3 2021-12-13 14:50:13 +05:30
e5dc63e8e9 usb feature gate 2021-12-12 21:39:59 -07:00
f430c0e8c2 nrf-usbd 2021-12-12 19:20:02 -07:00
052abc918a Merge #537
537: Documents the nRF BufferedUarte problem r=Dirbaio a=huntc

Please see https://github.com/embassy-rs/embassy/issues/536 for the rationale.

Co-authored-by: huntc <huntchr@gmail.com>
2021-12-12 20:35:43 +00:00
e95b96f3a4 Use smoltcp 0.8.0 from crates.io. 2021-12-12 15:32:36 +01:00
dc3469b297 Documents the nRF BufferedUarte problem
Please see https://github.com/embassy-rs/embassy/issues/536 for the rationale.
2021-12-12 17:52:17 +11:00
9b01eed195 Revert blinky changes for now 2021-12-10 12:32:20 +01:00
e93f2679b1 More content 2021-12-10 12:27:44 +01:00
7256ff3e71 Provides AsyncWrite with flush
As per Tokio and others, this commit provides a `poll_flush` method on `AsyncWrite` so that a best-effort attempt at wakening once all bytes are flushed can be made.
2021-12-10 12:16:08 +11:00
484c356c03 Add DCMI example. 2021-12-09 12:56:39 +01:00
d6f3b479df Use smoltcp revision from its master branch. 2021-12-09 12:15:32 +01:00
9d62e886fb Do not use exported Result to mitigate problems with clap. 2021-12-08 22:19:13 +01:00
00a87b9a41 Fix build examples with defmt. 2021-12-06 21:58:57 +01:00
a802fd83aa Fix embassy-net documentation of running examples. 2021-12-06 14:59:15 +01:00
9a730ef692 Refactor sx127x radio to use async SPI with DMA 2021-12-03 09:53:28 +01:00
b9693c0b91 Update rust-lorawan to version supporting defmt 0.3 2021-12-02 19:10:29 +01:00
469852c667 Removed unsafe from uarte
The constructors themselves are not strictly unsafe. Interactions with DMA can be generally unsafe if a future is dropped, but that's a separate issue. It is important that we use the `unsafe` keyword diligently as it can lead to confusion otherwise.
2021-12-01 09:14:24 +11:00
3332c40705 examples: remove unused deps. 2021-11-29 02:07:48 +01:00
e40555e245 examples/stm32g4: add pwm example 2021-11-27 03:06:46 +01:00
88d4b0c00d stm32: add stm32g4 support. 2021-11-27 02:34:23 +01:00
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
c257893da9 net: update smoltcp 2021-11-26 04:12:14 +01:00
e4de15e4de net: don't depend directly on smoltcp outside embassy-net 2021-11-24 17:48:48 +01:00
8fea6c94f6 Merge #501
501: stm32-metapac cleanups r=Dirbaio a=Dirbaio



Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2021-11-24 01:00:22 +00:00
dfb6d407a1 stm32: rename core features from _cmX to -cmX, cleanup gen. 2021-11-23 23:49:06 +01:00
0ca6060bfd Fix interrupt_take macro by specifying path to panic macro. 2021-11-23 11:00:37 +01:00
2649984b55 Adjust the config.toml for U5.
- Correct ISA
- Remove commented-out cruft.
2021-11-17 10:35:25 -05:00
9b17b3d721 Remove unused deps 2021-11-15 20:13:22 +01:00
436eb81fc2 Adjust for bxcan API. 2021-11-15 12:00:26 -05:00
57ca241658 Further cargo muckings for smol/defmt. 2021-11-15 11:40:06 -05:00
23fdca9e52 Remove extraneous defmt-trace feature. 2021-11-15 11:33:44 -05:00
a770fc77c9 Adjust all examples to defmt 0.3. 2021-11-15 11:19:19 -05:00
c2da498263 Update to defmt 3.0ish.
Lots of gitrevs deps.
2021-11-15 11:09:08 -05:00
2bcacd4f16 nrf: sequencepwm add events 2021-11-13 16:24:41 -07:00
aca7b86c7e pwm_sequence show implicit and explicit stop functionality 2021-11-11 23:47:35 -07:00
b4cb24c735 pwm_servo example comment for clarity 2021-11-11 23:32:34 -07:00
67baec472d nrf: dump the pwm_sequence example for clarity
It is basically impossible to directly convert that example to a sequence for various reasons. You cant have multiple channels on same buffer with one sequence instance for starters, also at that clock rate and max_duty 1 period is far longer than the 3ms it was using, which would require using a new max_duty and thus require regenerating the sine table which makes it not representitive of the original example anymore
2021-11-11 23:31:10 -07:00
937f49dead nrf: sequencepwm rename top to max_duty for consistancy 2021-11-11 22:47:57 -07:00