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

📄 hal_lcd.ps

📁 一款SmartPhone的驱动代码
💻 PS
📖 第 1 页 / 共 5 页
字号:
	xjp	__L7
__L6:

	.loc	72
	ld.w	%r10,0x0
__L7:

	.loc	78
	.def	bend,	scl	110,	type	0x0,	endef
	popn	%r1
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	SetPanelIfType,	val	SetPanelIfType,	scl	2,	type	0x21,	endef
	.global	SetPanelIfType

	.loc	90
	.def	ent,	scl	101,	type	0x0,	endef
SetPanelIfType:
;	.frame	%sp,8,$31		# vars= 0, regs= 2/0, args= 0, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	ld.w	%r0,%r12
	.def	mode,	val	12,	scl	17,	type	0xd,	endef

	.loc	91
	.def	begin,	scl	100,	type	0x0,	endef
	.def	reg,	val	10,	scl	4,	type	0xd,	endef
	xld.w	%r12,0x00000032		; 50
	xcall	halReadReg16
	xand	%r10,%r10,0x0000fffc

	.loc	92
	or	%r10,%r0

	.loc	93
	ld.uh	%r10,%r10
	xld.w	%r12,0x00000032		; 50
	ld.w	%r13,%r10
	xcall	halWriteReg16

	.loc	94
	.def	bend,	scl	110,	type	0x0,	endef
	popn	%r0
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	GetPanelIfType,	val	GetPanelIfType,	scl	2,	type	0x2d,	endef
	.global	GetPanelIfType

	.loc	106
	.def	ent,	scl	101,	type	0x0,	endef
GetPanelIfType:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0

	.loc	107
	xld.w	%r12,0x00000032		; 50
	xcall	halReadReg16
	xand	%r10,%r10,0x00000003

	.loc	108
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	SetLcdHVDispPer,	val	SetLcdHVDispPer,	scl	2,	type	0x21,	endef
	.global	SetLcdHVDispPer

	.loc	120
	.def	ent,	scl	101,	type	0x0,	endef
SetLcdHVDispPer:
;	.frame	%sp,16,$31		# vars= 0, regs= 4/0, args= 0, extra= 0
;	.mask	0x80070000,-4
;	.fmask	0x00000000,0
	pushn	%r2
	ld.w	%r2,%r12
	ld.w	%r1,%r14
	ld.w	%r0,%r13
	.def	LcdNum,	val	2,	scl	17,	tag	__T15,	size	4,	type	0xa,	endef
	.def	HorizDispPer,	val	0,	scl	17,	type	0xd,	endef
	.def	VertDispPer,	val	14,	scl	17,	type	0xd,	endef

	.loc	121
	.def	begin,	scl	100,	type	0x0,	endef
	.def	HDP,	val	11,	scl	4,	type	0xd,	endef
	.def	VDP,	val	1,	scl	4,	type	0xd,	endef

	.loc	122
	xcall	GetOutputPort

	.loc	124
	ld.uh	%r0,%r0
	ld.w	%r11,%r0
	xsrl	%r11,1
	xsub	%r11,%r11,1
	xand	%r11,%r11,0x000000ff

	.loc	125
	xsub	%r1,%r1,1

	.loc	127
	xcmp	%r10,3
	xjrne	__L11

	.loc	128
	ld.w	%r10,%r0
	xsrl	%r10,2
	xsub	%r10,%r10,1
	ld.w	%r11,%r10
	xand	%r11,%r11,0x000000ff
__L11:

	.loc	130
	cmp	%r2,0x0
	xjreq	__L13
	xcmp	%r2,1
	xjreq	__L14
	xjp	__L12
__L13:

	.loc	133
	ld.uh	%r13,%r11
	xld.w	%r12,0x00000042		; 66
	xcall	halWriteReg16

	.loc	134
	ld.uh	%r13,%r1
	xld.w	%r12,0x0000004c		; 76

	.loc	135
	xjp	__L17
__L14:

	.loc	137
	ld.uh	%r13,%r11
	xld.w	%r12,0x00000058		; 88
	xcall	halWriteReg16

	.loc	138
	ld.uh	%r13,%r1
	xld.w	%r12,0x0000005a		; 90
__L17:
	xcall	halWriteReg16
__L12:

	.loc	143
	.def	bend,	scl	110,	type	0x0,	endef
	popn	%r2
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	GetLcdHdp,	val	GetLcdHdp,	scl	2,	type	0x2f,	endef
	.global	GetLcdHdp

	.loc	153
	.def	ent,	scl	101,	type	0x0,	endef
GetLcdHdp:
;	.frame	%sp,8,$31		# vars= 0, regs= 2/0, args= 0, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	.def	OutputPort,	val	12,	scl	17,	tag	__T14,	size	4,	type	0xa,	endef

	.loc	154
	.def	begin,	scl	100,	type	0x0,	endef
	.def	val32,	val	0,	scl	4,	type	0xf,	endef

	.loc	156
	xcmp	%r12,2
	xjrne	__L19

	.loc	157
	xld.w	%r12,0x00000058		; 88
	xcall	halReadReg16
	ld.uh	%r10,%r10
	xadd	%r10,%r10,1
	xsll	%r10,1
	xjp	__L30
__L19:

	.loc	160
	xld.w	%r12,0x00000042		; 66
	xcall	halReadReg16
	ld.uh	%r0,%r10
	xadd	%r0,%r0,1
	xsll	%r0,1

	.loc	161
	xld.w	%r12,0x00000032		; 50
	xcall	halReadReg16
	ld.uh	%r10,%r10
	xsrl	%r10,10
	xcmp	%r10,16
	xjrlt	__L21
	xcmp	%r10,18
	xjrle	__L25
	xcmp	%r10,22
	xjrgt	__L21
	xcmp	%r10,20
	xjrge	__L28

	.loc	164
	xjp	__L21
