@@ -218,17 +218,7 @@ fn main() -> ! {
218
218
& clocks. peripheral_clock ,
219
219
) ;
220
220
221
- // Detect whether the dip1 pin is connected
222
- // We switched from bootsel button to DIP-switch with general purpose DIP1 pin in DVT2
223
- let mut dip1_present = false ;
224
221
let dip1 = pins. dip1 . into_pull_up_input ( ) ;
225
- if dip1. is_low ( ) . unwrap ( ) {
226
- dip1_present = true ;
227
- }
228
- let dip1 = dip1. into_pull_down_input ( ) ;
229
- if dip1. is_high ( ) . unwrap ( ) {
230
- dip1_present = true ;
231
- }
232
222
233
223
let mut state = LedmatrixState {
234
224
grid : percentage ( 0 ) ,
@@ -241,9 +231,7 @@ fn main() -> ! {
241
231
pwm_freq : PwmFreqArg :: P29k ,
242
232
debug_mode : false ,
243
233
} ;
244
- if dip1_present {
245
- state. debug_mode = dip1. is_high ( ) . unwrap ( ) ;
246
- }
234
+ state. debug_mode = dip1. is_low ( ) . unwrap ( ) ;
247
235
if !show_startup_animation ( & state) {
248
236
// If no startup animation, render another pattern
249
237
// Lighting up every second column is a good pattern to test for noise.
@@ -294,9 +282,7 @@ fn main() -> ! {
294
282
loop {
295
283
last_sleep_reason = sleep_reason;
296
284
297
- if dip1_present {
298
- state. debug_mode = dip1. is_high ( ) . unwrap ( ) ;
299
- }
285
+ state. debug_mode = dip1. is_low ( ) . unwrap ( ) ;
300
286
if sleep_present {
301
287
// Go to sleep if the host is sleeping
302
288
let host_sleeping = sleep. is_low ( ) . unwrap ( ) ;
0 commit comments