hm60x: Add lcd type information to debug info.

Change-Id: I09d30f9db6ac40cc92c22c637d560e4a3dcd50de
This commit is contained in:
Andrew Ryabinin 2013-03-25 16:04:48 +04:00
parent 575d00e3b7
commit b0eb3c7eb2
3 changed files with 13 additions and 5 deletions

View file

@ -28,6 +28,7 @@
#include "adc.h" #include "adc.h"
#include "font.h" #include "font.h"
#include "storage.h" #include "storage.h"
#include "lcd-target.h"
#ifdef RK27_GENERIC #ifdef RK27_GENERIC
#define DEBUG_CANCEL BUTTON_VOL #define DEBUG_CANCEL BUTTON_VOL
@ -42,6 +43,7 @@
extern unsigned long sd_debug_time_rd; extern unsigned long sd_debug_time_rd;
extern unsigned long sd_debug_time_wr; extern unsigned long sd_debug_time_wr;
extern enum lcd_type_t lcd_type;
bool dbg_hw_info(void) bool dbg_hw_info(void)
{ {
@ -62,6 +64,10 @@ bool dbg_hw_info(void)
_DEBUG_PRINTF("SCU_DIVCON1: 0x%0x", SCU_DIVCON1); _DEBUG_PRINTF("SCU_DIVCON1: 0x%0x", SCU_DIVCON1);
_DEBUG_PRINTF("SCU_CLKCFG: 0x%0x", SCU_CLKCFG); _DEBUG_PRINTF("SCU_CLKCFG: 0x%0x", SCU_CLKCFG);
_DEBUG_PRINTF("SCU_CHIPCFG: 0x%0x", SCU_CHIPCFG); _DEBUG_PRINTF("SCU_CHIPCFG: 0x%0x", SCU_CHIPCFG);
#ifdef HM60X
_DEBUG_PRINTF("LCD type: %s", lcd_type == LCD_V1 ? "V1 (HX8340b)": "V2");
#endif
line++; line++;
_DEBUG_PRINTF("sd_debug_time_rd: %d", sd_debug_time_rd); _DEBUG_PRINTF("sd_debug_time_rd: %d", sd_debug_time_rd);
_DEBUG_PRINTF("sd_debug_time_wr: %d", sd_debug_time_wr); _DEBUG_PRINTF("sd_debug_time_wr: %d", sd_debug_time_wr);

View file

@ -23,5 +23,10 @@
#define LCD_TARGET_H #define LCD_TARGET_H
#define LCD_DATABUS_WIDTH LCDIF_16BIT #define LCD_DATABUS_WIDTH LCDIF_16BIT
enum lcd_type_t
{
LCD_V1,
LCD_v2
};
#endif #endif

View file

@ -27,6 +27,7 @@
#include "system.h" #include "system.h"
#include "cpu.h" #include "cpu.h"
#include "lcdif-rk27xx.h" #include "lcdif-rk27xx.h"
#include "lcd-target.h"
static bool display_on = false; static bool display_on = false;
@ -187,11 +188,7 @@ static void lcd_v1_update_rect(int x, int y, int width, int height)
#ifdef HM60X #ifdef HM60X
enum lcd_type_t enum lcd_type_t lcd_type;
{
LCD_V1,
LCD_v2
} lcd_type;
static void identify_lcd(void) static void identify_lcd(void)
{ {