boot: various bugfixes (b/w logo displays now)

This commit is contained in:
Michael Scire 2020-11-10 05:02:41 -08:00 committed by SciresM
parent fdab964e3d
commit affdea9244
10 changed files with 47 additions and 19 deletions

View file

@ -319,6 +319,11 @@ namespace ams::boot {
reg::SetBits(g_gpio_regs + GPIO_PORT3_OUT_0, 0x2);
os::SleepThread(TimeSpan::FromMilliSeconds(10));
/* Configure LCD backlight to use PWM. */
reg::ClearBits(g_gpio_regs + GPIO_PORT6_CNF_1, 0x1);
reg::Write(g_apb_misc_regs + PINMUX_AUX_LCD_BL_PWM, PINMUX_REG_BITS_ENUM(AUX_LCD_BL_PWM_PM, PWM0),
PINMUX_REG_BITS_ENUM(AUX_PUPD, PULL_DOWN));
/* Configure LCD backlight. */
R_ABORT_UNLESS(pwm::driver::OpenSession(std::addressof(g_lcd_backlight_session), pwm::DeviceCode_LcdBacklight));
pwm::driver::SetPeriod(g_lcd_backlight_session, TimeSpan::FromNanoSeconds(33898));

View file

@ -50,8 +50,16 @@ namespace ams::boot {
}
void FinalizeI2cDriverLibrary() {
/* TODO */
AMS_ABORT();
/* Finalize the i2c driver library. */
i2c::driver::Finalize();
/* Finalize the i2c client library. */
i2c::Finalize();
/* NOTE: Unknown finalize function is called here by Nintendo. */
/* Finalize the pwm client library. */
pwm::Finalize();
}
}