__s32 BSP_disp_close(void) { __u32 sel = 0; for(sel = 0; sel<2; sel++) { Image_close(sel); if(gdisp.scaler[sel].status & SCALER_USED) { Scaler_close(sel); } if(gdisp.screen[sel].lcdc_status & LCDC_TCON0_USED) { TCON0_close(sel); LCDC_close(sel); } else if(gdisp.screen[sel].lcdc_status & LCDC_TCON1_USED) { TCON1_close(sel); LCDC_close(sel); } else if(gdisp.screen[sel].status & (TV_ON | VGA_ON)) { TVE_close(sel); } } gdisp.screen[sel].status &= (IMAGE_USED_MASK & LCD_OFF & TV_OFF & VGA_OFF & HDMI_OFF); gdisp.screen[sel].lcdc_status &= (LCDC_TCON0_USED_MASK & LCDC_TCON1_USED_MASK); return DIS_SUCCESS; }
__s32 BSP_disp_close(void) { __u32 sel = 0; if (!disp_initialised) return DIS_SUCCESS; for (sel = 0; sel < 2; sel++) { Image_close(sel); if (gdisp.scaler[sel].status & SCALER_USED) Scaler_close(sel); if (gdisp.screen[sel].lcdc_status & LCDC_TCON0_USED) { TCON0_close(sel); LCDC_close(sel); } else if (gdisp.screen[sel].lcdc_status & LCDC_TCON1_USED) { TCON1_close(sel); LCDC_close(sel); } else if (gdisp.screen[sel].status & (TV_ON | VGA_ON)) { TVE_close(sel); } } for (sel = 0; sel < 2; sel++) { gdisp.screen[sel].status &= ~(IMAGE_USED | LCD_ON | TV_ON | VGA_ON | HDMI_ON); gdisp.screen[sel].lcdc_status &= ~(LCDC_TCON0_USED & LCDC_TCON1_USED); } return DIS_SUCCESS; }
__s32 LCDC_exit(__u32 sel) { LCDC_disable_int(sel, LCDC_VBI_LCD_EN | LCDC_VBI_HD_EN | LCDC_LTI_LCD_EN | LCDC_LTI_HD_EN); LCDC_close(sel); return 0; }