Commit Graph

1249 Commits

Author SHA1 Message Date
xoviat
bb24cfd1e8 stm32/eth: add f4 example 2023-07-15 09:32:44 -05:00
GhaithOueslati
283ec756a9 stm32wb: add gatt server example 2023-07-15 13:37:41 +01:00
GhaithOueslati
5b076cb0dd wpan: update stm32wb-hci to version 0.1.3 2023-07-15 13:33:10 +01:00
Phil Markgraf
3bae533066
Enable RTC on STM32WL chips (#1645)
* Add clippy allow to not report if same then branch

* Support enabling RTC clock on STM32WL

* Add clippy allow to not report if same then branch

* Support enabling RTC clock on STM32WL

* Add rtc example for stm32wl

* Address code review feedback
2023-07-15 13:40:23 +02:00
Henrik Berg
56ca179475 Round temp to make more sense. 2023-07-13 22:47:03 +02:00
goueslati
f90b170dad cleanup 2023-07-13 16:29:29 +01:00
goueslati
3f0c8bafb0 make it work, disgustingly 2023-07-13 15:20:50 +01:00
Henrik Berg
588c0479f5 Add descriptions to all RP2040 examples. Some need hardware that was not specified. 2023-07-13 11:16:11 +02:00
goueslati
eccd2ecebf change MacAddress to a union instead of an enum 2023-07-12 16:49:37 +01:00
goueslati
d5a4457b5e parsing MAC structs 2023-07-12 15:06:56 +01:00
Henrik Berg
6d402fe393 RP: Don't reset RTC in Clock::init. Updated example. 2023-07-12 15:16:56 +02:00
Henrik Berg
466a391b52 RP: Add save/restore to Rtc. Example use. 2023-07-12 14:22:48 +02:00
Henrik Berg
a93714327e RP: Rename Rtc to match STM32 impl. Remove setting RTC in new(). 2023-07-12 14:22:48 +02:00
Henrik Berg
55a5e9b3a5 RP: Add RTC example to rp2040. 2023-07-12 14:22:48 +02:00
goueslati
6f4172fbc1 wip: added MAC commands 2023-07-11 16:07:33 +01:00
goueslati
4aca7c8811 wip 2023-07-10 16:54:48 +01:00
xoviat
c1bf5aee24 mac: move table initialization after sys ready 2023-07-09 16:01:13 -05:00
Dario Nieuwenhuis
b0da6318f3
Merge pull request #1623 from pennae/rp-adc
rp/adc: rewrite the module
2023-07-07 15:52:48 +00:00
pennae
972cdd4265 rp/adc: rewrite the module
- don't require an irq binding for blocking-only adc
- abstract adc pins into an AnyPin like interface, erasing the actual
  peripheral type at runtime.
- add pull-up/pull-down functions for adc pins
- add a test (mostly a copy of the example, to be honest)
- configure adc pads according to datasheet
- report conversion errors (although they seem exceedingly rare?)
- drop embedded-hal interfaces. embedded-hal channels can do neither
  AnyPin nor pullup/pulldown without encoding both into the type
2023-07-07 17:46:35 +02:00
pennae
4b63829110 rp/pio: use bind_interrupts for irqs
closes #1338
2023-07-07 16:27:10 +02:00
Dario Nieuwenhuis
c421b7f5f0
Merge pull request #1624 from embassy-rs/release-embassy-time-v0.1.2
Release embassy-time v0.1.2
2023-07-05 23:34:04 +00:00
Dario Nieuwenhuis
d137286981 Release embassy-time v0.1.2 2023-07-06 01:29:44 +02:00
xoviat
864202a23a
Merge pull request #1578 from schphil/can-split
stm32 can split method
2023-07-05 23:27:53 +00:00
Dario Nieuwenhuis
a42ac86f1b Remove wifi envvars. They're annoying, they cause rust-analyzer errors when opening the examples. 2023-07-05 19:20:49 +02:00
Mathias
1255d8a8ce Merge branch 'main' of https://github.com/embassy-rs/embassy into embassy-stm32/rcc-rtc-l4 2023-07-05 12:36:42 +02:00
Dario Nieuwenhuis
a101d9078d update embedded-hal crates. 2023-07-04 19:59:36 +02:00
Philipp Scheff
1869fe02ba make stm32f4 example work 2023-07-04 00:21:08 +02:00
Philipp Scheff
e3e8d82933 remove unused imports from example 2023-07-03 23:52:52 +02:00
Philipp Scheff
a96f30edf4 allow deed code can rx & clippy 2023-07-03 23:48:07 +02:00
Philipp Scheff
af15b49bfe fmt 2023-07-03 22:57:33 +02:00
Mathias
60b2f075dc Merge branch 'main' of https://github.com/embassy-rs/embassy into embassy-stm32/rcc-rtc-l4 2023-07-03 19:33:26 +02:00
xoviat
aceba1c03f hrtim: fix example and auto adjust psc. 2023-07-01 21:47:44 -05:00
xoviat
8141d53d94 Merge branch 'main' of https://github.com/embassy-rs/embassy into hrtim 2023-07-01 17:32:25 -05:00
xoviat
21a8653195 hrtim: minor cleanup 2023-07-01 17:32:16 -05:00
Mathias
d372df7ddb L4: Switch to MSI to prevent problems with PLL configuration, and enable power to AHB bus clock to allow RTC to run 2023-07-01 12:16:23 +02:00
xoviat
6e13f5b387 rustfmt 2023-06-30 18:33:22 -05:00
xoviat
8c4997c5fc stm32/hrtim: impl. bridge, dead-time part. res. 2023-06-30 18:22:01 -05:00
xoviat
3252eaa060 stm32/hrtim: add example impl. 2023-06-30 18:21:59 -05:00
Dario Nieuwenhuis
6eac49186d Release embassy-net v0.1 2023-06-29 19:55:32 +02:00
Dario Nieuwenhuis
6eb46c419c
Merge pull request #1565 from JuliDi/main
Implement DMA for DAC on STM32
2023-06-29 08:54:28 +00:00
Dario Nieuwenhuis
f7ec579c18 Update probe-rs-cli -> probe-rs 2023-06-29 02:39:28 +02:00
Kevin Lannen
5666c56903 STM32G4: Add CRS support to RCC
Create working CRS USB Example
2023-06-28 16:53:16 -06:00
JuliDi
d5898c11eb
remove need for StaticCell in dac_dma example for stm32l4 2023-06-28 16:40:50 +02:00
JuliDi
bf7e24e9d7
revert to STM32L4S5VI 2023-06-28 15:37:29 +02:00
JuliDi
02f367f733
attempt at fixing ci 2023-06-28 15:28:10 +02:00
JuliDi
f2e7a23148
attempt at fixing ci 2023-06-28 15:25:57 +02:00
JuliDi
27a89019ad
add doc 2023-06-28 15:21:24 +02:00
JuliDi
91c31d5e43
Update DAC examples, add DAC + DMA example 2023-06-28 11:58:25 +02:00
Dario Nieuwenhuis
ed493be869 stm32: update metapac, includes fix for OTG with 9 endpoints (H7) 2023-06-27 23:58:32 +02:00
Dario Nieuwenhuis
219ef5b37a stm32/otg: add VBUS detection.
Fixes #1442.
2023-06-27 12:52:37 +02:00
Dániel Buga
12872ce49b Modify an example 2023-06-25 23:10:59 +02:00
xoviat
018622f607 stm32/wpan: update example 2023-06-25 11:38:48 -05:00
xoviat
29f32ce00e stm32/wpan: reorg subsystems 2023-06-23 17:54:06 -05:00
schphil
71afa40a69
Merge branch 'embassy-rs:main' into can-split 2023-06-23 10:19:30 +02:00
xoviat
6f17286c75
Merge pull request #1576 from OueslatiGhaith/hci_v2
wpan: add BLE HCI
2023-06-23 02:09:52 +00:00
xoviat
caf63b9e73 stm32/tests: update ble test 2023-06-22 21:05:51 -05:00
Dario Nieuwenhuis
8bbfa6827c esp-hosted: add perf hil test. 2023-06-22 21:12:24 +02:00
Dario Nieuwenhuis
0d02298ea6 esp-hosted: fix build on stable. 2023-06-22 21:12:10 +02:00
Dario Nieuwenhuis
1ed909ea74 esp-hosted: fix warnings. 2023-06-22 21:12:10 +02:00
Dario Nieuwenhuis
764b43e82c esp-hosted: wait for esp firmware init. 2023-06-22 21:12:10 +02:00
Dario Nieuwenhuis
6c123596b7 wip: esp-hosted net driver. 2023-06-22 21:12:10 +02:00
Philipp Scheff
76a334bd7c add as_mut & set loopback true in example 2023-06-22 17:47:58 +02:00
Philipp Scheff
f47a148f51 add stm32f7 can example 2023-06-22 17:18:55 +02:00
goueslati
810c6af77a fix build 2023-06-22 15:31:45 +01:00
goueslati
cd4f8f13a2 wpan: add BLE HCI 2023-06-22 15:21:14 +01:00
xoviat
1f2be2dac5
Merge pull request #1569 from xoviat/tl-mbox-2
wpan: misc. cleanup and add mac
2023-06-21 21:50:12 +00:00
Dario Nieuwenhuis
2e625138ff
Merge pull request #1501 from xoviat/can
async can
2023-06-20 22:57:31 +00:00
xoviat
0d67ef795e Merge branch 'main' of https://github.com/embassy-rs/embassy into tl-mbox-2 2023-06-19 21:18:46 -05:00
Ulf Lilleengen
161d3ce05c Add firmware updater examples to CI
CI was not building the a.rs application due to the requirement of b.bin
having been built first. Add a feature flag to examples so that CI can
build them including a dummy application.

Update a.rs application examples so that they compile again.
2023-06-19 23:34:07 +02:00
xoviat
0998221478 stm32/can: update interrupts 2023-06-19 16:05:59 -05:00
Dario Nieuwenhuis
558918651e stm32: update stm32-metapac. 2023-06-19 03:22:12 +02:00
xoviat
72fd648d92 stm32/wpan: add shci mac init 2023-06-18 18:56:53 -05:00
xoviat
b95c0210b8 stm32/wpan: add draft mac mbox 2023-06-18 18:51:14 -05:00
xoviat
ae83e6f536
Merge pull request #1566 from xoviat/tl-mbox-2
tl-mbox: switch to new ipcc mechanism
2023-06-17 20:48:37 +00:00
xoviat
443550b353 stm32/wpan: use new ownership model 2023-06-17 15:37:34 -05:00
xoviat
c7b0df569b stm32/wpan: modify evtbox to use slice view 2023-06-17 14:38:36 -05:00
xoviat
041a4a4208 rustfmt 2023-06-17 12:15:00 -05:00
xoviat
4d2d7d7684 stm32/wpan: fix examples 2023-06-17 12:13:51 -05:00
Dario Nieuwenhuis
ec36225f8a
Merge pull request #1560 from kevswims/feature/stm32g4-pll-enhancements
Feature/stm32g4 pll enhancements - Add PLL support for the P and Q outputs for G4 series chips
2023-06-16 16:06:50 +00:00
Kevin Lannen
61aa6b5236 STM32G4: Add USB Serial example 2023-06-14 11:07:19 -06:00
Kevin Lannen
c94ba84892 stm32g4: PLL: Add support for configuring PLL_P and PLL_Q 2023-06-14 10:44:51 -06:00
xoviat
7f63fbbf4a Merge branch 'old_tl_mbox' of github.com:OueslatiGhaith/embassy into old-tl-mbox 2023-06-12 20:26:38 -05:00
Henrik Berg
35db5cf416 Spelling. 2023-06-12 20:19:33 +02:00
Henrik Berg
23724b6bf6 Code cleanup. 2023-06-12 20:19:33 +02:00
Henrik Berg
6863786243 Document external button. Add wifi_blinky.rs for easy beginners start. 2023-06-12 20:19:33 +02:00
goueslati
bb5ceb2d9c fix CI error 2023-06-12 14:52:14 +01:00
goueslati
a1b27783a6 fix build 2023-06-12 14:44:30 +01:00
goueslati
2d89cfb18f fix merge conflict 2023-06-12 14:27:53 +01:00
goueslati
2dd5ce83ec stm32/ipcc: fix tl_mbox example 2023-06-12 12:31:15 +01:00
goueslati
ca8957da43 stm32/ipcc: move tl_mbox into embassy-stm32-wpan 2023-06-12 12:27:51 +01:00
Dario Nieuwenhuis
6653f262d7 examples: use nicer InterrupExt to set irq priority in multprio. 2023-06-09 16:46:57 +02:00
Dario Nieuwenhuis
98c821ac39 Remove embassy-cortex-m crate, move stuff to embassy-hal-common. 2023-06-09 16:44:20 +02:00
Dario Nieuwenhuis
dc8e34420f Remove executor dep+reexports from HALs.
Closes #1547
2023-06-09 16:29:45 +02:00
Carl St-Laurent
8ddeaddc67
Rename to follow ref manual and CubeIDE 2023-06-08 20:46:48 -04:00
Carl St-Laurent
0915fb73b2
Merge branch 'master' into stm32g4-pll 2023-06-08 20:43:14 -04:00
Dario Nieuwenhuis
8a1d3d5c84 Merge branch 'main' into v4-optional 2023-06-08 19:38:15 +02:00
Dario Nieuwenhuis
f498c689e7 Add RTIC example. 2023-06-08 18:07:49 +02:00
Dario Nieuwenhuis
921780e6bf Make interrupt module more standard.
- Move typelevel interrupts to a special-purpose mod: `embassy_xx::interrupt::typelevel`.
- Reexport the PAC interrupt enum in `embassy_xx::interrupt`.

This has a few advantages:
- The `embassy_xx::interrupt` module is now more "standard".
  - It works with `cortex-m` functions for manipulating interrupts, for example.
  - It works with RTIC.
- the interrupt enum allows holding value that can be "any interrupt at runtime", this can't be done with typelevel irqs.
- When "const-generics on enums" is stable, we can remove the typelevel interrupts without disruptive changes to `embassy_xx::interrupt`.
2023-06-08 18:00:48 +02:00
goueslati
ce1d72c609 wip 2023-06-08 16:26:47 +01:00
Ruben De Smet
352f0b6c38
net: Support dual stack IP 2023-06-07 13:18:19 +02:00
Ruben De Smet
e871324bde
net: StaticV4 config behind proto-ipv4 2023-06-06 17:58:45 +02:00
Ruben De Smet
54bab33c73
Rename StaticConfig to StaticConfigV4 2023-06-06 17:04:21 +02:00
Carl St-Laurent
ade46489f1
Added Vcore boost mode and Flash wait state 2023-06-04 11:57:42 -04:00
Carl St-Laurent
e83762e979
Use HSI16 for exemple since HSE might have a different value depending on board 2023-06-04 11:05:13 -04:00
Carl St-Laurent
675499449f
Example using PLL 2023-06-03 22:10:43 -04:00
Dario Nieuwenhuis
404aa29289 cortex-m: remove owned interrupts. 2023-06-01 03:25:19 +02:00
Dario Nieuwenhuis
1d8321b821 Use make_static! from static-cell v1.1 2023-06-01 01:42:34 +02:00
Dario Nieuwenhuis
d70994e4a8 net-w5500: integrate into main repo. 2023-05-31 01:01:30 +02:00
Dario Nieuwenhuis
82d765689a Merge remote-tracking branch 'w5500/main' into w5500 2023-05-31 00:55:16 +02:00
Dario Nieuwenhuis
7f0e778145 move embassy-net-w5500 to subdir. 2023-05-31 00:54:20 +02:00
Dario Nieuwenhuis
3f35a8876e cyw43: adapt build to main embassy repo. 2023-05-30 23:26:29 +02:00
Dario Nieuwenhuis
b3bbe5eb2d Merge remote-tracking branch 'cyw43/master' into cyw43 2023-05-30 22:43:40 +02:00
Dario Nieuwenhuis
c327c6cd6f cyw43: move crate to subdir. 2023-05-30 22:42:49 +02:00
Dario Nieuwenhuis
f5d0d28ac3
Merge pull request #1498 from rmja/remove-bootloader-partitions
Remove bootloader partitions
2023-05-30 20:08:01 +00:00
George Elliott-Hunter
36bd6c817e Add [profile.release] debug = true to all examples 2023-05-30 20:27:06 +02:00
Rasmus Melchior Jacobsen
b527cc98af Formatting 2023-05-30 14:05:38 +02:00
Rasmus Melchior Jacobsen
36e00caf4d Align examples 2023-05-30 14:03:31 +02:00
Dario Nieuwenhuis
1a31b03976 ci: fix nrf, rp tests. 2023-05-29 22:01:19 +02:00
bors[bot]
bab03a3927
Merge #1489 #1500
1489: stm32/ipcc: make IPCC methods static r=xoviat a=OueslatiGhaith



1500: stm32/tests: disable sdmmc test for now r=xoviat a=xoviat



Co-authored-by: goueslati <ghaith.oueslati@habemus.com>
Co-authored-by: Ghaith Oueslati <73850124+OueslatiGhaith@users.noreply.github.com>
Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-05-29 14:42:51 +00:00
xoviat
09d52638b5 stm32/ipcc: refactor examples and tests 2023-05-27 15:05:50 -05:00
xoviat
c19967dcf2 stm32/ipcc: extract tl_mbox linker file to embassy-stm32 2023-05-27 15:03:25 -05:00
goueslati
2ccf9f3abd stm32/ipcc: static methods for IPCC 2023-05-26 09:56:55 +01:00
Rasmus Melchior Jacobsen
307f2365da Fix blocking example 2023-05-26 04:53:43 +02:00
Rasmus Melchior Jacobsen
41a632a56c Formatting 2023-05-25 22:48:17 +02:00
Rasmus Melchior Jacobsen
8938d928f8 Fix examples 2023-05-25 22:36:56 +02:00
Rasmus Melchior Jacobsen
860b519f99 Let Flash<Async/Blocking> be a thing 2023-05-25 21:40:54 +02:00
Rasmus Melchior Jacobsen
7371eefa86 Align with new bind_interrupt 2023-05-25 20:07:42 +02:00
Rasmus Melchior Jacobsen
525e065474 Align examples 2023-05-25 20:07:42 +02:00
Rasmus Melchior Jacobsen
7477785bbb Align examples 2023-05-25 20:07:41 +02:00
bors[bot]
a58c7b60bc
Merge #1471
1471: embassy-net: Make TcpSocket::abort() async r=Dirbaio a=mkj

This lets callers ensure that the reset packet is sent to the remote host. Otherwise there isn't a way to wait for the smoltcp stack to send the reset.

Requires changes to smoltcp to wake after the reset has been sent, see https://github.com/smoltcp-rs/smoltcp/compare/master...mkj:smoltcp:abort-wake

This commit also adds a "TCP accept" demo of the problem. Without the `.await` for abort() it gets dropped before the RST packet is emitted.

Co-authored-by: Matt Johnston <matt@ucc.asn.au>
2023-05-25 14:20:04 +00:00
Matt Johnston
373eb97357 Add std example of a TCP listener
This also demonstrates calling .abort() on a TCP socket and ensuring
that the reset packet is sent out.
2023-05-25 20:43:36 +08:00
bors[bot]
224faccd4c
Merge #1340 #1474
1340: Add I2S for f4 r=Dirbaio a=xoviat

This is only for f4, but it puts us equal to or ahead of the standard rust hal.

1474: stm32: Fix watchdog timeout computation r=Dirbaio a=rmja



Co-authored-by: xoviat <xoviat@users.noreply.github.com>
Co-authored-by: Rasmus Melchior Jacobsen <rmja@laesoe.org>
2023-05-25 00:42:10 +00:00
xoviat
b6ba1ea53a stm32: move lora to bind_interrupts 2023-05-24 18:09:04 -05:00
xoviat
316be179af stm32: move to bind_interrupts
disable lora functionality for now
2023-05-24 17:29:56 -05:00
bors[bot]
1fdde8f03f
Merge #1457
1457: TL Mbox read and write for stm32wb r=xoviat a=OueslatiGhaith

Hello,

This pull request is related to #1397 and #1401, inspired by #24, built upon the work done in #1405 and #1424, and was tested on an stm32wb55rg.

This pull request aims to add read and write functionality to the TL mailbox for stm32wb microcontrollers

Co-authored-by: goueslati <ghaith.oueslati@habemus.com>
Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-05-23 01:15:22 +00:00
goueslati
059ab358a5 stm32/ipcc: uncomment shci init cmd 2023-05-22 11:13:22 +01:00
goueslati
12720737e1 stm32/ipcc: fix incorrect example 2023-05-22 10:52:05 +01:00
xoviat
d1dfaa1905 stm32/ipcc: fix hil test 2023-05-21 20:18:26 -05:00
xoviat
eb09d7d671 stm32/ipcc: update doc 2023-05-21 18:39:13 -05:00
Caleb Jamison
1ebb742fbf Switch to DMA, use new clocks, don't take ownership of pio common 2023-05-19 16:48:47 -04:00
Caleb Jamison
1be6e53316 Pin fix, improve fifo handling 2023-05-19 15:06:36 -04:00
Dario Nieuwenhuis
9f7392474b Update Rust nightly. 2023-05-19 17:12:39 +02:00
bors[bot]
9dff6b9d81
Merge #1419
1419: stm32/pwm: improve dead-time api r=Dirbaio a=xoviat



Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-05-19 14:41:44 +00:00
pennae
f97b591831 rp/clocks: don't expose unstable pac items
exposing pac items kind of undermines the unstable-pac feature. directly
exposing register structure is also pretty inconvenient since the clock
switching code takes care of the src/aux difference in behavior, so a
user needn't really be forced to write down decomposed register values.
2023-05-17 21:36:19 +02:00
kalkyl
ab63f3832f rp: Read flash unique id and jedec id 2023-05-16 11:21:17 +02:00
bors[bot]
1a87f7477a
Merge #1458
1458: rp: remove take!, add bind_interrupts! r=Dirbaio a=pennae

both of the uart interrupts now check a flag that only the dma rx path ever sets (and now unsets again on drop) to return early if it's not as they expect. this is ... not our preferred solution, but if bind_interrupts *must* allow mutiple handlers to be specified then this is the only way we can think of that doesn't break uarts.

Co-authored-by: pennae <github@quasiparticle.net>
2023-05-15 15:59:30 +00:00
pennae
14a5d03af2 rp: remove take!, add bind_interrupts! 2023-05-15 15:24:56 +02:00
goueslati
d97724cca3 tl_mbox read and write 2023-05-15 10:25:02 +01:00
Dario Nieuwenhuis
62857bdb2d net: reexport UDP PacketMetadata under the udp module. 2023-05-15 00:55:34 +02:00
Dario Nieuwenhuis
26d7610554 net: do not use smoltcp Instant/Duration in public API. 2023-05-15 00:53:30 +02:00
Dario Nieuwenhuis
db907a914c cyw43-pio: add overclock feature flag. 2023-05-14 23:02:49 +02:00
Dario Nieuwenhuis
8800caa216 Update Embassy, to new PIO API. 2023-05-13 02:58:42 +02:00
Dario Nieuwenhuis
2fcdfc4876 rp: don't use SetConfig trait in PWM and PIO.
It was intended to allow changing baudrate on shared spi/i2c. There's no
advantage in using it for PWM or PIO, and makes it less usable because you have to
have `embassy-embedded-hal` as a dep to use it.
2023-05-13 02:13:26 +02:00
bors[bot]
7f96359804
Merge #1424
1424: add TL maibox for stm32wb r=xoviat a=OueslatiGhaith

Hello,

This pull request is related to #1397 and #1401, inspired by #24, build upon the work done in #1405, and was tested on an stm32wb55rg.

This pull request aims to add the transport layer mailbox for stm32wb microcontrollers. For now it's only capable of initializing it and getting the firmware information

Co-authored-by: goueslati <ghaith.oueslati@habemus.com>
Co-authored-by: Ghaith Oueslati <73850124+OueslatiGhaith@users.noreply.github.com>
Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-05-11 22:48:55 +00:00
xoviat
bf45b1d83d fix memory.x 2023-05-11 17:23:18 -05:00
xoviat
d7262f9849 rustfmt 2023-05-11 16:53:55 -05:00
xoviat
8a620fd59c stm32/ble: fix tests and add instructions to run example 2023-05-11 16:45:42 -05:00
kalkyl
bbd687fcb0 Update embassy 2023-05-10 02:40:41 +02:00
Caleb Jamison
9d971e5b15
Merge branch 'master' into master 2023-05-09 17:55:27 -04:00
Caleb Jamison
5cfe1a1fb4 Dirbaio comments round 2 2023-05-09 17:45:24 -04:00
Caleb Jamison
6bea078487 Remove patches, bump rp-pac version 2023-05-09 12:20:23 -04:00
Caleb Jamison
5015c845c5 Improve gpout example, clk_gpout_freq 2023-05-09 12:10:24 -04:00
kalkyl
72b0379125 🌈 2023-05-09 01:51:08 +02:00
Dirk Stolle
0584312ef0 Fix some typos 2023-05-08 23:25:01 +02:00
Dario Nieuwenhuis
008b1fd30c update defmt to 0.3.4, now that probe-run is fixed. 2023-05-08 21:53:03 +02:00
bors[bot]
d0703f83db
Merge #1435
1435: Added example for multi priority executors rp2040 r=Dirbaio a=fakusb

I added an example for multiple priorities of tasks on rp2040 by adjusting [examples/nrf52840/src/bin/multiprio.rs](https://github.com/embassy-rs/embassy/blob/master/examples/nrf52840/src/bin/multiprio.rs) .

This needs https://github.com/embassy-rs/rp-pac/pull/2 , and this commit also adds the 6 new interrupt handlers for software interrupts to embassy-rs.

We might need to change the git path for rp-pac in [embassy-rp/Cargo.toml](https://github.com/embassy-rs/embassy/compare/master...fakusb:rp2040-multiprio-executor?expand=1#diff-47463ea358745927ecdb686f52feab816fde5d402a9628a136c116f34a802ab0)

Closes #1413

Co-authored-by: Fabian Kunze <fkunze@fkunze.de>
2023-05-08 16:59:07 +00:00
Caleb Jamison
59132514cf Add missing functions, Cleanup, Gpout example 2023-05-08 09:45:54 -04:00
Fabian Kunze
87795cbca8 added example multi priority executors rp2040 2023-05-07 01:00:13 +02:00
pennae
b38d496d51 rp/pio: allow wrap-around program loading
execution wraps around after the end of instruction memory and wrapping
works with this, so we may as well allow program loading across this
boundary. could be useful for reusing chunks of instruction memory.
2023-05-06 21:08:20 +02:00
pennae
8e4d65e163 rp/pio: configure state machines with Config struct
the many individual sets aren't very efficient, and almost no checks
were done to ensure that the configuration written to the hardware was
actually valid. this adresses both of these.
2023-05-06 17:23:41 +02:00
pennae
37b460637d rp/pio: add set-pin-{values,dirs} convenience functions
these are needed a lot during state machine setup, it makes sense to
provide convenience functions for them.
2023-05-06 11:52:25 +02:00
pennae
41ec4170a5 rp/pio: add load_program, use_program
programs contain information we could pull from them directly and use to
validate other configuration of the state machine instead of asking the
user to pull them out and hand them to us bit by bit. unfortunately
programs do not specify how many in or out bits they use, so we can only
handle side-set and wrapping jumps like this. it's still something though.
2023-05-06 11:44:04 +02:00
pennae
8ebe6e5f20 rp/pio: drop Pio prefix from almost all names
it's only any good for PioPin because there it follows a pattern of gpio
pin alternate functions being named like that, everything else can just
as well be referred to as `pio::Thing`
2023-05-05 19:08:16 +02:00
bors[bot]
067f1382e4
Merge #1429
1429: rp pio, √9 r=Dirbaio a=pennae

another mix of refactoring and soundness issues. most notably pio pins are now checked for being actually accessible to the pio blocks, are constructible from not just the owned peripherals but refs as well, and have their registrations to the pio block reverted once all state machines and the common block has been dropped.

state machines are now also stopped when dropped, and concurrent rx+tx using dma can finally be done in a sound manner. previously it was possible to do, but allowed users to start two concurrent transfers to the same fifo using different dma channels, which obviously would not have the expected results on average.

Co-authored-by: pennae <github@quasiparticle.net>
2023-05-04 20:04:11 +00:00
kbleeke
0d8d8d3320 simple error handling for join instead of looping internally 2023-05-04 20:23:02 +02:00
ceekdee
91612b7446 Simplify SUBGHZSPI configuration. 2023-05-04 09:45:18 -05:00
goueslati
007f452927 removed hardcoded addresses in memory.x 2023-05-04 11:02:17 +01:00
Chuck Davis
91d1fff4ed
Merge branch 'embassy-rs:master' into master 2023-05-03 21:07:28 -05:00
ceekdee
629e0ea595 Handle SUBGHZSPI as async. 2023-05-03 21:05:47 -05:00
xoviat
02d6e0d14d stm32/i2s: add module and example for f4 2023-05-03 18:17:57 -05:00
xoviat
7750ea65ba rustfmt 2023-05-03 18:14:42 -05:00
xoviat
a0b1299890 stm32/tests: add hil test for ble 2023-05-03 17:36:31 -05:00
pennae
c44c108db5 rp/pio: wrap sm rx, tx in structs and allow splitting
this *finally* allows sound implementions of bidirectional transfers
without blocking. the futures previously allowed only a single direction
to be active at any given time, and the dma transfers didn't take a
mutable reference and were thus unsound.
2023-05-03 13:00:52 +02:00
pennae
909a5fe2e5 rp/pio: split irqs from state machines
we can only have one active waiter for any given irq at any given time.
allowing waits for irqs on state machines bypasses this limitation and
causes lost events for all but the latest waiter for a given irq.
splitting this out also allows us to signal from state machines to other
parts of the application without monopolizing state machine access for
the irq wait, as would be necessary to make irq waiting sound.
2023-05-03 12:57:21 +02:00
pennae
486fe9e59d rp/pio: remove PioStateMachineInstance
move all methods into PioStateMachine instead. the huge trait wasn't
object-safe and thus didn't have any benefits whatsoever except for
making it *slightly* easier to write bounds for passing around state
machines. that would be much better solved with generics-less instances.
2023-05-03 11:25:58 +02:00
pennae
906d2b2db7 rp/pio: PioStateMachine{Instance, => ,Instance}
next step: get rid of the insance trait entirely
2023-05-03 11:25:58 +02:00
pennae
4ccb2bc95a rp/pio: add PioPin trait
pio can only access pins in bank 0, so it doesn't make sense to even
allow wrapping of other banks' pins.
2023-05-03 11:25:43 +02:00
bors[bot]
2afa08c923
Merge #1425
1425: rp pio, round 2 r=Dirbaio a=pennae

another round of bugfixes for pio, and some refactoring. in the end we'd like to make pio look like all the other modules and not expose traits that provide all the methods of a type, but put them onto the type itself. traits only make much sense, even if we added an AnyPio and merged the types for the member state machines (at the cost of at least a u8 per member of Pio).

Co-authored-by: pennae <github@quasiparticle.net>
2023-05-02 18:03:00 +00:00
pennae
7a36072a15 rp/pio: drop SmInstance{,Base}
these are just overly convoluted ways of writing down numbers.
2023-05-02 18:01:18 +02:00
pennae
a167c77d39 rp/pio: make PioCommon a struct
the PioCommon trait does not serve much of a purpose; there can be only
two implementations and they only differ in a few associated constants.
2023-05-02 18:01:18 +02:00
pennae
8839f3f62a rp/pio: PioInstance::split -> Pio::new
not requiring a PioInstance for splitting lets us split from a
PeripheralRef or borrowed PIO as well, mirroring every other peripheral
in embassy_rp. pio pins still have to be constructed from owned pin
instances for now.
2023-05-02 15:52:50 +02:00
pennae
3229b5e809 rp/pio: remove PioPeripheral
merge into PioInstance instead. PioPeripheral was mostly a wrapper
around PioInstance anyway, and the way the wrapping was done required
PioInstanceBase<N> types where PIO{N} could've been used instead.
2023-05-02 15:46:21 +02:00
pennae
8e22d57447 rp/pio: add hd44780 example
add an hd44780 example for pio. hd44780 with busy polling is a pretty
complicated protocol if the busy polling is to be done by the
peripheral, and this example exercises many pio features that we don't
have good examples for yet.
2023-05-02 13:44:24 +02:00
goueslati
bab30a7e87 added TL Mailbox initialization for STM32WB 2023-05-02 12:16:48 +01:00
xoviat
cd88e39f5f stm32/pwm: improve dead-time api 2023-05-01 16:42:03 -05:00
bors[bot]
855c0d1423
Merge #1376
1376: rtc: cleanup and consolidate r=Dirbaio a=xoviat

This removes an extra file that I left in, adds an example, and consolidates the files into one 'v2' file.

Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-05-01 19:32:06 +00:00
Satoshi Tanaka
534cf7c618 Add AP mode example 2023-05-02 01:30:08 +09:00
bors[bot]
05c36e05f9
Merge #1414
1414: rp: report errors from buffered and dma uart receives r=Dirbaio a=pennae

neither of these reported errors so far, which is not ideal. add error reporting to both of them that matches the blocking error reporting as closely as is feasible, even allowing partial receives from buffered uarts before errors are reported where they would have been by the blocking code. dma transfers don't do this, if an errors applies to any byte in a transfer the entire transfer is nuked (though we probably could report how many bytes have been transferred).

Co-authored-by: pennae <github@quasiparticle.net>
2023-05-01 15:35:39 +00:00
Dario Nieuwenhuis
0589f2f36e
Merge pull request #71 from kbleeke/wifi-scanning2
add wifi scan example
2023-05-01 14:37:25 +00:00
kbleeke
b612976cc7 add wifi scan example 2023-05-01 16:34:30 +02:00