Scott Mabin
c114ea024a
Add udp capacity impls
2023-08-15 15:31:23 +01:00
Scott Mabin
b1ef009c6b
Add tcp capacity impls
2023-08-15 15:31:23 +01:00
Scott Mabin
fbec797d64
embassy-net:tcp:send/recv
...
- Add async versions of smoltcp's `send` and `recv` closure based API.
2023-08-14 15:33:02 +01:00
Dario Nieuwenhuis
5d5cd23715
Update to embedded-io 0.5 ( #1752 )
2023-08-07 13:43:09 +02:00
Jan Niehusmann
33778d3772
Fix link to embassy-time in embassy-net/README.md
2023-08-02 20:13:48 +00:00
Ruben De Smet
b394cc3394
Enable IEEE802.15.4 doc building
2023-07-31 15:02:55 +02:00
Ruben De Smet
bdd59b8988
Only skip default-gateway assignment with Medium::Ip
2023-07-31 14:21:27 +02:00
Ruben De Smet
9f55228be0
Use hardware_address() for all media
2023-07-31 14:21:26 +02:00
Ruben De Smet
83ff3cbc69
Add Ip hardware address to Driver
2023-07-31 14:21:26 +02:00
Ruben De Smet
4afdce4ec5
Introduce driver::HardwareAddress without smoltcp dependency
2023-07-31 14:21:26 +02:00
Ruben De Smet
69c0a89aa5
Use HardwareAddress in Driver
2023-07-28 16:40:15 +02:00
Ruben De Smet
c3ba08ffb6
Add IEEE802.15.4 address to embassy net Stack
2023-07-28 16:22:03 +02:00
Ruben De Smet
f81ee103bf
Allow ethernet and 802.15.4 to coexist
...
Co-authored-by: Thibaut Vandervelden <thvdveld@vub.be>
2023-07-28 15:11:24 +02:00
xoviat
2cdd593290
Merge branch 'main' of https://github.com/embassy-rs/embassy into mac
2023-07-21 16:24:48 -05:00
ivmarkov
98576c17b6
Fix multicast support ( #1670 )
2023-07-18 17:35:20 +02:00
bjoernQ
6bf4717b0a
cfg-gate unapply_config_v4
2023-07-18 10:57:05 +02:00
bjoernQ
f581831b86
Make dual-stack work in embassy-net
2023-07-18 10:39:29 +02:00
xoviat
0b63af3313
wpan: prepare net impl.
2023-07-15 19:02:04 -05:00
Roy Buitenhuis
f192f44018
fmt
2023-07-12 11:32:02 +02:00
Roy Buitenhuis
b81c14f442
Add polling fn's for send_to and recv_from in UdpSocket.
2023-07-12 11:32:02 +02:00
Roy Buitenhuis
f54e1cea90
Add poll functions on UdpSocket.
2023-07-12 11:32:02 +02:00
Roy Buitenhuis
151557fec3
Re-export smoltcp::wire::IpEndpoint
2023-07-07 16:38:56 +02:00
Dario Nieuwenhuis
d137286981
Release embassy-time v0.1.2
2023-07-06 01:29:44 +02:00
Dario Nieuwenhuis
6eac49186d
Release embassy-net v0.1
2023-06-29 19:55:32 +02:00
Dániel Buga
59f829c6cc
Make StackResources::new() const
2023-06-28 15:03:57 +02:00
Dario Nieuwenhuis
715bf20c41
Update smoltcp to 0.10
2023-06-26 20:13:55 +02:00
Dario Nieuwenhuis
64cba950e5
Update smoltcp.
2023-06-26 11:43:28 +02:00
Dario Nieuwenhuis
8a1d3d5c84
Merge branch 'main' into v4-optional
2023-06-08 19:38:15 +02:00
Ruben De Smet
2455fd4dbe
net: Add documentation to new Config system
2023-06-07 13:18:19 +02:00
Ruben De Smet
352f0b6c38
net: Support dual stack IP
2023-06-07 13:18:19 +02:00
Russ Hewgill
2eb08b2dc9
updated can_recv and may_recv to match the smoltcp functions.
2023-06-06 09:49:38 -07:00
Ruben De Smet
ae1dedc059
net: proto-ipv6 in is_config_up
2023-06-06 17:58:46 +02:00
Ruben De Smet
18578fd15f
net: Allow a combined use of IPv4 and IPv6 DNS servers
2023-06-06 17:58:45 +02:00
Ruben De Smet
d7f674e410
net: Allow setting an IPv6 in the stack
2023-06-06 17:58:45 +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
Ruben De Smet
44624b2d7a
Put proto-ipv4 behind a feature flag
2023-06-05 16:45:40 +02:00
Matt Johnston
b20427b2ec
net: Make flush() wait for RST packets from abort()
...
Add docs to note that dropping a TcpSocket early will
prevent the .abort() RST from being sent.
2023-05-25 20:43:36 +08:00
Dario Nieuwenhuis
9f7392474b
Update Rust nightly.
2023-05-19 17:12:39 +02:00
Dario Nieuwenhuis
d07821d851
net: document crate.
2023-05-15 00:56:09 +02: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
2d65373f63
Remove unused feature(type_alias_impl_trait)
.
2023-05-14 23:44:53 +02:00
Roy Buitenhuis
a2ac1eed1b
Add extra feature flags to fix build without dhcp.
2023-04-18 22:11:15 +02:00
Dario Nieuwenhuis
577f060d24
Release embassy-sync v0.2.0
2023-04-13 23:40:49 +02:00
Roy Buitenhuis
46b437dea0
Wait for waker when no data is available on UDP socket.
2023-03-15 13:56:40 +01:00
Leon Camus
e484cb1b87
refactor: Multicast method modifiers on stack to public
...
revert: udp.rs
2023-03-08 12:37:00 +01:00
Leon Camus
993875e11f
fix: Add qualified imports
2023-03-07 23:52:25 +01:00
Leon Camus
2087561003
lint: Remove unused imports
2023-03-07 23:51:10 +01:00
Leon Camus
b62e3e1d47
lint: Cargo fmt
2023-03-07 23:40:31 +01:00
Leon Camus
c22218c72e
feat: Add multicast to udp socket
2023-03-06 18:43:37 +01:00
kbleeke
d5f88e578c
embassy-net: DNS resolver detects when name is just an IP address and returns immediately
2023-02-25 21:52:15 +01:00
kbleeke
035de6f3ff
embassy-net: add flush to TcpSocket and TcpWriter as an inherent method
2023-02-22 14:45:17 +01:00
kbleeke
f1a4db44c4
Implement flush for TcpSocket
2023-02-22 13:57:40 +01:00
Dario Nieuwenhuis
41a563aae3
net: document all features
2023-02-13 03:11:16 +01:00
Ulf Lilleengen
a2b8921ff3
fix: cfg guard for ipv6
2023-02-10 19:38:17 +01:00
Ulf Lilleengen
128a453163
remove unneeded features
2023-02-10 19:04:54 +01:00
Ulf Lilleengen
a7d3ef9122
scope dns operations within a cfged block
2023-02-10 19:00:00 +01:00
Ulf Lilleengen
32c3725631
add waker for DNS slots
2023-02-10 18:44:51 +01:00
Ulf Lilleengen
48dff04d64
Bump max queries
2023-02-10 18:34:21 +01:00
Ulf Lilleengen
472473d8c1
Create slice using ::Owned
2023-02-10 18:32:35 +01:00
Ulf Lilleengen
6e68353a93
attempt removing option
2023-02-10 18:30:17 +01:00
Ulf Lilleengen
7ae47cb1d8
Expose api on Stack and add doc
...
Make it work with smoltcp 0.9
2023-02-10 18:20:50 +01:00
Ulf Lilleengen
cd440a49d6
Rewrite to use a single socket
2023-02-10 17:46:08 +01:00
Ulf Lilleengen
614740a1b2
cargo fmt
2023-02-10 17:45:25 +01:00
Ulf Lilleengen
c203cefe01
Handle cancellation
2023-02-10 17:45:19 +01:00
Ulf Lilleengen
9cfea693ed
Add DNS socket to embassy-net
2023-02-10 17:45:03 +01:00
Dario Nieuwenhuis
5edb3052e6
net: reexport driver crate.
2023-02-08 17:52:02 +01:00
Dario Nieuwenhuis
102b2e52cb
net: use released smoltcp 0.9.0
2023-02-07 18:15:26 +01:00
Ulf Lilleengen
768fe699cf
Pass the correct buffer when creating TcpSocket
2023-01-31 19:36:41 +01:00
Ulf Lilleengen
2a0ea52878
add missing copy of icmpv6 checksum
...
add proto-ipv6 feature to stm32h7 example to catch issues in CI
2023-01-24 10:25:37 +01:00
Davide Della Giustina
f38d54a6a6
IPv6 has no checksum
2023-01-24 08:15:22 +00:00
Dario Nieuwenhuis
78c2c1709b
net: update smoltcp.
2023-01-19 14:44:01 +01:00
Dario Nieuwenhuis
570ffab670
net: poll returning false is not an error. No need to repoll.
2023-01-19 14:44:01 +01:00
Paweł Jan Czochański
8f4fae9b36
Add smoltcp dhcp socket configuration
2023-01-19 14:44:01 +01:00
Paweł Jan Czochański
2eae12b7f1
Update smoltcp to the newest master
2023-01-19 14:44:01 +01:00
Dario Nieuwenhuis
4a4b593694
net; allow changing MAC addr at runtime.
2022-12-27 01:04:55 +01:00
Dario Nieuwenhuis
1f033d509a
net: split driver trait to a separate crate.
2022-12-26 04:49:08 +01:00
Dario Nieuwenhuis
5655c6093f
net: use atomic-polyfill on tcp client pool, for thumbv6m support.
2022-12-26 03:34:05 +01:00
Dario Nieuwenhuis
72bb9b53a2
net: remove unused pool-x features
2022-12-26 03:34:05 +01:00
Dario Nieuwenhuis
10c9cc31b1
Remove unnecessary use of atomic-polyfill.
...
Only use it when CAS is actually needed.
2022-12-23 20:46:49 +01:00
Dario Nieuwenhuis
aaaf5f23a8
net: move stack into lib.rs
2022-12-13 16:18:39 +01:00
Dario Nieuwenhuis
ac74613b5a
net: remove packet pool.
...
The pool was prone to deadlocks, especially due to having a single pool
for rx+tx. If the pool got full with rx'd packets it would deadlock because
processing a rx packet requires doing another allocation on the pool, for
the possibly tx'd response, before deallocating the rx'd packet.
This also allows Device impls to allocate the packet memory in a particular
RAM kind, if needed for example to do DMA.
The `Device` trait is now token-based, like smoltcp's. In the end, this
is better because it allows callers to manage memory however they want (including
with a pool if they want to).
2022-12-13 16:18:39 +01:00
Aaron Tsui
95fdc7c552
fix net README.md
2022-12-13 14:06:37 +08:00
Dario Nieuwenhuis
f7fe0c1441
net: update smoltcp
2022-12-07 00:28:38 +01:00
Dario Nieuwenhuis
02abe00439
net: don't use UnsafeCell.
...
The "must not be called reentrantly" invariant is too "global" to
maintain comfortably, and the cost of the RefCell is negligible,
so this was a case of premature optimization.
2022-12-03 00:56:16 +01:00
Dario Nieuwenhuis
3135ad016d
Bump embedded-nal-async to 0.3.0
2022-11-29 12:05:46 +01:00
Dario Nieuwenhuis
1e2fb0459d
Switch to async-fn-in-trait
2022-11-25 21:02:06 +01:00
Dario Nieuwenhuis
eeb072d9cb
Update Rust nightly.
2022-10-26 16:47:29 +02:00
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
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
Dario Nieuwenhuis
5327b9c289
time: add more tick rates, use 1mhz as default.
2022-09-02 00:59:34 +02:00
Dario Nieuwenhuis
464ae67108
net: feature-gate nightly-only async traits to allow building on stable.
2022-08-30 19:43:32 +02:00
Dario Nieuwenhuis
21072bee48
split embassy-util
into embassy-futures
, embassy-sync
.
2022-08-22 22:18:13 +02:00
Dario Nieuwenhuis
ce407474a7
net: update atomic-pool, atomic-polyfill.
2022-08-18 14:45:07 +02:00
Dario Nieuwenhuis
5daa173ce4
Split embassy-time from embassy-executor.
2022-08-18 01:22:30 +02:00
Dario Nieuwenhuis
68931a36d5
More docserver metadata fix.
2022-08-15 20:42:36 +02:00
bors[bot]
6ffca81a38
Merge #880
...
880: Add UDP socket support r=Dirbaio a=arturkow2000
Co-authored-by: Artur Kowalski <artur.kowalski@3mdeb.com>
Co-authored-by: Artur Kowalski <arturkow2000@gmail.com>
2022-08-11 14:17:11 +00:00
Artur Kowalski
ef473827a2
Remove UdpIo struct
...
UdpIo was shared by split sender/receives halves. Since split() API is
no more UdpIo is not needed and its APIs may be moved into UdpSocket.
2022-08-11 15:52:32 +02:00
Dario Nieuwenhuis
0a98f9f48e
net: make TcpIo private.
...
It's just an implementation detail to share code between Socket, Reader, Writer. It wasn't supposed to be public.
2022-08-11 13:58:13 +02:00
Artur Kowalski
b97983242d
Simplify UDP code
...
Drop unneeded APIs: remove impls of embedded_io error traits, remove
flush() and split() methods.
2022-08-11 08:23:18 +02:00
Artur Kowalski
d5ab0d3ebb
Add UDP socket support
2022-08-10 19:40:35 +02:00
Ulf Lilleengen
87401c49b7
Fix formatting
2022-08-09 14:51:32 +02:00
Ulf Lilleengen
80c1551153
Wrap buffers in a single state type
2022-08-09 14:43:55 +02:00
Ulf Lilleengen
18671b94ba
Implement embedded-nal-async traits for embassy-net
2022-08-08 16:51:34 +02:00
Dario Nieuwenhuis
a0f1b0ee01
Split embassy crate into embassy-executor, embassy-util.
2022-07-29 23:40:36 +02:00
Dario Nieuwenhuis
948bb93dc2
docs: Add $COMMIT to git srclinks.
2022-06-26 23:55:38 +02:00
Dario Nieuwenhuis
1f746e0939
Remove the authors field from Cargo.tomls
...
It currently contains whoever was first to write some code for the crate,
even if many more people have contributed to it later.
The field is "sort of" deprecated, it was made optional recently:
https://rust-lang.github.io/rfcs/3052-optional-authors-field.html
Due the the reasons listed there I believe removing it is better than
setting it to generic fluff like "The Embassy contributors".
2022-06-18 02:16:40 +02:00
Dario Nieuwenhuis
88e36a70bd
Update to 2021 edition. ( #820 )
2022-06-18 02:15:48 +02:00
Dario Nieuwenhuis
a8703b7598
Run rustfmt.
2022-06-12 22:22:31 +02:00
Ulf Lilleengen
8b676e65ad
Add embedded-io implementation of ConnectError
2022-06-01 13:48:28 +02:00
Ulf Lilleengen
39cffdd123
Add reexport for ipv6 types with proto-ipv6
2022-06-01 13:48:09 +02:00
Dario Nieuwenhuis
a5aea995a8
WIP embassy-net v2
2022-05-25 19:56:22 +02:00
Dario Nieuwenhuis
e3b8e35498
Make embassy-net nightly-only.
...
It's useless without async traits, so juggling the `nightly` feature
around is not worth the pain.
2022-05-19 06:15:01 +02:00
Dario Nieuwenhuis
0b2f43c391
net: add split() to tcpsocket
2022-05-19 06:14:05 +02:00
Dario Nieuwenhuis
47ceee47d5
Update embedded-io to 0.3
2022-05-19 00:36:18 +02:00
Dario Nieuwenhuis
931a137f8c
Replace embassy::io with embedded_io.
2022-05-07 01:45:54 +02:00
Dario Nieuwenhuis
a5f5c3a844
net: add functions to get current Eth and IP config
2022-05-02 16:19:34 +02:00
Matous Hybl
3a3ed27c30
net: Add support for packet pools with size 64 and 128
2022-04-27 21:27:28 +02:00
Dario Nieuwenhuis
50e1d257bd
net: change listen() to accept(), which waits until the connection is established.
2022-04-24 04:35:29 +02:00
Dario Nieuwenhuis
e5a843dc06
net: auto-enable defmt in smoltcp using namespaced features.
2022-04-13 17:46:27 +02:00
Dario Nieuwenhuis
0d3758ad6b
net: make run() noreturn.
2022-04-13 17:27:20 +02:00
Dario Nieuwenhuis
aee19185b7
Add more docserver metadata.
2022-04-05 21:05:09 +02:00
Matous Hybl
e95b96f3a4
Use smoltcp 0.8.0 from crates.io.
2021-12-12 15:32:36 +01:00
huntc
5d502ec0af
Fix missing flush for tcp
2021-12-10 14:38:28 +11:00
Matous Hybl
d6f3b479df
Use smoltcp revision from its master branch.
2021-12-09 12:15:32 +01:00
Matous Hybl
a802fd83aa
Fix embassy-net documentation of running examples.
2021-12-06 14:59:15 +01:00
Dario Nieuwenhuis
524eed5db5
Update smoltcp, fix build issues with no ethernet.
2021-11-26 21:09:44 +01:00
Dario Nieuwenhuis
c257893da9
net: update smoltcp
2021-11-26 04:12:14 +01:00
Bob McWhirter
c2da498263
Update to defmt 3.0ish.
...
Lots of gitrevs deps.
2021-11-15 11:09:08 -05:00
bors[bot]
5322e293bd
Merge #461
...
461: nrf: add initial nrf5340 support r=Dirbaio a=Dirbaio
Thanks to `@diondokter's` work on DPPI this was quite easy! :)
TODO:
- [ ] Add config option to enable 128mhz
- [ ] Add config option to unlock APPROTECT automatically.
- [ ] Add a way to boot net (config option or API?)
- [ ] Support WDT (there's WDT0, WDT1. Needs some refactor)
- [ ] Support NVMC
- [ ] Support TEMP
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2021-11-07 22:58:27 +00:00
Matous Hybl
d742d0252e
Add TCP listen.
2021-11-04 13:34:13 +01:00
Dario Nieuwenhuis
663141b4e4
nrf: add initial nrf5340 support
2021-10-28 03:36:25 +02:00
Dario Nieuwenhuis
a2e7c24e00
Clippy fixes
2021-10-18 01:05:29 +02:00
Dario Nieuwenhuis
ead987245d
embassy: Refactor module structure to remove kitchen-sink util
.
2021-09-11 02:35:35 +02:00
Dario Nieuwenhuis
f2623e7e9b
Update lots of deps
2021-09-11 01:35:23 +02:00
Dario Nieuwenhuis
de2039fd1d
net: fix build with medium-ip
2021-08-20 15:06:06 +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
Dario Nieuwenhuis
d94feb9fcd
net/tcp: Fix panic when consuming 0 bytes at EOF
2021-06-18 01:58:14 +02:00
Thales Fragoso
3396a51938
net: Add features for pool size and remove unwrap on smoltcp device
2021-06-16 16:48:35 +02:00
Thales Fragoso
46e1bae9e3
eth-v2: Start Ethernet peripheral implementation
2021-06-16 16:48:35 +02:00
Dario Nieuwenhuis
890e93f367
UPdate smoltcp
2021-06-12 00:50:36 +02:00
Dario Nieuwenhuis
3be49d3e79
fmt: Add dunmy use to avoid "unused variable" errors when no log is enabled.
2021-06-07 03:21:37 +02:00
Dario Nieuwenhuis
ef1ebefec0
fmt: use absolute paths
2021-06-07 03:15:05 +02:00
Dario Nieuwenhuis
e7dc5c0939
fmt: make all macros macro_rules
so scoping is consistent.
2021-06-07 00:16:39 +02:00
Dario Nieuwenhuis
7d869bdec8
Update heapless
2021-06-04 01:35:04 +02:00
Dario Nieuwenhuis
f55a303814
net: fix build
2021-05-28 23:10:15 +02:00
Dario Nieuwenhuis
4ebc113852
Merge remote-tracking branch 'embassy-net/main'
2021-05-28 23:07:27 +02:00
Dario Nieuwenhuis
b4c11695cf
Update smoltcp
2021-05-28 22:34:07 +02:00