Skip to content

Commit

Permalink
Merge pull request #54 from pimoroni/patch-micropython
Browse files Browse the repository at this point in the history
Fix for hardlock on calling a module function prior to calling init()
  • Loading branch information
Gadgetoid authored Feb 11, 2021
2 parents e086a0d + 9c65df1 commit f8e8efd
Show file tree
Hide file tree
Showing 10 changed files with 603 additions and 433 deletions.
4 changes: 0 additions & 4 deletions libraries/pico_explorer/pico_explorer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ namespace pimoroni {
screen.update();
}

void PicoExplorer::set_backlight(uint8_t brightness) {
screen.set_backlight(brightness);
}

bool PicoExplorer::is_pressed(uint8_t button) {
return !gpio_get(button);
}
Expand Down
1 change: 0 additions & 1 deletion libraries/pico_explorer/pico_explorer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ namespace pimoroni {

void init();
void update();
void set_backlight(uint8_t brightness);
bool is_pressed(uint8_t button);

float get_adc(uint8_t channel);
Expand Down
1 change: 0 additions & 1 deletion micropython/examples/pico_explorer/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
display_buffer = bytearray(width * height * 2) # 2-bytes per pixel (RGB565)
explorer.init(display_buffer)

explorer.set_backlight(1.0)
explorer.set_audio_pin(0)

i = 1
Expand Down
Loading

0 comments on commit f8e8efd

Please sign in to comment.