File tree Expand file tree Collapse file tree 3 files changed +0
-54
lines changed Expand file tree Collapse file tree 3 files changed +0
-54
lines changed Original file line number Diff line number Diff line change @@ -207,8 +207,6 @@ fn main() -> ! {
207
207
screen_on : true ,
208
208
} ;
209
209
210
- let mut said_hello = false ;
211
-
212
210
let timer = Timer :: new ( pac. TIMER , & mut pac. RESETS ) ;
213
211
let mut prev_timer = timer. get_counter ( ) . ticks ( ) ;
214
212
@@ -223,22 +221,6 @@ fn main() -> ! {
223
221
prev_timer = timer. get_counter ( ) . ticks ( ) ;
224
222
}
225
223
226
- // A welcome message at the beginning
227
- if !said_hello && timer. get_counter ( ) . ticks ( ) >= 2_000_000 {
228
- said_hello = true ;
229
- let _ = serial. write ( b"Hello, World!\r \n " ) ;
230
-
231
- let time = timer. get_counter ( ) ;
232
- let mut text: String < 64 > = String :: new ( ) ;
233
- write ! ( & mut text, "Current timer ticks: {}\r \n " , time) . unwrap ( ) ;
234
-
235
- // This only works reliably because the number of bytes written to
236
- // the serial port is smaller than the buffers available to the USB
237
- // peripheral. In general, the return value should be handled, so that
238
- // bytes not transferred yet don't get lost.
239
- let _ = serial. write ( text. as_bytes ( ) ) ;
240
- }
241
-
242
224
// Check for new data
243
225
if usb_dev. poll ( & mut [ & mut serial] ) {
244
226
let mut buf = [ 0u8 ; 64 ] ;
Original file line number Diff line number Diff line change @@ -125,8 +125,6 @@ fn main() -> ! {
125
125
brightness : 10 ,
126
126
} ;
127
127
128
- let mut said_hello = false ;
129
-
130
128
let timer = Timer :: new ( pac. TIMER , & mut pac. RESETS ) ;
131
129
let mut prev_timer = timer. get_counter ( ) . ticks ( ) ;
132
130
@@ -157,22 +155,6 @@ fn main() -> ! {
157
155
prev_timer = timer. get_counter ( ) . ticks ( ) ;
158
156
}
159
157
160
- // A welcome message at the beginning
161
- if !said_hello && timer. get_counter ( ) . ticks ( ) >= 2_000_000 {
162
- said_hello = true ;
163
- let _ = serial. write ( b"Hello, World!\r \n " ) ;
164
-
165
- let time = timer. get_counter ( ) ;
166
- let mut text: String < 64 > = String :: new ( ) ;
167
- write ! ( & mut text, "Current timer ticks: {}\r \n " , time) . unwrap ( ) ;
168
-
169
- // This only works reliably because the number of bytes written to
170
- // the serial port is smaller than the buffers available to the USB
171
- // peripheral. In general, the return value should be handled, so that
172
- // bytes not transferred yet don't get lost.
173
- let _ = serial. write ( text. as_bytes ( ) ) ;
174
- }
175
-
176
158
// Check for new data
177
159
if usb_dev. poll ( & mut [ & mut serial] ) {
178
160
let mut buf = [ 0u8 ; 64 ] ;
Original file line number Diff line number Diff line change @@ -207,8 +207,6 @@ fn main() -> ! {
207
207
. set_scaling ( state. brightness )
208
208
. expect ( "failed to set scaling" ) ;
209
209
210
- let mut said_hello = false ;
211
-
212
210
fill_grid_pixels ( & state. grid , & mut matrix) ;
213
211
214
212
let timer = Timer :: new ( pac. TIMER , & mut pac. RESETS ) ;
@@ -243,22 +241,6 @@ fn main() -> ! {
243
241
prev_timer = timer. get_counter ( ) . ticks ( ) ;
244
242
}
245
243
246
- // A welcome message at the beginning
247
- if !said_hello && timer. get_counter ( ) . ticks ( ) >= 2_000_000 {
248
- said_hello = true ;
249
- let _ = serial. write ( b"Hello, World!\r \n " ) ;
250
-
251
- let time = timer. get_counter ( ) ;
252
- let mut text: String < 64 > = String :: new ( ) ;
253
- write ! ( & mut text, "Current timer ticks: {}\r \n " , time) . unwrap ( ) ;
254
-
255
- // This only works reliably because the number of bytes written to
256
- // the serial port is smaller than the buffers available to the USB
257
- // peripheral. In general, the return value should be handled, so that
258
- // bytes not transferred yet don't get lost.
259
- let _ = serial. write ( text. as_bytes ( ) ) ;
260
- }
261
-
262
244
// Check for new data
263
245
if usb_dev. poll ( & mut [ & mut serial] ) {
264
246
let mut buf = [ 0u8 ; 64 ] ;
You can’t perform that action at this time.
0 commit comments