aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-net/Cargo.toml2
-rw-r--r--embassy-net/src/packet_pool.rs6
2 files changed, 8 insertions, 0 deletions
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml
index 90e84d828..2d0116bd5 100644
--- a/embassy-net/Cargo.toml
+++ b/embassy-net/Cargo.toml
@@ -28,6 +28,8 @@ pool-4 = []
28pool-8 = [] 28pool-8 = []
29pool-16 = [] 29pool-16 = []
30pool-32 = [] 30pool-32 = []
31pool-64 = []
32pool-128 = []
31 33
32[dependencies] 34[dependencies]
33 35
diff --git a/embassy-net/src/packet_pool.rs b/embassy-net/src/packet_pool.rs
index b43ae2eb2..99311ae74 100644
--- a/embassy-net/src/packet_pool.rs
+++ b/embassy-net/src/packet_pool.rs
@@ -17,6 +17,12 @@ pub const PACKET_POOL_SIZE: usize = 16;
17#[cfg(feature = "pool-32")] 17#[cfg(feature = "pool-32")]
18pub const PACKET_POOL_SIZE: usize = 32; 18pub const PACKET_POOL_SIZE: usize = 32;
19 19
20#[cfg(feature = "pool-64")]
21pub const PACKET_POOL_SIZE: usize = 64;
22
23#[cfg(feature = "pool-128")]
24pub const PACKET_POOL_SIZE: usize = 128;
25
20pool!(pub PacketPool: [Packet; PACKET_POOL_SIZE]); 26pool!(pub PacketPool: [Packet; PACKET_POOL_SIZE]);
21pub type PacketBox = Box<PacketPool>; 27pub type PacketBox = Box<PacketPool>;
22 28