Skip to content

Commit

Permalink
Rework runner, add Proxy client and add working Control handle
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasKoch committed Jul 1, 2024
1 parent bfdc248 commit 20f243f
Show file tree
Hide file tree
Showing 21 changed files with 748 additions and 423 deletions.
2 changes: 1 addition & 1 deletion examples/rpi-pico/src/bin/embassy-perf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async fn main(spawner: Spawner) {
let net_device = runner.ppp_stack(PPP_STATE.init(embassy_net_ppp::State::new()));

// Generate random seed
let seed = 0x0123_4567_89ab_cdef; // chosen by fair dice roll. guarenteed to be random.
let seed = 0x0123_4567_89ab_cdef; // chosen by fair dice roll. guaranteed to be random.

// Init network stack
static STACK: StaticCell<Stack<embassy_net_ppp::Device<'static>>> = StaticCell::new();
Expand Down
2 changes: 1 addition & 1 deletion examples/rpi-pico/src/bin/embassy-smoltcp-ppp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async fn main(spawner: Spawner) {
let net_device = runner.ppp_stack(PPP_STATE.init(embassy_net_ppp::State::new()));

// Generate random seed
let seed = 0x0123_4567_89ab_cdef; // chosen by fair dice roll. guarenteed to be random.
let seed = 0x0123_4567_89ab_cdef; // chosen by fair dice roll. guaranteed to be random.

// Init network stack
static STACK: StaticCell<Stack<embassy_net_ppp::Device<'static>>> = StaticCell::new();
Expand Down
2 changes: 0 additions & 2 deletions src/asynch/at_udp_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ impl<'a> embedded_io_async::ErrorType for &AtUdpSocket<'a> {
impl<'a> Read for &AtUdpSocket<'a> {
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
let (len, _) = self.0.recv_from(buf).await.unwrap();
debug!("READ {} bytes: {=[u8]:a}", len, &buf[..len]);
Ok(len)
}
}
Expand All @@ -40,7 +39,6 @@ impl<'a> embedded_io_async::ErrorType for AtUdpSocket<'a> {
impl<'a> Read for AtUdpSocket<'a> {
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
let (len, _) = self.0.recv_from(buf).await.unwrap();
debug!("READ {} bytes: {=[u8]:a}", len, &buf[..len]);
Ok(len)
}
}
Expand Down
Loading

0 comments on commit 20f243f

Please sign in to comment.