__L25:

	.loc	168
	xld.w	%r10,0x00000003		; 3
	mlt.w	%r0,%r10
	ld.w	%r0,%alr

	.loc	169
	xjp	__L21
__L28:

	.loc	174
	xsll	%r0,1
__L21:

	.loc	177
	ld.w	%r10,%r0
__L30:

	.loc	179
	.def	bend,	scl	110,	type	0x0,	endef
	popn	%r0
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	GetLcdVdp,	val	GetLcdVdp,	scl	2,	type	0x2f,	endef
	.global	GetLcdVdp

	.loc	188
	.def	ent,	scl	101,	type	0x0,	endef
GetLcdVdp:
;	.frame	%sp,8,$31		# vars= 0, regs= 2/0, args= 0, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	.def	OutputPort,	val	12,	scl	17,	tag	__T14,	size	4,	type	0xa,	endef

	.loc	189
	.def	begin,	scl	100,	type	0x0,	endef
	.def	val32,	val	0,	scl	4,	type	0xf,	endef

	.loc	191
	xcmp	%r12,2
	xjrne	__L32

	.loc	192
	xld.w	%r12,0x0000005a		; 90
	xcall	halReadReg16
	ld.uh	%r10,%r10
	xadd	%r10,%r10,1
	xjp	__L41
__L32:

	.loc	195
	xld.w	%r12,0x0000004c		; 76
	xcall	halReadReg16
	ld.uh	%r0,%r10
	xadd	%r0,%r0,1

	.loc	196
	xld.w	%r12,0x00000032		; 50
	xcall	halReadReg16
	ld.uh	%r10,%r10
	xsrl	%r10,10
	xcmp	%r10,20
	xjreq	__L38
	xjrgt	__L40
	xcmp	%r10,16
	xjreq	__L38
	xjp	__L34
__L40:
	xcmp	%r10,24
	xjrne	__L34
__L38:

	.loc	203
	xld.w	%r10,0x00000003		; 3
	mlt.w	%r0,%r10
	ld.w	%r0,%alr
	xsub	%r0,%r0,1
__L34:

	.loc	206
	ld.w	%r10,%r0
__L41:

	.loc	208
	.def	bend,	scl	110,	type	0x0,	endef
	popn	%r0
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	SetOutputPort,	val	SetOutputPort,	scl	2,	type	0x2c,	endef
	.global	SetOutputPort

	.loc	222
	.def	ent,	scl	101,	type	0x0,	endef
SetOutputPort:
;	.frame	%sp,8,$31		# vars= 0, regs= 2/0, args= 0, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0
	ld.w	%r0,%r12
	.def	port,	val	0,	scl	17,	tag	__T14,	size	4,	type	0xa,	endef

	.loc	223
	.def	begin,	scl	100,	type	0x0,	endef
	.def	reg,	val	13,	scl	4,	type	0xd,	endef
	xld.w	%r12,0x00000202		; 514
	xcall	halReadReg16
	ld.w	%r13,%r10
	xand	%r13,%r13,0x0000e3ff

	.loc	225
	xcmp	%r0,4
	xjrugt	__L49
	ld.w	%r10,%r0
	xsll	%r10,2
	xld.w	%r10,[%r10+__L50]
	jp	%r10
	.code
	.align	2
__L50:
	.word	__L44
	.word	__L45
	.word	__L46
	.word	__L47
	.word	__L48
	.code

	.loc	227
__L44:
	xand	%r13,%r13,0x0000e3ff
	xjp	__L43
__L45:

	.loc	228
	xoor	%r13,%r13,0x00000400
	xjp	__L43
__L46:

	.loc	229
	xoor	%r13,%r13,0x00000800
	xjp	__L43
__L47:

	.loc	230
	xoor	%r13,%r13,0x00001000
	xjp	__L43
__L48:

	.loc	231
	xoor	%r13,%r13,0x00001400
	xjp	__L43
__L49:

	.loc	232
	ld.w	%r10,0x0
	xjp	__L51
__L43:

	.loc	235
	ld.uh	%r13,%r13
	xld.w	%r12,0x00000202		; 514
	xcall	halWriteReg16

	.loc	236
	xld.w	%r10,0x00000001		; 1
__L51:

	.loc	237
	.def	bend,	scl	110,	type	0x0,	endef
	popn	%r0
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	GetOutputPort,	val	GetOutputPort,	scl	2,	tag	__T14,	size	4,	type	0x2a,	endef
	.global	GetOutputPort

	.loc	247
	.def	ent,	scl	101,	type	0x0,	endef
GetOutputPort:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0

	.loc	248
	.def	begin,	scl	100,	type	0x0,	endef
	.def	PortStatus,	val	10,	scl	4,	type	0xf,	endef
	xld.w	%r12,0x00000202		; 514
	xcall	halReadReg16
	ld.uh	%r10,%r10
	xsrl	%r10,10
	xand	%r10,%r10,0x00000007

	.loc	250
	xcmp	%r10,5
	xjrugt	__L59
	xsll	%r10,2
	xld.w	%r10,[%r10+__L60]
	jp	%r10
	.code
	.align	2
__L60:
	.word	__L54
	.word	__L55
	.word	__L56
	.word	__L59
	.word	__L57
	.word	__L58
	.code

	.loc	252
__L54:
	ld.w	%r10,0x0
	xjp	__L61
__L55:

⌨️ 快捷键说明

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