@@ -64,7 +64,7 @@ void calibrate() {
64
64
uint32_t t = micros ();
65
65
burnCPU (1000 );
66
66
t = micros () - t;
67
- cal = (TICK_USEC* 1000 * cal)/ t;
67
+ cal = (TICK_USEC * 1000 * cal) / t;
68
68
}
69
69
// ------------------------------------------------------------------------------
70
70
// print helpers
@@ -84,7 +84,7 @@ void done(const char* msg, task_t* task, TickType_t now) {
84
84
Serial.println (now);
85
85
Serial.print (" Task: " );
86
86
printTask (task);
87
- while (1 );
87
+ while (1 );
88
88
}
89
89
// ------------------------------------------------------------------------------
90
90
// start tasks at 1000 ticks
@@ -122,7 +122,7 @@ void setup() {
122
122
portBASE_TYPE s; // task create status
123
123
124
124
Serial.begin (9600 );
125
- while (!Serial) {}
125
+ while (!Serial) {}
126
126
Serial.println (" Rate Monotonic Scheduling Examples." );
127
127
Serial.println (" Cases 1 and 3 should fail" );
128
128
Serial.println (" Cases 2 and 4 should succeed" );
@@ -151,29 +151,29 @@ void setup() {
151
151
152
152
uint32_t t = micros ();
153
153
burnCPU (1000 );
154
- Serial.println (micros () -t);
154
+ Serial.println (micros () - t);
155
155
Serial.println (" Starting tasks - period and CPU in ticks" );
156
156
Serial.println (" Period,CPU,Priority" );
157
157
for (int i = 0 ; i < n; i++) {
158
158
printTask (&tasks[i]);
159
- cpuUse += tasks[i].cpu / (float )tasks[i].period ;
159
+ cpuUse += tasks[i].cpu / (float )tasks[i].period ;
160
160
161
161
s = xTaskCreate (task, NULL , 200 , (void *)&tasks[i], tasks[i].priority , NULL );
162
162
if (s != pdPASS) {
163
163
printf (" task create failed\n " );
164
- while (1 );
164
+ while (1 );
165
165
}
166
166
}
167
167
printf (" CPU use %%: %f\r\n " , cpuUse * 100 );
168
168
printf (" Liu and Layland bound %%: %f\r\n " , LiuLayland[n - 1 ]);
169
169
// start tasks
170
170
vTaskStartScheduler ();
171
171
Serial.println (" Scheduler failed" );
172
- while (1 );
172
+ while (1 );
173
173
}
174
174
// ------------------------------------------------------------------------------
175
175
// WARNING idle loop has a very small stack (configMINIMAL_STACK_SIZE)
176
176
// loop must never block
177
177
void loop () {
178
178
// not used
179
- }
179
+ }
0 commit comments