@@ -18,8 +18,10 @@ use embassy_executor::{SendSpawner, Spawner};
18
18
use embassy_sync:: { blocking_mutex:: raw:: CriticalSectionRawMutex , channel:: Channel } ;
19
19
use log:: info;
20
20
use static_cell:: StaticCell ;
21
- use zephyr:: { kconfig:: CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC , kobj_define, printkln, raw:: k_cycle_get_64} ;
22
21
use zephyr:: raw;
22
+ use zephyr:: {
23
+ kconfig:: CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC , kobj_define, printkln, raw:: k_cycle_get_64,
24
+ } ;
23
25
24
26
/// Maximum number of threads to spawn. As this is async, these do not each need a stack.
25
27
const NUM_THREADS : usize = 6 ;
@@ -29,7 +31,7 @@ const THREAD_STACK_SIZE: usize = 2048;
29
31
static EXECUTOR_LOW : StaticCell < Executor > = StaticCell :: new ( ) ;
30
32
static EXECUTOR_MAIN : StaticCell < Executor > = StaticCell :: new ( ) ;
31
33
32
- static LOW_SPAWNER : Channel < CriticalSectionRawMutex , SendSpawner , 1 > = Channel :: new ( ) ;
34
+ static LOW_SPAWNER : Channel < CriticalSectionRawMutex , SendSpawner , 1 > = Channel :: new ( ) ;
33
35
34
36
// The main thread priority.
35
37
const MAIN_PRIO : c_int = 2 ;
@@ -55,7 +57,10 @@ extern "C" fn rust_main() {
55
57
low_executor ( ) ;
56
58
} ) ;
57
59
58
- info ! ( "Starting Embassy executor on {}" , zephyr:: kconfig:: CONFIG_BOARD ) ;
60
+ info ! (
61
+ "Starting Embassy executor on {}" ,
62
+ zephyr:: kconfig:: CONFIG_BOARD
63
+ ) ;
59
64
60
65
let executor = EXECUTOR_MAIN . init ( Executor :: new ( ) ) ;
61
66
executor. run ( |spawner| {
@@ -81,7 +86,9 @@ async fn main(spawner: Spawner) {
81
86
82
87
tester. run ( spawner, low_spawner, Command :: Empty ) . await ;
83
88
tester. run ( spawner, low_spawner, Command :: Empty ) . await ;
84
- tester. run ( spawner, low_spawner, Command :: PingPong ( 10_000 ) ) . await ;
89
+ tester
90
+ . run ( spawner, low_spawner, Command :: PingPong ( 10_000 ) )
91
+ . await ;
85
92
}
86
93
87
94
/// Async task tests.
0 commit comments