eth-v2: Start Ethernet peripheral implementation
This commit is contained in:
committed by
Dario Nieuwenhuis
parent
6386c34079
commit
46e1bae9e3
@ -13,7 +13,7 @@ pub use config::DhcpConfigurator;
|
||||
pub use config::{Config, Configurator, Event as ConfigEvent, StaticConfigurator};
|
||||
|
||||
pub use device::{Device, LinkState};
|
||||
pub use packet_pool::{Packet, PacketBox, PacketBoxExt, PacketBuf};
|
||||
pub use packet_pool::{Packet, PacketBox, PacketBoxExt, PacketBuf, MTU};
|
||||
pub use stack::{init, is_config_up, is_init, is_link_up, run};
|
||||
|
||||
#[cfg(feature = "tcp")]
|
||||
|
@ -3,12 +3,13 @@ use core::ops::{Deref, DerefMut, Range};
|
||||
|
||||
use atomic_pool::{pool, Box};
|
||||
|
||||
pub const MTU: usize = 1514;
|
||||
pub const MTU: usize = 1516;
|
||||
pub const PACKET_POOL_SIZE: usize = 4;
|
||||
|
||||
pool!(pub PacketPool: [Packet; PACKET_POOL_SIZE]);
|
||||
pub type PacketBox = Box<PacketPool>;
|
||||
|
||||
#[repr(align(4))]
|
||||
pub struct Packet(pub [u8; MTU]);
|
||||
|
||||
impl Packet {
|
||||
|
Reference in New Issue
Block a user