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