Commit Graph

385 Commits

Author SHA1 Message Date
Alexandru RADOVICI
aa9eb2ab01 rename PWM_CH to PWM_SLICE 2024-04-02 17:20:35 +03:00
Adam Greig
7cf6490fba
usb: remove device_descriptor buffer, store bytes in UsbDevice.inner instead 2024-03-23 00:35:15 +00:00
Dario Nieuwenhuis
eca9aac194 Fix warnings in recent nightly. 2024-03-20 16:39:09 +01:00
Haobo Gu
a0afd378f4 update usbd-hid to latest
Signed-off-by: Haobo Gu <haobogu@outlook.com>
2024-02-26 17:28:29 +08:00
Mick Chanthaseth
bae30fb397
removed extra spaces. 2024-02-19 15:41:15 -08:00
Mick Chanthaseth
9c870981e3
fixed formatting in usb_hid_mouse.rs 2024-02-19 15:28:57 -08:00
Mick Chanthaseth
f3b96d8ba0
Updated formatting in usb_hid_mouse.rs. 2024-02-19 15:14:28 -08:00
Mick Chanthaseth
7609313a75
Merge branch 'embassy-rs:main' into main 2024-02-16 22:27:06 -08:00
Mick Chanthaseth
0097cbcfe3
Update imports in usb_hid_mouse.rs 2024-02-16 22:22:13 -08:00
Dario Nieuwenhuis
b7c98b9ec9
Merge pull request #2558 from CBJamo/ws2812_write_fixup
RP: Add explicit reset time to ws2812 write fn.
2024-02-17 01:49:20 +00:00
Caleb Jamison
bd0b450ca4 Improve rp2040 i2c slave
This commit takes the fixes and error reporting improvements from
jcdickinson's work and applies them without overlaying a software state
machine on top of the hardware state machine.

Also allows configuration of response to 'general call' writes.
2024-02-15 17:56:50 -05:00
Ulf Lilleengen
a2b7b0c8e0
Merge pull request #2414 from JomerDev/usb-logger-without-device
Adds function and macro to create usb logger without device (also fixes a logger issue)
2024-02-12 20:04:57 +00:00
Mick Chanthaseth
58fa5e57b6
added usb_hid_mouse example for rp 2024-02-11 16:04:06 -08:00
Caleb Jamison
b4dc406e19 Switch to ticker 2024-02-10 17:00:10 -05:00
Caleb Jamison
c873dcbb20 Add explicit reset time to ws2812 write fn. 2024-02-10 16:55:32 -05:00
Stefan Gehr
b9d0069671
correct spelling of the word "receive" 2024-02-03 14:56:31 +01:00
Caleb Jamison
8b7d856195 Rename timeout_at to with_deadline 2024-01-31 16:26:11 -05:00
Caleb Jamison
1e698af05b Add timeout_at convenience function and example. 2024-01-31 14:10:31 -05:00
Dario Nieuwenhuis
ee0ebe3121 rp/gpio: remove generics. 2024-01-22 21:32:10 +01:00
Dennis Ranke
7931fcfb3d fix wrong formatting due to not using nightly rustfmt 2024-01-20 16:35:09 +01:00
Dennis Ranke
69d4b42841 add pio_i2s example for RP2040 2024-01-20 16:08:32 +01:00
umgefahren
6ca43030db feat: Extended the Scan API 2024-01-19 23:51:57 +01:00
9names
850fe7251a Add cyw43 package versions to rp-examples Cargo.toml 2024-01-13 09:01:11 +11:00
Dario Nieuwenhuis
22197320ff bump embassy-time 0.3, embassy-executor 0.5, embassy-net 0.4. 2024-01-11 23:01:24 +01:00
Ulf Lilleengen
50630192b8 fix: revert unintended change 2024-01-10 10:02:26 +01:00
Ulf Lilleengen
de08da0bf1 rustfmt 2024-01-10 09:54:35 +01:00
Ulf Lilleengen
ff5f5021fb cleanup docs and add channel synchronization example 2024-01-10 09:52:46 +01:00
Ulf Lilleengen
b867245894 simplify example 2024-01-10 09:23:53 +01:00
Ulf Lilleengen
be3c70d455
Merge pull request #2417 from vasilNnikolov/mutex_rp_example
Add example of pin sharing between tasks
2024-01-10 07:25:47 +00:00
Dario Nieuwenhuis
495b8b739a Change GPIO inherent methods back to &self.
With the embedded-hal rc3 update I changed them to require `&mut self`, but
in retrospect I think `&self` is better, for extra flexibility.

