Skip to content

Commit 8b928d8

Browse files
authored
Merge pull request #944 from pimoroni/patch-tufty-example
Fixed button polarity
2 parents 56e6d66 + b9f3990 commit 8b928d8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/tufty2040/tufty2040_drawing.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ ST7789 st7789(
3232

3333
PicoGraphics_PenRGB332 graphics(st7789.width, st7789.height, nullptr);
3434

35-
Button button_a(Tufty2040::A);
36-
Button button_b(Tufty2040::B);
37-
Button button_c(Tufty2040::C);
38-
Button button_up(Tufty2040::UP);
39-
Button button_down(Tufty2040::DOWN);
35+
Button button_a(Tufty2040::A, Polarity::ACTIVE_HIGH);
36+
Button button_b(Tufty2040::B, Polarity::ACTIVE_HIGH);
37+
Button button_c(Tufty2040::C, Polarity::ACTIVE_HIGH);
38+
Button button_up(Tufty2040::UP, Polarity::ACTIVE_HIGH);
39+
Button button_down(Tufty2040::DOWN, Polarity::ACTIVE_HIGH);
4040

4141
uint32_t time() {
4242
absolute_time_t t = get_absolute_time();

0 commit comments

Comments
 (0)