Rename StaticConfig to StaticConfigV4
This commit is contained in:
@ -120,7 +120,7 @@ async fn listen_task(stack: &'static Stack<Device<'static>>, id: u8, port: u16)
|
||||
}
|
||||
}
|
||||
|
||||
async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfig {
|
||||
async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfigV4 {
|
||||
loop {
|
||||
if let Some(config) = stack.config() {
|
||||
return config.clone();
|
||||
|
@ -108,7 +108,7 @@ async fn main(spawner: Spawner) {
|
||||
}
|
||||
}
|
||||
|
||||
async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfig {
|
||||
async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfigV4 {
|
||||
loop {
|
||||
if let Some(config) = stack.config() {
|
||||
return config.clone();
|
||||
|
@ -116,7 +116,7 @@ async fn main(spawner: Spawner) {
|
||||
}
|
||||
}
|
||||
|
||||
async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfig {
|
||||
async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfigV4 {
|
||||
loop {
|
||||
if let Some(config) = stack.config() {
|
||||
return config.clone();
|
||||
|
@ -95,7 +95,7 @@ async fn main(spawner: Spawner) {
|
||||
}
|
||||
}
|
||||
|
||||
async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfig {
|
||||
async fn wait_for_config(stack: &'static Stack<Device<'static>>) -> embassy_net::StaticConfigV4 {
|
||||
loop {
|
||||
if let Some(config) = stack.config() {
|
||||
return config.clone();
|
||||
|
@ -87,7 +87,7 @@ async fn main(spawner: Spawner) {
|
||||
unwrap!(spawner.spawn(usb_ncm_task(runner)));
|
||||
|
||||
let config = embassy_net::Config::Dhcp(Default::default());
|
||||
//let config = embassy_net::Config::Static(embassy_net::StaticConfig {
|
||||
//let config = embassy_net::Config::StaticV4(embassy_net::StaticConfigV4 {
|
||||
// address: Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24),
|
||||
// dns_servers: Vec::new(),
|
||||
// gateway: Some(Ipv4Address::new(10, 42, 0, 1)),
|
||||
|
@ -62,7 +62,7 @@ async fn main(spawner: Spawner) {
|
||||
.await;
|
||||
|
||||
// Use a link-local address for communication without DHCP server
|
||||
let config = Config::Static(embassy_net::StaticConfig {
|
||||
let config = Config::StaticV4(embassy_net::StaticConfigV4 {
|
||||
address: embassy_net::Ipv4Cidr::new(embassy_net::Ipv4Address::new(169, 254, 1, 1), 16),
|
||||
dns_servers: heapless::Vec::new(),
|
||||
gateway: None,
|
||||
|
@ -62,7 +62,7 @@ async fn main(spawner: Spawner) {
|
||||
.await;
|
||||
|
||||
let config = Config::Dhcp(Default::default());
|
||||
//let config = embassy_net::Config::Static(embassy_net::Config {
|
||||
//let config = embassy_net::Config::StaticV4(embassy_net::Config {
|
||||
// address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24),
|
||||
// dns_servers: Vec::new(),
|
||||
// gateway: Some(Ipv4Address::new(192, 168, 69, 1)),
|
||||
|
Reference in New Issue
Block a user