This PR reverts the changes from the rc3 update to inherent methods.
2024-01-10 00:00:10 +01:00
Vasil Nikolov
4843c060d0 no need for a PeripheralRef 2024-01-10 00:47:45 +02:00
Dario Nieuwenhuis
c9ac39df94 Update embedded-hal to v1.0 2024-01-09 23:37:14 +01:00
Vasil Nikolov
ebf46d37aa remove unused import 2024-01-09 00:35:11 +02:00
Vasil Nikolov
2498fbdf52 add example of pin sharing between tasks 2024-01-09 00:26:48 +02:00
Jomer.Dev
6f505feeb1 Add example 2024-01-08 00:21:02 +01:00
Scott Mabin
f85898771b New embassy-net release 2024-01-04 16:06:59 +00:00
Dario Nieuwenhuis
eb7197c5b7 examples: configure executor task arena sizes. 2024-01-02 18:13:25 +01:00
Dario Nieuwenhuis
8b36a32ed5 ci: use beta, add secondary nightly ci. 2023-12-21 15:03:57 +01:00
Ulf Lilleengen
0acf7b09c3 chore: replace make_static! macro usage with non-macro version 2023-12-21 10:29:57 +01:00
Dario Nieuwenhuis
d81395fab3 Update embedded-hal to 1.0.0-rc.3 2023-12-14 16:19:32 +01:00
Jesse Braham
925f5cbc26 Update all references to embasy-executor to the latest version 2023-12-06 12:05:47 +01:00
Scott Mabin
334900752a update release version in examples and other crates 2023-12-04 13:15:10 +00:00
Dario Nieuwenhuis
c6989dfbca Remove nightly and unstable-traits features in preparation for 1.75. 2023-11-29 17:26:33 +01:00
Dario Nieuwenhuis
4634316749 Update embedded-(hal,io,nal). 2023-11-29 17:01:36 +01:00
Dario Nieuwenhuis
1b9925e3da Move embassy-lora, lora examples to lora-phy repo. 2023-11-29 16:26:31 +01:00
James Munns
f3c77e59c4 Add docs, touch all linker fragments 2023-11-19 23:10:11 +01:00
James Munns
30424d83ff Update RP2040 memory.x
The RP2040 has 264KiB of memory, not 256KiB.
2023-11-19 23:10:11 +01:00
Dario Nieuwenhuis
1f9b649f80 executor: release v0.3.3 2023-11-15 18:44:01 +01:00
Dario Nieuwenhuis
4647df14b1 Update heapless to v0.8, embedded-nal-async to v0.7 2023-11-10 16:43:53 +01:00
Dario Nieuwenhuis
0b015bd727 usb: remove msos-descriptor feature. 2023-11-08 23:21:52 +01:00
kalkyl
8effff3383 rp: Remove control handler from USB raw bulk example 2023-11-07 20:45:01 +01:00
kalkyl
d44383e9a7 fmt 2023-11-07 20:19:56 +01:00
kalkyl
37a773c037 Use driver reexport 2023-11-07 20:17:19 +01:00
kalkyl
d1adc93614 rp: Add USB raw bulk example 2023-11-07 19:57:05 +01:00
kalkyl
e3fe13e905 Add docs 2023-11-07 10:58:35 +01:00
kalkyl
38bfa6916f Update pio-uart example 2023-11-07 09:15:21 +01:00
kalkyl
50139752bc Add comments 2023-11-07 09:10:18 +01:00
kalkyl
db4cd73894 rp: Add USB raw example + msos descriptor to examples and usb-logger 2023-11-07 09:05:10 +01:00
kalkyl
649f1a122a Cleanup 2023-11-03 00:41:16 +01:00
kalkyl
413b394d31 rp: Add PWM input example 2023-11-03 00:37:58 +01:00
Dario Nieuwenhuis
7ea2c3508a
Merge pull request #2137 from kalkyl/pio-rotary-encoder
rp: Add PIO rotary encoder example
2023-11-02 21:52:01 +00:00
kalkyl
ec744558b2 Cleanup 2023-11-02 22:37:03 +01:00
kalkyl
44486c5b39 rp: Add PIO rotary encoder example 2023-11-02 21:54:20 +01:00
Dario Nieuwenhuis
1f51367eb9 Upgrade static-cell to v2.0 2023-11-02 21:52:07 +01:00
Dario Nieuwenhuis
e519e00265 Update Rust nightly. 2023-11-01 04:56:56 +01:00
Dario Nieuwenhuis
dd6a29adb2 Release embassy-executor v0.3.1 2023-11-01 00:17:44 +01:00
Dario Nieuwenhuis
74683c706b
Merge pull request #2127 from bugadani/release
Prepare embassy-net 0.2.1 and embassy-sync 0.4.0
2023-10-31 15:57:51 +00:00
Dániel Buga
d941882066 Prepare embassy-net 0.2.1 and embassy-sync 0.4.0 2023-10-31 09:33:27 +01:00
kalkyl
c9b50e46a5 rp: Add PIO stepper motor driver example 2023-10-30 20:50:37 +01:00
Dario Nieuwenhuis
6e6df22979
Merge pull request #2075 from CBJamo/rosc_example
Add example to show useage of rp2040 rosc
2023-10-16 23:22:06 +00:00
Caleb Jamison
5a1393aa0b Add example to show useage of rp2040 rosc 2023-10-16 16:17:07 -04:00
Dániel Buga
40e4ca4751 Prepare embassy-net(/-driver,/-driver-channel) 0.2.0 2023-10-16 20:59:06 +02:00
Dario Nieuwenhuis
213b4c9dca time: add links key, release v0.1.5. 2023-10-16 20:11:35 +02:00
Adam Greig
0621e957a0
time: Update examples, tests, and other code to use new Timer::after_x convenience methods 2023-10-15 01:30:12 +01:00
Dario Nieuwenhuis
2e50bf667a
Merge pull request #2055 from kalkyl/usb-midi
embassy-usb: Add MIDI class
2023-10-14 23:10:25 +00:00
kalkyl
a57d383b1d embassy-usb: Add MIDI class 2023-10-14 04:20:59 +02:00
Dániel Buga
02d2c06b23 Release embassy-time 0.1.4 2023-10-12 18:14:33 +02:00
Dario Nieuwenhuis
0324cee0ca update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
KingCol13
90ade1b311 Add wait for DHCP in rp wifi_tcp_server 2023-10-02 20:10:52 +01:00
KingCol13
a931dfd9ad Update firmware size in rp wifi examples 2023-10-02 20:10:45 +01:00
Jonathan Dickinson
f98c8886b2
feat: allow schmitt, slew, and drive strength be set from Flex, Input, Output
Allows the schmitt, slew and drive strength to be set from Flex. Input and Output[OpenDrain] also expose the appropriate setters.
2023-10-01 21:49:14 -04:00
ceekdee
70acc093dd Update rust-lorawan crate versions. 2023-09-25 10:45:53 -05:00
ceekdee
7d5e62d4a7 Update for rust-lorawan and lora-phy version 2. 2023-09-24 10:33:03 -05:00
Ulf Lilleengen
1b20ba27b1 feat: bump embassy-sync version to 0.3.0
Update changelog in preparation for release
2023-09-14 18:26:00 +02:00
Dario Nieuwenhuis
1133cbf90e
Merge pull request #1834 from dave-andersen/main
Fix timing on RP2040 pio_ws2812.rs example
2023-09-10 21:21:06 +00:00
Caleb Jamison
8201979d71 Add example, fix small bug in respond_and_fill 2023-09-10 23:01:15 +02:00
Dario Nieuwenhuis
40b576584e
Merge pull request #1832 from embassy-rs/pipe-bufread
sync/pipe: impl BufRead.
2023-08-29 23:12:06 +00:00
Dario Nieuwenhuis
6c165f8dc0 sync/pipe: impl BufRead. 2023-08-30 01:06:41 +02:00
Jesse Braham
1f63bf4153 Release embassy-time v0.1.3 2023-08-28 08:00:18 -07:00
Dave Andersen
71c4e7e4d2 Fix timing on RP2040 pio_ws2812.rs example
The example spins too fast so it doesn't appear to change;
it's delaying for microseconds instead of milliseconds.
This commit slows it down and adds a comment noting the pin
mapping for the Adafruit feather rp2040+RFM95 LoRA module,
which has its Neopixel on pin 4 instead of 16.
2023-08-27 22:39:44 -04:00
Dániel Buga
a2c718f61c Bump executor crate version to 0.3.0 2023-08-23 20:34:37 +02:00
Dario Nieuwenhuis
b3212ae383
Merge pull request #1763 from rubdos/sender-receiver-with-ctx
Refactor Channel/Sender/Receiver poll methods
2023-08-22 21:25:29 +00:00
Ruben De Smet
c39671266e
Deprecate *recv* in favor of *receive* 2023-08-22 16:58:31 +02:00
Dario Nieuwenhuis
b948e37769 rp/flash: change naming to blocking_*, new_blocking.
- Needed for consistency with other drivers.
- Having two `new()` functions sometimes resulted in 'multiple applicable methods' errors.
2023-08-18 13:21:21 +02:00
Dario Nieuwenhuis
f26dd54f63
Update embedded-hal to 1.0.0-rc.1 (#1783) 2023-08-16 00:40:56 +02:00
Dario Nieuwenhuis
11b66a73b4 net-wiznet: rename from embassy-net-w5500. 2023-08-15 23:05:55 +02:00
Dario Nieuwenhuis
76276c326a net-w5500: extract chip-specific stuff to a trait. 2023-08-15 22:52:37 +02:00
Dario Nieuwenhuis
5d5cd23715
Update to embedded-io 0.5 (#1752) 2023-08-07 13:43:09 +02:00
pennae
a6b8f3d994 rp: add single-channel dma from adc
with uniform treatment of adc inputs it's easy enough to add a new
sampling method. dma sampling only supports one channel at the moment,
though round-robin sampling would be a simple extension (probably a new
trait that's implemented for Channel and &[Channel]). continuous dma as
proposed in #1608 also isn't done here, we'd expect that to be a
compound dma::Channel that internally splits a buffer in half and
dispatches callbacks or something like that.
2023-08-02 17:04:32 +02:00
pennae
b166ed6b78 rp: generalize adc inputs from pins to channels
this lets us treat pins and the temperature sensor uniformly using the
same interface. uniformity in turn lets us add more adc features without
combinatorial explosion of methods and types needed to handle them all.
2023-08-01 18:31:28 +02:00
Michael van Niekerk
56b21ad429
Uart pio fix zeros
Prevent UART from only getting 0s from the output
2023-07-30 22:13:27 +02:00
Derek Hageman
7ed9e29326 rp: add async flash
Implement an async flash mode using the XIP background best effort
read interface.  Only reads are actually async, write and erase remain
blocking.
2023-07-28 16:50:54 -06:00
pennae
cbc8871a0b rp: relocate programs implicitly during load
this removed the RelocatedProgram construction step from pio uses.
there's not all that much to be said for the extra step because the
origin can be set on the input program itself, and the remaining
information exposed by RelocatedProgram can be exposed from
LoadedProgram instead (even though it's already available on the pio_asm
programs, albeit perhaps less convenient). we do lose access to the
relocated instruction iterator, but we also cannot think of anything
this iterator would actually be useful for outside of program loading.
2023-07-28 19:33:02 +02:00
Dario Nieuwenhuis
d5f9d17b7c Make pipes local vars. 2023-07-28 13:38:26 +02:00
Michael van Niekerk
146c744223 Fixes as per PR 2023-07-28 12:56:31 +02:00
Michael van Niekerk
6b6acc256d Merge remote-tracking branch 'origin/main' 2023-07-28 11:57:50 +02:00
Michael van Niekerk
91338adc15 Don't include embedded-hal-common 2023-07-28 11:56:59 +02:00
Michael van Niekerk
1d4e1092c4
Merge branch 'embassy-rs:main' into main 2023-07-28 11:38:45 +02:00
Michael van Niekerk
0f1ff77fcc Comments 2023-07-28 11:38:08 +02:00
Michael van Niekerk
e947aa0153 Comments 2023-07-28 11:37:38 +02:00
Chuck Davis
8f1ea85938
Merge branch 'main' into main 2023-07-27 08:50:53 -05:00
ceekdee
c54ae73d49 Use lora-phy v1.2.1; modify embassy-lora dependencies. 2023-07-26 21:51:09 -05:00
Piotr Esden-Tempski
858ddf6777 Added debug=2 in release profile to all examples.
This makes rtt output work right when using `cargo run` in release mode.

Debug was already enabled for release builds in some of the examples but
not all.
2023-07-26 18:32:40 -07:00
Michael van Niekerk
a60d92cfbb Tx and Rx setup 2023-07-24 22:20:00 +02:00
maximedeboeck
88d1976e81 Added usb-hid keyboard example for rp pico. 2023-07-16 12:31:56 +02:00
Henrik Berg
56ca179475 Round temp to make more sense. 2023-07-13 22:47:03 +02: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
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
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
d137286981 Release embassy-time v0.1.2 2023-07-06 01:29:44 +02: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
Dario Nieuwenhuis
a101d9078d update embedded-hal crates. 2023-07-04 19:59:36 +02:00
Dario Nieuwenhuis
f7ec579c18 Update probe-rs-cli -> probe-rs 2023-06-29 02:39:28 +02: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
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
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
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
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
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
Dario Nieuwenhuis
26d7610554 net: do not use smoltcp Instant/Duration in public API. 2023-05-15 00:53:30 +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