Skip to content

Commit 458d705

Browse files
bors[bot]hargoniX
andauthored
Merge #62
62: Fix the default LED matrix levels for micro:bit v1 r=therealprof a=hargoniX The micro:bit v1 Board constructor turns all LEDs on the board on per default at the moment, we don't want that. Tested on a micro:bit v1.5. Co-authored-by: Henrik Böving <[email protected]>
2 parents 5f3e276 + dd95a60 commit 458d705

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2020
- Add a simple speaker demo for micro:bit V2.
2121
- Add Board struct following the pattern used in other nrf board support crates.
2222
- Add magnetometer example.
23+
- LEDs on the micro:bit V1 are now turned off per default
2324

2425
## [0.10.1] - 2021-05-25
2526

microbit-common/src/display/blocking.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ impl Display {
7777
rows,
7878
cols,
7979
};
80-
// This is needed to reduce flickering on reset
81-
retval.clear();
8280
retval
8381
}
8482

microbit-common/src/v1/board.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,18 @@ impl Board {
119119
p0_29: p0parts.p0_29,
120120
},
121121
display_pins: DisplayPins {
122-
row1: p0parts.p0_13.into_push_pull_output(Level::High),
123-
row2: p0parts.p0_14.into_push_pull_output(Level::High),
124-
row3: p0parts.p0_15.into_push_pull_output(Level::High),
125-
col1: p0parts.p0_04.into_push_pull_output(Level::Low),
126-
col2: p0parts.p0_05.into_push_pull_output(Level::Low),
127-
col3: p0parts.p0_06.into_push_pull_output(Level::Low),
128-
col4: p0parts.p0_07.into_push_pull_output(Level::Low),
129-
col5: p0parts.p0_08.into_push_pull_output(Level::Low),
130-
col6: p0parts.p0_09.into_push_pull_output(Level::Low),
131-
col7: p0parts.p0_10.into_push_pull_output(Level::Low),
132-
col8: p0parts.p0_11.into_push_pull_output(Level::Low),
133-
col9: p0parts.p0_12.into_push_pull_output(Level::Low),
122+
row1: p0parts.p0_13.into_push_pull_output(Level::Low),
123+
row2: p0parts.p0_14.into_push_pull_output(Level::Low),
124+
row3: p0parts.p0_15.into_push_pull_output(Level::Low),
125+
col1: p0parts.p0_04.into_push_pull_output(Level::High),
126+
col2: p0parts.p0_05.into_push_pull_output(Level::High),
127+
col3: p0parts.p0_06.into_push_pull_output(Level::High),
128+
col4: p0parts.p0_07.into_push_pull_output(Level::High),
129+
col5: p0parts.p0_08.into_push_pull_output(Level::High),
130+
col6: p0parts.p0_09.into_push_pull_output(Level::High),
131+
col7: p0parts.p0_10.into_push_pull_output(Level::High),
132+
col8: p0parts.p0_11.into_push_pull_output(Level::High),
133+
col9: p0parts.p0_12.into_push_pull_output(Level::High),
134134
},
135135
buttons: Buttons {
136136
button_a: p0parts.p0_17.into_floating_input(),

0 commit comments

Comments
 (0)