⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modetbl.h

📁 SM501基于ARMV4/ARMV4I平台
💻 H
字号:
/*
 * Voyager GX SDK
 *
 * $Workfile:   MODETBL.H  $
 *
 * This file contains the definitions for the mode tables.
 *
 * Written by Frido Garritsen
 * Copyright (c) 2002 - Silicon Motion, Inc.
 * All Rights Reserved.
 *
 * $Log:   \\Mercury\Projects\archives\Voyager\SDK\Tools\common\MODETBL.H-arc  $
 * 
 *    Rev 1.1   Dec 09 2002 17:21:18   Frido
 * Added support for test clock.
 * 
 *    Rev 1.0   Dec 06 2002 17:25:42   Frido
 * Initial Revision
 *
 */

#ifndef _MODETBL_H_
#define _MODETBL_H_

typedef enum _display_t
{
	PANEL = 0,
	CRT = 1,
}
display_t;

typedef enum _polarity_t
{
	POSITIVE,
	NEGATIVE,
}
polarity_t;

typedef struct _mode_table_t
{
	// Horizontal timing.
	int horizontal_total;
	int horizontal_display_end;
	int horizontal_sync_start;
	int horizontal_sync_width;
	polarity_t horizontal_sync_polarity;

	// Vertical timing.
	int vertical_total;
	int vertical_display_end;
	int vertical_sync_start;
	int vertical_sync_height;
	polarity_t vertical_sync_polarity;

	// Refresh timing.
	long pixel_clock;
	long horizontal_frequency;
	long vertical_frequency;
}
mode_table_t;

typedef struct clock_select_t
{
	long mclk;
	long test_clock;
	int divider;
	int shift;
}
clock_select_t;

typedef struct _reg_table_t
{
	unsigned long clock;
	unsigned long control;
	unsigned long fb_width;
	unsigned long horizontal_total;
	unsigned long horizontal_sync;
	unsigned long vertical_total;
	unsigned long vertical_sync;
	unsigned long width;
	unsigned long height;
	display_t display;
}
reg_table_t;

unsigned long rev(void);

long findClock(long requested_clock, clock_select_t *clock, display_t display,
			   long test_clock);
mode_table_t *findMode(mode_table_t *mode_table, int width, int height,
					   int refresh_rate);
void adjustMode(mode_table_t *vesaMode, mode_table_t *mode, display_t display,
				long test_clock);
void setModeRegisters(reg_table_t *register_table, mode_table_t *mode,
					  display_t display, int bpp, long test_clock);
//void programMode(reg_table_t *register_table);

#endif // _MODETBL_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -