aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32f7/src/bin
diff options
context:
space:
mode:
authorPaweł Jan Czochański <[email protected]>2023-01-18 10:10:33 +0100
committerDario Nieuwenhuis <[email protected]>2023-01-19 14:44:01 +0100
commit8f4fae9b36f017a8ab65491ef49b72499a9486dc (patch)
treed5bd2b0df691d7602507093426c3ee5a498c8c5f /examples/stm32f7/src/bin
parent2eae12b7f1cbe38d850ebf30f23a776323815af6 (diff)
Add smoltcp dhcp socket configuration
Diffstat (limited to 'examples/stm32f7/src/bin')
-rw-r--r--examples/stm32f7/src/bin/eth.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/examples/stm32f7/src/bin/eth.rs b/examples/stm32f7/src/bin/eth.rs
index 224cc202b..6f33a4f8b 100644
--- a/examples/stm32f7/src/bin/eth.rs
+++ b/examples/stm32f7/src/bin/eth.rs
@@ -69,20 +69,15 @@ async fn main(spawner: Spawner) -> ! {
69 0, 69 0,
70 ); 70 );
71 71
72 let config = embassy_net::ConfigStrategy::Dhcp; 72 let config = embassy_net::Config::Dhcp(Default::default());
73 //let config = embassy_net::ConfigStrategy::Static(embassy_net::Config { 73 //let config = embassy_net::Config::Static(embassy_net::StaticConfig {
74 // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), 74 // address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24),
75 // dns_servers: Vec::new(), 75 // dns_servers: Vec::new(),
76 // gateway: Some(Ipv4Address::new(10, 42, 0, 1)), 76 // gateway: Some(Ipv4Address::new(10, 42, 0, 1)),
77 //}); 77 //});
78 78
79 // Init network stack 79 // Init network stack
80 let stack = &*singleton!(Stack::new( 80 let stack = &*singleton!(Stack::new(device, config, singleton!(StackResources::<1>::new()), seed));
81 device,
82 config,
83 singleton!(StackResources::<1, 2, 8>::new()),
84 seed
85 ));
86 81
87 // Launch network task 82 // Launch network task
88 unwrap!(spawner.spawn(net_task(&stack))); 83 unwrap!(spawner.spawn(net_task(&stack)));