forked from Mirror/GodMode9
lazy fix for the screen init bug, hopefully
This commit is contained in:
parent
2aba1afb2e
commit
1e92163245
@ -39,8 +39,10 @@ u8 LCD_GetBrightness(void)
|
|||||||
|
|
||||||
void LCD_Initialize(u8 brightness)
|
void LCD_Initialize(u8 brightness)
|
||||||
{
|
{
|
||||||
*REG_LCD(0x014) = 0x00000001;
|
*REG_LCD(0x014) = 1;
|
||||||
*REG_LCD(0x00C) &= 0xFFFEFFFE;
|
*REG_LCD(0x00C) = 0;
|
||||||
|
TIMER_WaitTicks(CLK_MS_TO_TICKS(10));
|
||||||
|
|
||||||
*REG_LCD(0x240) = brightness;
|
*REG_LCD(0x240) = brightness;
|
||||||
*REG_LCD(0xA40) = brightness;
|
*REG_LCD(0xA40) = brightness;
|
||||||
*REG_LCD(0x244) = 0x1023E;
|
*REG_LCD(0x244) = 0x1023E;
|
||||||
@ -150,13 +152,7 @@ void GPU_SetFramebufferMode(u32 screen, u8 mode)
|
|||||||
|
|
||||||
void GPU_Init(void)
|
void GPU_Init(void)
|
||||||
{
|
{
|
||||||
if (*REG_GPU_CNT == 0x1007F) {
|
MCU_PushToLCD(true);
|
||||||
MCU_PushToLCD(false);
|
|
||||||
|
|
||||||
LCD_Deinitialize();
|
|
||||||
*REG_GPU_CNT = 0x10001;
|
|
||||||
TIMER_WaitTicks(CLK_MS_TO_TICKS(40));
|
|
||||||
}
|
|
||||||
|
|
||||||
LCD_Initialize(0x20);
|
LCD_Initialize(0x20);
|
||||||
|
|
||||||
|
@ -138,6 +138,7 @@ void MCU_ResetLED(void)
|
|||||||
void MCU_PushToLCD(bool enable)
|
void MCU_PushToLCD(bool enable)
|
||||||
{
|
{
|
||||||
MCU_WriteReg(REG_LCD_STATE, enable ? 0x2A : 0x01);
|
MCU_WriteReg(REG_LCD_STATE, enable ? 0x2A : 0x01);
|
||||||
|
TIMER_WaitTicks(CLK_MS_TO_TICKS(160));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCU_HandleInterrupts(u32 __attribute__((unused)) irqn)
|
void MCU_HandleInterrupts(u32 __attribute__((unused)) irqn)
|
||||||
@ -172,14 +173,12 @@ void MCU_HandleInterrupts(u32 __attribute__((unused)) irqn)
|
|||||||
case MCU_SHELL_OPEN:
|
case MCU_SHELL_OPEN:
|
||||||
MCU_PushToLCD(true);
|
MCU_PushToLCD(true);
|
||||||
MCU_UpdateShellState(true);
|
MCU_UpdateShellState(true);
|
||||||
TIMER_WaitTicks(CLK_MS_TO_TICKS(5));
|
|
||||||
MCU_ResetLED();
|
MCU_ResetLED();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MCU_SHELL_CLOSE:
|
case MCU_SHELL_CLOSE:
|
||||||
MCU_PushToLCD(false);
|
MCU_PushToLCD(false);
|
||||||
MCU_UpdateShellState(false);
|
MCU_UpdateShellState(false);
|
||||||
TIMER_WaitTicks(CLK_MS_TO_TICKS(5));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MCU_VOL_SLIDER:
|
case MCU_VOL_SLIDER:
|
||||||
|
@ -118,7 +118,6 @@ void SYS_CoreZeroInit(void)
|
|||||||
GPU_SetFramebufferMode(1, PDC_RGB24);
|
GPU_SetFramebufferMode(1, PDC_RGB24);
|
||||||
|
|
||||||
MCU_PushToLCD(true);
|
MCU_PushToLCD(true);
|
||||||
TIMER_WaitTicks(CLK_MS_TO_TICKS(5));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SYS_CoreInit(void)
|
void SYS_CoreInit(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user