Dario Nieuwenhuis
af87031d62
hal-common: remove Pin in PeripheralMutex
2021-08-02 19:55:04 +02:00
Bob McWhirter
63b32b39e1
Use an em bikeshed instead of an underscore bikeshed.
2021-08-02 13:29:06 -04:00
Bob McWhirter
5f9447abb4
Put the implicit memory.x behind a memory_x
feature on embassy-stm32.
2021-08-02 13:21:30 -04:00
Bob McWhirter
f6c5f039c8
Emit a default memory.x alongside device.x from metapac.
2021-08-02 11:23:55 -04:00
Ben Gamari
3420cbf744
examples: Drop build-std = ["core"]
...
Previously the cargo configurations of all of the example projects had
`build-std = ["core"]`, which forces compilation of `core` as a
code-size optimisation. However, this is strictly unnecessary and will
currently break for users who do not use `rustup` directly (e.g. nix
users).
2021-07-31 13:01:15 -04:00
Dario Nieuwenhuis
3835278567
Merge pull request #321 from thalesfragoso/f4-pll
...
F4 PLL
2021-07-31 11:08:46 +02:00
Thales Fragoso
5cfb9adad8
f4-pll: Add max values per chip
2021-07-29 18:43:15 -03:00
Thales Fragoso
e7714983b3
f4-rcc: Add option to enable debug_wfe and add hello example
2021-07-29 18:43:15 -03:00
Timo Kröger
895781d0d1
stm32l4: Fix examples crate name
2021-07-29 18:14:01 +02:00
Timo Kröger
cad43587e6
stm32l0: Use embassy::main
for examples
2021-07-29 17:37:32 +02:00
Timo Kröger
4ccac69929
stm32l4: Cleanup examples
...
* Use `cortex_m_rt::entry` for sync examples
* Use `Dbgmcu::enable_all()` everywhere
2021-07-29 15:54:11 +02:00
Timo Kröger
2a4890165d
stm32f0: Enable debug access in low power modes
2021-07-29 15:35:23 +02:00
Dario Nieuwenhuis
7bfb763e09
Rename embassy-extras to embassy-hal-common
2021-07-29 13:44:51 +02:00
Timo Kröger
dd1ec8ebec
Use embassy::main
macro for stm32f4 examples
2021-07-27 15:03:18 +02:00
Dario Nieuwenhuis
5b0ae5c25b
stm32/examples: cleanup L4
2021-07-24 13:57:11 +02:00
Timo Kröger
06fb2a7a80
Enable SYSCFG clock in exti::init()
2021-07-24 11:13:49 +02:00
Bob McWhirter
67283c0cbd
Reset back the memory.x also.
2021-07-23 13:22:39 -04:00
Bob McWhirter
a63847944f
Reset the examples to the original F4 flavor.
2021-07-23 13:22:39 -04:00
Bob McWhirter
b07325b476
Enable DMA for SPIv1 on F4's etc.
2021-07-23 13:22:39 -04:00
Bob McWhirter
a1dac21bdf
Make SPIv3 work with DMA.
...
Add both DMA and non-DMA example to H7.
2021-07-23 13:22:39 -04:00
Bob McWhirter
34dfe28d3a
FFS warnings about unused Result<>.
2021-07-23 13:22:39 -04:00
Bob McWhirter
053e330375
Fix warnings about un-used variables.
2021-07-23 13:22:39 -04:00
Bob McWhirter
e269971597
Fix extraneous mut
warnings in L4 example.
2021-07-23 13:22:39 -04:00
Bob McWhirter
638235e72d
Fix up the L0 example for SPI.
2021-07-23 13:22:39 -04:00
Bob McWhirter
bee7f60f08
Improve the SPIv2 DMA example to verify it actually works.
2021-07-23 13:22:39 -04:00
Bob McWhirter
0d2051243e
SPIv2 + DMA.
2021-07-23 13:22:39 -04:00
Timo Kröger
57eecd4292
Use Dbgmcu::enable_all()
in stm32f4 examples
2021-07-23 17:54:14 +02:00
Timo Kröger
5ac91933ff
stm32: No need to enable GPIO clocks manually
2021-07-23 17:54:13 +02:00
Bob McWhirter
13873df30b
Auto-enable all GPIOs during init().
2021-07-23 11:32:19 -04:00
Bob McWhirter
d68f2617e6
Add a Dbgmcu
struct capable of enabling all relevant DBGMCU.cr fields.
...
Includes the addition of a `dbgmcu!(...)` macro table which currently takes
the form of
(cr, $fn_name:ident)
where `$fn_name` is something like `set_dbgsleep_d1` etc.
The method is unsafe, since it's performing unsafe PAC operations.
Two examples modified to demonstrate its usage.
2021-07-22 14:18:48 -04:00
Dario Nieuwenhuis
3655ceff27
Merge pull request #308 from timokroeger/stmf4-example-cleanup
...
Cleanup stm32f4 examples
2021-07-21 23:21:28 +02:00
Timo Kröger
5e998d1a6c
Cleanup stm32f4 examples
...
* Remove dependency on stm32f4 pac crate
* Remove unused `ZeroClock`
2021-07-21 23:12:36 +02:00
Dario Nieuwenhuis
25b870d811
Merge pull request #302 from embassy-rs/rp-spi-fixes
...
Rp spi fixes
2021-07-20 10:11:58 +02:00
Dario Nieuwenhuis
451e342961
rp/examples: add spi_display example
2021-07-20 10:06:57 +02:00
Dario Nieuwenhuis
b04dc7e783
Merge pull request #226 from huntc/mpsc
...
Multi Producer Single Consumer channel
2021-07-20 08:01:42 +02:00
Dario Nieuwenhuis
1799938187
rp/examples: add spi example
2021-07-19 23:54:18 +02:00
Dario Nieuwenhuis
d7176da37c
stm32/examples: update DMA channel names
2021-07-17 08:04:33 +02:00
Bob McWhirter
0119ea809d
Get DMA on H7 working, add usart_dma example for H7.
2021-07-16 14:41:20 -04:00
Dario Nieuwenhuis
63a0e188ea
stm32/dma: fix h7 impls
2021-07-16 14:41:20 -04:00
Dario Nieuwenhuis
3d1391ef2d
stm32/dma: impl all variants
2021-07-16 14:41:20 -04:00
Thales Fragoso
697f93ad42
stm32: Add F0 example
2021-07-15 13:50:39 -03:00
huntc
3778f55d80
Provides a cleaner construction of the channel with the common "new" naming
2021-07-15 12:31:53 +10:00
huntc
f159beec1c
Use of a NoopMutex
2021-07-15 12:31:52 +10:00
huntc
5f87c7808c
Remove the cell and trait
...
At the expense of exposing the channel types again. We do this as we want to avoid using dyn traits given their overhead for embedded environments.
2021-07-15 12:31:52 +10:00
huntc
ae62948d6c
Replace UnsafeCell
...
Using a new ChannelCell so that there's no leaking of the abstraction
2021-07-15 12:31:52 +10:00
huntc
816b78c0d9
Reduces the types on sender and receiver
...
In exchange for an UnsafeCell being passed into split
2021-07-15 12:31:52 +10:00
huntc
1b9d5e5071
Multi Producer Single Consumer channel
...
An MPSC inspired by Tokio and Crossbeam. The MPSC is designed to support both single and multi core processors, with only single core implemented at this time. The allocation of the channel’s buffer is inspired by the const generic parameters that Heapless provides.
2021-07-15 12:31:52 +10:00
Dario Nieuwenhuis
71c8d7aa7d
stm32l4/examples: remove old-pac uses.
2021-07-15 00:37:00 +02:00
Bob McWhirter
21e94972dc
Fix more warnings and examples.
2021-07-14 14:55:20 -04:00
Bob McWhirter
3fd9023fce
Fix the h7 example.
2021-07-14 14:45:54 -04:00
Bob McWhirter
a88f0028ef
First shot at async dma usart for stm32.
2021-07-14 14:14:14 -04:00
Bob McWhirter
f01ddd5f5c
Mix dmamux into bdma_v1.
2021-07-13 10:09:35 -04:00
Bob McWhirter
043f0ea508
Checkpoint DMAMUX channel setup.
2021-07-13 10:08:43 -04:00
Dario Nieuwenhuis
7547c8d8d6
rp/timer: add
2021-07-12 03:45:57 +02:00
Dario Nieuwenhuis
ecc151d4e2
stm32/adc: simplify delay handling
2021-07-05 03:18:23 +02:00
Dario Nieuwenhuis
3ce32d6624
Merge pull request #273 from rukai/fix_warnings_again
...
fix stm32 warnings
2021-07-05 02:00:51 +02:00
Rukai
25d4b2ea26
fix stm32 warnings
2021-07-05 01:54:29 +02:00
Rukai
56d0c5ffe1
Fix warnings in std and rp
2021-07-04 12:46:04 +10:00
Bob McWhirter
0920c0cb1d
Make UART pins Rx/Tx/etc in addition to USART.
2021-07-01 11:30:54 -04:00
Bob McWhirter
54ada5bae1
Stub in the DMA bits that aren't yet there.
2021-07-01 11:30:54 -04:00
Bob McWhirter
f83559c6ab
Add L4+ example for USART.
2021-07-01 11:30:54 -04:00
Dario Nieuwenhuis
e55c89f890
Merge pull request #262 from Liamolucko/nrf-rng
...
Add an nRF RNG driver
2021-07-01 01:55:55 +02:00
Liam Murphy
a64dec517c
Update RNG example
2021-06-30 12:55:30 +10:00
Bob McWhirter
d5fb558005
Fix non-DMA USART example.
2021-06-29 13:08:18 -04:00
Bob McWhirter
24f18819c8
Adjust example for RCC and DMA.
2021-06-29 11:01:57 -04:00
Liam Murphy
8a4ab29819
Add an nRF RNG driver
...
Resolves #187
Like the stm32 driver, this has both a non-blocking and blocking API, and implements `rand_core::RngCore` for the blocking API.
2021-06-29 17:26:16 +10:00
Dario Nieuwenhuis
cdb0c72849
Merge pull request #255 from thalesfragoso/od-pin
...
stm32: Allow for open drain configuration for output pin
2021-06-27 19:29:18 +02:00
Thales Fragoso
0eaadfc125
stm32: Update gpio examples
2021-06-25 18:16:43 -03:00
Dario Nieuwenhuis
c7c897bb72
rp/gpio: add infallible inherent methods
2021-06-25 06:24:14 +02:00
Dario Nieuwenhuis
5a6384d199
rp: clock setup
2021-06-25 03:38:21 +02:00
Thales Fragoso
aca0fb1065
net: Make the user pass in the StackResources in init
...
By having the user pass in the resources, we can make them generic, this way
the user can choose the size of the individual resources
2021-06-20 17:15:18 -03:00
Thales Fragoso
098ce6e740
stm32h7: Add ethernet example
2021-06-16 16:48:35 +02:00
Ulf Lilleengen
b6a8703698
Add support for generating PAC for dual cores
...
* Chips that have multiple cores will be exposed as chipname_corename,
i.e. stm32wl55jc_cm4
* Chips that have single cores will use the chip family as feature name
and pick the first and only core from the list
* Add support for stm32wl55 chip family
2021-06-16 15:12:07 +02:00
Bob McWhirter
d58fb11b2e
ADCv3 and example.
2021-06-14 13:20:42 -04:00
Ulf Lilleengen
95532726b2
Add minimal RCC impls for L4 and F4
2021-06-14 11:33:11 +02:00
Dario Nieuwenhuis
97e2f10665
Merge pull request #242 from Tiwalun/stm32wb55-metapac
...
Initial support and example for STM32WB55
2021-06-12 16:33:40 +02:00
Dominik Boehi
b82e2627aa
Add STM32WB55 examples to CI, fix example crate name
2021-06-12 07:06:42 +02:00
Dominik Boehi
0eab96f573
Initial support and example for STM32WB55
2021-06-12 07:06:36 +02:00
Dario Nieuwenhuis
890e93f367
UPdate smoltcp
2021-06-12 00:50:36 +02:00
Ulf Lilleengen
1bb7123156
Add examples for STM32L0
2021-06-09 23:09:48 +02:00
Bob McWhirter
6295589467
Bring over DAC example (relies upon stm32-data update)
2021-06-08 15:25:38 -04:00
Bob McWhirter
4f1f63f336
Initial swag at h7 examples.
2021-06-08 15:25:38 -04:00
Bob McWhirter
ecd53c916c
Small changes to support DAC example.
2021-06-08 14:04:56 -04:00
Bob McWhirter
cf3c021c37
Initial examples for STM32L4+
2021-06-08 10:37:11 -04:00
Bob McWhirter
b8690e5f5d
Add blinky example.
2021-06-08 10:37:11 -04:00
Rukai
010b2b9497
Fix stm32 warnings
2021-06-06 00:46:20 +10:00
Dario Nieuwenhuis
7d869bdec8
Update heapless
2021-06-04 01:35:04 +02:00
Dario Nieuwenhuis
dff03ecfc7
Move examples to a subdirectory
2021-06-02 01:32:19 +02:00
Dario Nieuwenhuis
20d3dc87f9
Rename examples -> embassy-nrf-examples
2021-01-01 22:46:32 +01:00
Timo Kröger
6695bf0f21
Low power UART driver
2020-12-30 19:24:12 +01:00
Dario Nieuwenhuis
015b6bbce4
Ensure timers always yield at least once.
...
This prevents a task that's constantly running late from monopolizing the CPU.
Add executor_fairness_test example showcasing it.
2020-12-30 00:57:35 +01:00
Dario Nieuwenhuis
af5454fbfe
Update drivers to owned irqs.
2020-12-29 01:53:17 +01:00
Dario Nieuwenhuis
4b8d8ba87e
Update RTC for owned irqs
2020-12-29 01:05:28 +01:00
Dario Nieuwenhuis
0750234fbe
WIP owned irqs
2020-12-29 00:05:52 +01:00
Dario Nieuwenhuis
267ec334ac
Rename Uarte -> BufferedUarte
2020-12-28 23:57:50 +01:00
Dario Nieuwenhuis
692d8bb813
More efficient timer queue, integrated into Executor directly.
2020-12-26 23:44:53 +01:00
Dario Nieuwenhuis
80c504cd95
Add std impl for rand
2020-12-14 00:36:29 +01:00
Dario Nieuwenhuis
6f76c0ebcc
Add support for log+defmt again, but better.
2020-12-01 17:46:56 +01:00
Dario Nieuwenhuis
78135a81d9
Remove anyfmt
2020-11-27 18:42:59 +01:00
Dario Nieuwenhuis
2e062f5627
gpiote: change port api to directly return futures.
2020-11-09 01:04:34 +01:00