examples/stm32: reduce packet queue count to avoid OOM on smaller chips.

This commit is contained in:
Dario Nieuwenhuis 2024-05-12 23:30:53 +02:00
parent b56a0419bd
commit e2dfdcb509
4 changed files with 8 additions and 8 deletions

View File

@ -62,9 +62,9 @@ async fn main(spawner: Spawner) -> ! {
let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF];
static PACKETS: StaticCell<PacketQueue<16, 16>> = StaticCell::new();
static PACKETS: StaticCell<PacketQueue<4, 4>> = StaticCell::new();
let device = Ethernet::new(
PACKETS.init(PacketQueue::<16, 16>::new()),
PACKETS.init(PacketQueue::<4, 4>::new()),
p.ETH,
Irqs,
p.PA1,

View File

@ -63,9 +63,9 @@ async fn main(spawner: Spawner) -> ! {
let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF];
static PACKETS: StaticCell<PacketQueue<16, 16>> = StaticCell::new();
static PACKETS: StaticCell<PacketQueue<4, 4>> = StaticCell::new();
let device = Ethernet::new(
PACKETS.init(PacketQueue::<16, 16>::new()),
PACKETS.init(PacketQueue::<4, 4>::new()),
p.ETH,
Irqs,
p.PA1,

View File

@ -64,10 +64,10 @@ async fn main(spawner: Spawner) -> ! {
let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF];
static PACKETS: StaticCell<PacketQueue<16, 16>> = StaticCell::new();
static PACKETS: StaticCell<PacketQueue<4, 4>> = StaticCell::new();
let device = Ethernet::new(
PACKETS.init(PacketQueue::<16, 16>::new()),
PACKETS.init(PacketQueue::<4, 4>::new()),
p.ETH,
Irqs,
p.PA1,

View File

@ -64,10 +64,10 @@ async fn main(spawner: Spawner) -> ! {
let mac_addr = [0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF];
static PACKETS: StaticCell<PacketQueue<16, 16>> = StaticCell::new();
static PACKETS: StaticCell<PacketQueue<4, 4>> = StaticCell::new();
let device = Ethernet::new_mii(
PACKETS.init(PacketQueue::<16, 16>::new()),
PACKETS.init(PacketQueue::<4, 4>::new()),
p.ETH,
Irqs,
p.PA1,