Fix for initialisation order issue

This commit is contained in:
ZodiusInfuser 2021-03-01 12:42:48 +00:00 committed by Phil Howard
parent 44ad763954
commit 7b15bda03c
1 changed files with 6 additions and 4 deletions

View File

@ -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;
}