diff --git a/drivers/st7567/st7567.cpp b/drivers/st7567/st7567.cpp index 1a66de67..00153b89 100644 --- a/drivers/st7567/st7567.cpp +++ b/drivers/st7567/st7567.cpp @@ -62,6 +62,7 @@ namespace pimoroni { void ST7567::reset() { if(reset_pin == PIN_UNUSED) return; gpio_put(reset_pin, 0); sleep_ms(10); + sleep_ms(100); gpio_put(reset_pin, 1); sleep_ms(10); sleep_ms(100); } @@ -93,7 +94,6 @@ namespace pimoroni { } //reset display - reset(); diff --git a/drivers/st7567/st7567.hpp b/drivers/st7567/st7567.hpp index 001be289..e21e99a6 100644 --- a/drivers/st7567/st7567.hpp +++ b/drivers/st7567/st7567.hpp @@ -34,7 +34,7 @@ namespace pimoroni { uint sck; uint mosi; uint bl; - uint reset_pin; + uint reset_pin=21; uint32_t spi_baud = 10000000; //10Mhz diff --git a/examples/gfx_pack/gfx_demo.cpp b/examples/gfx_pack/gfx_demo.cpp index 4d7fde10..ec015567 100644 --- a/examples/gfx_pack/gfx_demo.cpp +++ b/examples/gfx_pack/gfx_demo.cpp @@ -16,7 +16,6 @@ using namespace pimoroni; ST7567 st7567(128, 64, gfx_pack_pins); PicoGraphics_Pen1Bit graphics(st7567.width, st7567.height, nullptr); RGBLED backlight_rgb(GfxPack::BL_R, GfxPack::BL_G, GfxPack::BL_B, Polarity::ACTIVE_HIGH); - Button button_a(GfxPack::A); Button button_b(GfxPack::B); Button button_c(GfxPack::C); @@ -44,6 +43,7 @@ void from_hsv(float h, float s, float v, uint8_t &r, uint8_t &g, uint8_t &b) { } int main() { + sleep_ms(100); st7567.set_backlight(50); diff --git a/micropython/modules/picographics/picographics.c b/micropython/modules/picographics/picographics.c index 590432e1..01d98ac8 100644 --- a/micropython/modules/picographics/picographics.c +++ b/micropython/modules/picographics/picographics.c @@ -124,6 +124,7 @@ STATIC const mp_map_elem_t picographics_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_DISPLAY_I2C_OLED_128X128), MP_ROM_INT(DISPLAY_I2C_OLED_128X128) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY_INKY_PACK), MP_ROM_INT(DISPLAY_INKY_PACK) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY_INKY_FRAME), MP_ROM_INT(DISPLAY_INKY_FRAME) }, + { MP_ROM_QSTR(MP_QSTR_DISPLAY_GFX_PACK), MP_ROM_INT(DISPLAY_GFX_PACK)}, { MP_ROM_QSTR(MP_QSTR_PEN_1BIT), MP_ROM_INT(PEN_1BIT) }, { MP_ROM_QSTR(MP_QSTR_PEN_P4), MP_ROM_INT(PEN_P4) }, diff --git a/micropython/modules/picographics/picographics.h b/micropython/modules/picographics/picographics.h index 55d9d765..664d712c 100644 --- a/micropython/modules/picographics/picographics.h +++ b/micropython/modules/picographics/picographics.h @@ -12,7 +12,8 @@ enum PicoGraphicsDisplay { DISPLAY_LCD_160X80, DISPLAY_I2C_OLED_128X128, DISPLAY_INKY_PACK, - DISPLAY_INKY_FRAME + DISPLAY_INKY_FRAME, + DISPLAY_GFX_PACK }; enum PicoGraphicsPenType {