Commit Graph

576 Commits

Author SHA1 Message Date
chrysn
6718ca3a94 all Cargo.toml: Add license to all crate Cargo.toml files
Closes: https://github.com/embassy-rs/embassy/issues/1002
2022-10-07 12:41:56 +02:00
Ulf Lilleengen
72c2e985bb Update embedded-hal versions and explicitly pin 2022-09-29 11:27:46 +02:00
Dario Nieuwenhuis
17d8d11f73 usb: make HALs depend only on embassy-usb-driver. 2022-09-27 13:16:49 +02:00
Dario Nieuwenhuis
7f7c14b7bc usb: split driver trait to separate crate. 2022-09-26 12:29:27 +02:00
bors[bot]
eeb1515e9f
Merge #958
958: Implement proper `Drop` for `BufferedUarte` r=lulf a=ZoeyR

The drop method in `BufferedUarte` was prone to hanging indefinitely and also didn't actually disable the peripheral. I mostly copied over the drop method from `Uarte` with some modifications since `BufferedUarte` could have a transmit lasting indefinitely.

Co-authored-by: Zoey Riordan <zoey@dos.cafe>
2022-09-23 11:58:43 +00:00
Zoey Riordan
b4f2c2a05e Re-add timer.stop() 2022-09-23 12:34:02 +02:00
Dario Nieuwenhuis
a0487380da Replace futures::future::poll_fn -> core::future::poll_fn. 2022-09-22 16:42:49 +02:00
Dario Nieuwenhuis
897b72c872 Update Rust nightly.
Removes feature(generic_associated_types)
2022-09-22 16:38:14 +02:00
Zoey Riordan
5f7e0eb2ae Fix builds on other nrf pacs 2022-09-21 14:06:56 +02:00
Zoey Riordan
15b4f9db90 Remove unused function 2022-09-21 11:19:47 +02:00
Zoey Riordan
0f55f5a73d Remove left-in comments and logs 2022-09-21 11:06:06 +02:00
Zoey Riordan
3d708a459c Implement proper Drop for BufferedUarte 2022-09-21 10:48:02 +02:00
Dario Nieuwenhuis
5327b9c289 time: add more tick rates, use 1mhz as default. 2022-09-02 00:59:34 +02:00
bors[bot]
838f3065ea
Merge #936
936: Add split() method to BufferedUarte in embassy-nrf r=ZoeyR a=ZoeyR

I haven't completed testing this yet. I'm creating this PR early so that I can get corrected if I went way off course.

This PR adds a `split()` method to `BufferedUarte` as discussed on matrix.

Co-authored-by: Zoey Riordan <zoey@dos.cafe>
2022-08-31 10:20:40 +00:00
bors[bot]
1fb6bfbec9
Merge #938
938: Do not use cfg_if for embedded-hal-async feature gates. r=Dirbaio a=Dirbaio

Old code used `cfg_if!` because rustc still parses code inside disabled cfg's, and Rust stable at that time couldn't parse the new GAT where-clause location. This is not the case anymore.


bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-08-31 01:11:49 +00:00
Dario Nieuwenhuis
8ba421f324 Do not use cfg_if for embedded-hal-async feature gates.
Old code used `cfg_if!` because rustc still parses code inside disabled cfg's, and Rust stable at that time couldn't parse the new GAT where-clause location. This is not the case anymore.
2022-08-31 03:11:21 +02:00
huntc
30641d0564 Avoid context switch and wait for stop
Should be more efficient given the sub 100 cycles to wait.
2022-08-31 08:47:44 +10:00
Zoey Riordan
171077bacf
Avoid double-borrow 2022-08-30 15:57:38 +02:00
Zoey Riordan
b2720117c4
Deduplicate IO methods 2022-08-30 15:48:50 +02:00
Zoey Riordan
4781feafc4
Add split() method to BufferedUarte in embassy-nrf 2022-08-30 15:27:25 +02:00
huntc
dcd8c62169 Permits the future to be cancelled
Includes documentation
2022-08-30 20:56:56 +10:00
huntc
c0b7fd910e Additional doco 2022-08-30 09:49:04 +10:00
huntc
9a873d1dbf Ensure that the sampling is stopped
Ensures that nRF saadc sampling is stopped and is awaited prior to exiting the two sampling methods. Not doing so causes a potential power drain and the potential for dropped buffer writes when having finished continuous sampling.
2022-08-26 14:40:20 +10:00
Dario Nieuwenhuis
91a9168a32 nrf/ppi: fix unsoundness due to task/event ptrs being public. 2022-08-24 01:54:27 +02:00
Dario Nieuwenhuis
02562ed87d nrf/ppi: feature-gate dppi stuff. 2022-08-24 01:52:15 +02:00
Dario Nieuwenhuis
21072bee48 split embassy-util into embassy-futures, embassy-sync. 2022-08-22 22:18:13 +02:00
Ulf Lilleengen
3e155d2ec3 nRF documentation warning fixes 2022-08-22 16:37:35 +02:00
Dario Nieuwenhuis
5daa173ce4 Split embassy-time from embassy-executor. 2022-08-18 01:22:30 +02:00
Dario Nieuwenhuis
fc6e1e06b3 Remove HAL initialization from #[embassy::main] macro. 2022-08-17 22:16:46 +02:00
Dario Nieuwenhuis
67edea4168 Update to critical-section 1.0, atomic-polyfill 1.0 2022-08-17 19:01:56 +02:00
bors[bot]
1924f2d67d
Merge #890
890: Implement UsbSupply for a reference of SignalledSupply r=Dirbaio a=matoushybl



Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-08-02 20:29:29 +00:00
Matous Hybl
e4cfbf96ac Implement UsbSupply for a reference of SignalledSupply 2022-08-02 22:09:02 +02:00
Til Blechschmidt
43b8c0c71e
Remove commented out logging code 2022-08-01 12:57:00 +02:00
Til Blechschmidt
fa2fbcbde0
Extend QSPI config with freq, delay, spi mode, and address mode 2022-08-01 12:54:49 +02:00
Dario Nieuwenhuis
a0f1b0ee01 Split embassy crate into embassy-executor, embassy-util. 2022-07-29 23:40:36 +02:00
bors[bot]
84cffc751a
Merge #876
876: Add defmt support to embassy-embedded-hal errors r=Dirbaio a=matoushybl

`defmt::unwrap!()` should now work with shared buses. I tested it only with I2C as I don't have SPI in the target project.

Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-07-24 20:15:57 +00:00
Matous Hybl
c38755c5b7 Add defmt support to embassy-embedded-hal errors 2022-07-24 22:10:50 +02:00
Dario Nieuwenhuis
709df0dc1d nrf: replace PhantomData usages with PeripheralRef. 2022-07-23 15:13:47 +02:00
Dario Nieuwenhuis
f02ba35482 Remove PeripheralRef::into_inner() 2022-07-23 14:27:45 +02:00
Dario Nieuwenhuis
4901c34d9c Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral 2022-07-23 14:00:19 +02:00
Dario Nieuwenhuis
8a9d2f59af Update embassy-stm32 2022-07-23 02:40:13 +02:00
Dario Nieuwenhuis
e0521ea249 fix nrf dppi 2022-07-23 02:17:45 +02:00
Dario Nieuwenhuis
be6408e202 Rename unsafe_impl_unborrow to impl_unborrow 2022-07-23 01:33:22 +02:00
Grant Miller
bff0ad9286 Update embassy-rp 2022-07-23 01:33:22 +02:00
Grant Miller
65a82d02d1 WIP: Make unborrow safe to use 2022-07-23 01:33:22 +02:00
bors[bot]
b916a912df
Merge #871 #872
871: nrf/saadc: add type-erased AnyInput. r=Dirbaio a=Dirbaio



872: nrf/usb: prevent user code from constructing a PowerUsb directly. r=Dirbaio a=Dirbaio

PowerUsb must be constructed through `new()` so that it sets up the IRQ.
It must have at least one private field, otherwise user code can construct
it directly with `PowerUsb{}`.

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-07-22 09:14:39 +00:00
Dario Nieuwenhuis
c40d5f6e6f nrf/usb: prevent user code from constructing a PowerUsb directly.
PowerUsb must be constructed through `new()` so that it sets up the IRQ.
It must have at least one private field, otherwise user code can construct
it directly with `PowerUsb{}`.
2022-07-21 19:47:09 +02:00
Dario Nieuwenhuis
424f6ffadb nrf/saadc: add type-erased AnyInput. 2022-07-21 16:42:46 +02:00
chemicstry
53e40860c1 Move all gpio logic to Flex 2022-07-13 02:45:37 +03:00
chemicstry
a335589f34 Change get_set_level to get_output_level 2022-07-13 02:25:09 +03:00