File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
examples/basic_wio_terminal/src Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -90,19 +90,22 @@ struct Objects {
90
90
91
91
const COTTAGE : Objects = r3:: build!( System , configure_app => Objects ) ;
92
92
93
+ /// The top-level configuration function.
93
94
const fn configure_app ( b : & mut CfgBuilder < System > ) -> Objects {
94
95
b. num_task_priority_levels ( 4 ) ;
95
96
96
- // Initialize hardware
97
+ // Register a hook to initialize hardware
97
98
StartupHook :: build ( )
98
99
. start ( |_| {
99
100
init_hardware ( ) ;
100
101
} )
101
102
. finish ( b) ;
102
103
104
+ // Register a timer driver initializer
103
105
System :: configure_systick ( b) ;
104
106
105
- Task :: build ( )
107
+ // Miscellaneous tasks
108
+ let _noisy_task = Task :: build ( )
106
109
. start ( noisy_task_body)
107
110
. priority ( 0 )
108
111
. active ( true )
@@ -112,24 +115,24 @@ const fn configure_app(b: &mut CfgBuilder<System>) -> Objects {
112
115
. priority ( 2 )
113
116
. active ( true )
114
117
. finish ( b) ;
115
- Task :: build ( )
118
+ let _blink_task = Task :: build ( )
116
119
. start ( blink_task_body)
117
120
. priority ( 1 )
118
121
. active ( true )
119
122
. finish ( b) ;
120
- Task :: build ( )
121
- . start ( console_task_body)
122
- . priority ( 3 )
123
- . active ( true )
124
- . finish ( b) ;
125
- Task :: build ( )
123
+
124
+ // Graphics-related tasks and objects
125
+ let _animation_task = Task :: build ( )
126
126
. start ( animation_task_body)
127
127
. priority ( 2 )
128
128
. active ( true )
129
129
. finish ( b) ;
130
-
130
+ let _console_task = Task :: build ( )
131
+ . start ( console_task_body)
132
+ . priority ( 3 )
133
+ . active ( true )
134
+ . finish ( b) ;
131
135
let console_pipe = queue:: Queue :: new ( b) ;
132
-
133
136
let lcd_mutex = Mutex :: build ( ) . finish ( b) ;
134
137
135
138
Objects {
You can’t perform that action at this time.
0 commit comments