From 7b15bda03c4ab2974a9d2e31b292b260d142895e Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Mon, 1 Mar 2021 12:42:48 +0000 Subject: [PATCH 1/2] Fix for initialisation order issue --- drivers/is31fl3731/is31fl3731.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/is31fl3731/is31fl3731.cpp b/drivers/is31fl3731/is31fl3731.cpp index 2980193ef..b00fdb168 100644 --- a/drivers/is31fl3731/is31fl3731.cpp +++ b/drivers/is31fl3731/is31fl3731.cpp @@ -59,16 +59,18 @@ namespace pimoroni { gpio_set_function(sda, GPIO_FUNC_I2C); gpio_pull_up(sda); gpio_set_function(scl, GPIO_FUNC_I2C); gpio_pull_up(scl); - i2c_reg_write_uint8(reg::SHUTDOWN, 0b00000001); - i2c_reg_write_uint8(reg::BANK, CONFIG_BANK); + i2c_reg_write_uint8(reg::SHUTDOWN, 0b00000000); + + clear(); + update(0); + + i2c_reg_write_uint8(reg::SHUTDOWN, 0b00000001); i2c_reg_write_uint8(reg::MODE, mode::PICTURE); i2c_reg_write_uint8(reg::AUDIOSYNC, 0); - clear(); - return true; } From 5c785af9833a6a74672e2f1324f0343ad225535a Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Fri, 23 Apr 2021 10:13:40 +0100 Subject: [PATCH 2/2] Fix lookup table int type --- libraries/breakout_matrix11x7/breakout_matrix11x7.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/breakout_matrix11x7/breakout_matrix11x7.hpp b/libraries/breakout_matrix11x7/breakout_matrix11x7.hpp index c78eaf4f7..c8de1c3a7 100644 --- a/libraries/breakout_matrix11x7/breakout_matrix11x7.hpp +++ b/libraries/breakout_matrix11x7/breakout_matrix11x7.hpp @@ -22,7 +22,7 @@ namespace pimoroni { uint8_t lookup_pixel(uint8_t index); // This wonderful lookup table maps the LEDs on Matrix 11x7 - const int8_t lookup_table[WIDTH * HEIGHT] = { + const uint8_t lookup_table[WIDTH * HEIGHT] = { 6, 22, 38, 54, 70, 86, 14, 30, 46, 62, 78, 5, 21, 37, 53, 69, 85, 13, 29, 45, 61, 77, 4, 20, 36, 52, 68, 84, 12, 28, 44, 60, 76,