forked from ariel-os/ariel-os
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "coap" | ||
version = "0.1.0" | ||
authors = [ "Christian Amsüss <[email protected]>" ] | ||
edition.workspace = true | ||
publish = false | ||
|
||
[dependencies] | ||
embassy-executor = { workspace = true, default-features = false } | ||
embassy-net = { workspace = true, features = ["udp"] } | ||
embassy-time = { workspace = true, default-features = false } | ||
embedded-io-async = "0.6.1" | ||
heapless = { workspace = true } | ||
riot-rs = { path = "../../src/riot-rs", features = ["override-network-config"] } | ||
riot-rs-boards = { path = "../../src/riot-rs-boards" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# coap demo | ||
|
||
## About | ||
|
||
This application is a work in progress demo of running CoAP on RIOT-rs. | ||
|
||
## Roadmap | ||
|
||
Eventually, this should be 20 line demo. | ||
|
||
Until the CoAP roadmap is complete, | ||
this serves as a work bench, test bed, demo zone and playground at the same time. | ||
This application will grow as parts of the roadmap are added, | ||
and shrink as they become default or are wrapped into components of RIOT-rs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apps: | ||
- name: coap | ||
selects: | ||
- ?release | ||
- network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#![no_main] | ||
#![no_std] | ||
#![feature(type_alias_impl_trait)] | ||
#![feature(used_with_arg)] | ||
|
||
use riot_rs::{debug::println, embassy::network}; | ||
|
||
#[riot_rs::task(autostart)] | ||
async fn udp_echo() { | ||
let stack = network::network_stack().await.unwrap(); | ||
|
||
println!("Starting up CoAP server"); | ||
|
||
todo!("Work with {stack:p}"); | ||
} | ||
|
||
// FIXME: So far, this is necessary boiler plate; see ../README.md#networking for details | ||
#[riot_rs::config(network)] | ||
fn network_config() -> embassy_net::Config { | ||
use embassy_net::Ipv4Address; | ||
|
||
embassy_net::Config::ipv4_static(embassy_net::StaticConfigV4 { | ||
address: embassy_net::Ipv4Cidr::new(Ipv4Address::new(10, 42, 0, 61), 24), | ||
dns_servers: heapless::Vec::new(), | ||
gateway: Some(Ipv4Address::new(10, 42, 0, 1)), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ defaults: | |
subdirs: | ||
- benchmark | ||
- core-sizes | ||
- coap | ||
- embassy | ||
- embassy-http-server | ||
- embassy-net-tcp | ||
|