diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-07-09 01:49:31 +0200 |
|---|---|---|
| committer | diondokter <[email protected]> | 2025-08-29 13:23:21 +0200 |
| commit | 8aec341f28a00012e1771d5c35d2647e11830755 (patch) | |
| tree | 28ec3bad05e5dcb6ec949493688111839bb6865b /examples/nrf9160 | |
| parent | 34ff67cdbf25e278ff99bd4a05b6b8c6a30fa5d1 (diff) | |
executor: return error when creating the spawntoken, not when spawning.
Diffstat (limited to 'examples/nrf9160')
| -rw-r--r-- | examples/nrf9160/src/bin/modem_tcp_client.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/nrf9160/src/bin/modem_tcp_client.rs b/examples/nrf9160/src/bin/modem_tcp_client.rs index a36b14626..7d4815699 100644 --- a/examples/nrf9160/src/bin/modem_tcp_client.rs +++ b/examples/nrf9160/src/bin/modem_tcp_client.rs | |||
| @@ -112,7 +112,7 @@ async fn main(spawner: Spawner) { | |||
| 112 | 112 | ||
| 113 | info!("Hello World!"); | 113 | info!("Hello World!"); |
| 114 | 114 | ||
| 115 | unwrap!(spawner.spawn(blink_task(p.P0_02.into()))); | 115 | spawner.spawn(unwrap!(blink_task(p.P0_02.into()))); |
| 116 | 116 | ||
| 117 | let ipc_mem = unsafe { | 117 | let ipc_mem = unsafe { |
| 118 | let ipc_start = &__start_ipc as *const u8 as *mut MaybeUninit<u8>; | 118 | let ipc_start = &__start_ipc as *const u8 as *mut MaybeUninit<u8>; |
| @@ -138,8 +138,8 @@ async fn main(spawner: Spawner) { | |||
| 138 | static TRACE: StaticCell<TraceBuffer> = StaticCell::new(); | 138 | static TRACE: StaticCell<TraceBuffer> = StaticCell::new(); |
| 139 | let (device, control, runner, tracer) = | 139 | let (device, control, runner, tracer) = |
| 140 | embassy_net_nrf91::new_with_trace(STATE.init(State::new()), ipc_mem, TRACE.init(TraceBuffer::new())).await; | 140 | embassy_net_nrf91::new_with_trace(STATE.init(State::new()), ipc_mem, TRACE.init(TraceBuffer::new())).await; |
| 141 | unwrap!(spawner.spawn(modem_task(runner))); | 141 | spawner.spawn(unwrap!(modem_task(runner))); |
| 142 | unwrap!(spawner.spawn(trace_task(uart, tracer))); | 142 | spawner.spawn(unwrap!(trace_task(uart, tracer))); |
| 143 | 143 | ||
| 144 | let config = embassy_net::Config::default(); | 144 | let config = embassy_net::Config::default(); |
| 145 | 145 | ||
| @@ -150,12 +150,12 @@ async fn main(spawner: Spawner) { | |||
| 150 | static RESOURCES: StaticCell<StackResources<2>> = StaticCell::new(); | 150 | static RESOURCES: StaticCell<StackResources<2>> = StaticCell::new(); |
| 151 | let (stack, runner) = embassy_net::new(device, config, RESOURCES.init(StackResources::<2>::new()), seed); | 151 | let (stack, runner) = embassy_net::new(device, config, RESOURCES.init(StackResources::<2>::new()), seed); |
| 152 | 152 | ||
| 153 | unwrap!(spawner.spawn(net_task(runner))); | 153 | spawner.spawn(unwrap!(net_task(runner))); |
| 154 | 154 | ||
| 155 | static CONTROL: StaticCell<context::Control<'static>> = StaticCell::new(); | 155 | static CONTROL: StaticCell<context::Control<'static>> = StaticCell::new(); |
| 156 | let control = CONTROL.init(context::Control::new(control, 0).await); | 156 | let control = CONTROL.init(context::Control::new(control, 0).await); |
| 157 | 157 | ||
| 158 | unwrap!(spawner.spawn(control_task( | 158 | spawner.spawn(unwrap!(control_task( |
| 159 | control, | 159 | control, |
| 160 | context::Config { | 160 | context::Config { |
| 161 | apn: b"iot.nat.es", | 161 | apn: b"iot.nat.es", |
