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

📄 hal_lcd.ms

📁 一款SmartPhone的驱动代码
💻 MS
📖 第 1 页 / 共 5 页
字号:
	.global	GetLcdPClkDivide

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

	.loc	44
	ext	0x0		; 	xld.w	%r12,0x00000030		; 48
	ld.w	%r12,0x30
	ext	halReadReg16@rh	; 	xcall	halReadReg16
	ext	halReadReg16@rm
	call	halReadReg16@rl
	and	%r10,0xf	; 	xand	%r10,%r10,0x0000000f
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	sll	%r10,0x1	; 	xsll	%r10,1

	.loc	45
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	GetLcdPClkFreq,	val	GetLcdPClkFreq,	scl	2,	type	0x2f,	endef
	.global	GetLcdPClkFreq

	.loc	54
	.def	ent,	scl	101,	type	0x0,	endef
GetLcdPClkFreq:
;	.frame	%sp,8,$31		# vars= 0, regs= 2/0, args= 0, extra= 0
;	.mask	0x80010000,-4
;	.fmask	0x00000000,0
	pushn	%r0

	.loc	55
	ld.w	%r12,0x0
	ext	GetSystemClock@rh	; 	xcall	GetSystemClock
	ext	GetSystemClock@rm
	call	GetSystemClock@rl
	ld.w	%r0,%r10
	call	GetLcdPClkDivide	; 	xcall	GetLcdPClkDivide
	ld.uh	%r13,%r10
	ld.w	%r12,%r0
	ext	__udivsi3@rh	; 	xcall	__udivsi3
	ext	__udivsi3@rm
	call	__udivsi3@rl

	.loc	56
	popn	%r0
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	GetLcdFrameRate,	val	GetLcdFrameRate,	scl	2,	type	0x2f,	endef
	.global	GetLcdFrameRate

	.loc	65
	.def	ent,	scl	101,	type	0x0,	endef
GetLcdFrameRate:
;	.frame	%sp,12,$31		# vars= 0, regs= 3/0, args= 0, extra= 0
;	.mask	0x80030000,-4
;	.fmask	0x00000000,0
	pushn	%r1

	.loc	66
	.def	begin,	scl	100,	type	0x0,	endef
	.def	Lcd1HTotal,	val	1,	scl	4,	type	0xf,	endef
	.def	Lcd1VTotal,	val	0,	scl	4,	type	0xf,	endef
	ext	GetOutputPort@rm	; 	xcall	GetOutputPort
	call	GetOutputPort@rl

	.loc	71
	cmp	%r10,0x1	; 	xcmp	%r10,1
	jrne	__LX6		; 	xjrne	__L6

	.loc	74
	ext	0x1		; 	xld.w	%r12,0x00000040		; 64
	ld.w	%r12,0x0
	ext	halReadReg16@rh	; 	xcall	halReadReg16
	ext	halReadReg16@rm
	call	halReadReg16@rl
	ld.w	%r1,%r10
	ext	0x1		; 	xand	%r1,%r1,0x0000007f
	and	%r1,0x3f
	add	%r1,0x1		; 	xadd	%r1,%r1,1
	sll	%r1,0x3		; 	xsll	%r1,3

	.loc	75
	ext	0x1		; 	xld.w	%r12,0x0000004a		; 74
	ld.w	%r12,0xa
	ext	halReadReg16@rh	; 	xcall	halReadReg16
	ext	halReadReg16@rm
	call	halReadReg16@rl
	ld.uh	%r0,%r10
	add	%r0,0x1		; 	xadd	%r0,%r0,1

	.loc	77
	call	GetLcdPClkFreq	; 	xcall	GetLcdPClkFreq
	ld.w	%r11,0xa	; 	xld.w	%r11,0x0000000a		; 10
	mlt.w	%r10,%r11
	ld.w	%r11,%alr
	ld.w	%r12,%r11
	mlt.w	%r1,%r0
	ld.w	%r13,%alr
	ext	__udivsi3@rh	; 	xcall	__udivsi3
	ext	__udivsi3@rm
	call	__udivsi3@rl
	jp	__LX7		; 	xjp	__L7
__LX6:				; __L6:

	.loc	72
	ld.w	%r10,0x0
__LX7:				; __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
	ext	0x0		; 	xld.w	%r12,0x00000032		; 50
	ld.w	%r12,0x32
	ext	halReadReg16@rh	; 	xcall	halReadReg16
	ext	halReadReg16@rm
	call	halReadReg16@rl
	ext	0x3ff		; 	xand	%r10,%r10,0x0000fffc
	and	%r10,0x3c

	.loc	92
	or	%r10,%r0

	.loc	93
	ld.uh	%r10,%r10
	ext	0x0		; 	xld.w	%r12,0x00000032		; 50
	ld.w	%r12,0x32
	ld.w	%r13,%r10
	ext	halWriteReg16@rh	; 	xcall	halWriteReg16
	ext	halWriteReg16@rm
	call	halWriteReg16@rl

	.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
	ext	0x0		; 	xld.w	%r12,0x00000032		; 50
	ld.w	%r12,0x32
	ext	halReadReg16@rh	; 	xcall	halReadReg16
	ext	halReadReg16@rm
	call	halReadReg16@rl
	and	%r10,0x3	; 	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
	ext	GetOutputPort@rm	; 	xcall	GetOutputPort
	call	GetOutputPort@rl

	.loc	124
	ld.uh	%r0,%r0
	ld.w	%r11,%r0
	srl	%r11,0x1	; 	xsrl	%r11,1
	sub	%r11,0x1	; 	xsub	%r11,%r11,1
	ext	0x3		; 	xand	%r11,%r11,0x000000ff
	and	%r11,0x3f

	.loc	125
	sub	%r1,0x1		; 	xsub	%r1,%r1,1

	.loc	127
	cmp	%r10,0x3	; 	xcmp	%r10,3
	jrne	__LX11		; 	xjrne	__L11

	.loc	128
	ld.w	%r10,%r0
	srl	%r10,0x2	; 	xsrl	%r10,2
	sub	%r10,0x1	; 	xsub	%r10,%r10,1
	ld.w	%r11,%r10
	ext	0x3		; 	xand	%r11,%r11,0x000000ff
	and	%r11,0x3f
__LX11:				; __L11:

	.loc	130
	cmp	%r2,0x0
	jreq	__LX13		; 	xjreq	__L13
	cmp	%r2,0x1		; 	xcmp	%r2,1
	jreq	__LX14		; 	xjreq	__L14
	jp	__LX12		; 	xjp	__L12
__LX13:				; __L13:

	.loc	133
	ld.uh	%r13,%r11
	ext	0x1		; 	xld.w	%r12,0x00000042		; 66
	ld.w	%r12,0x2
	ext	halWriteReg16@rh	; 	xcall	halWriteReg16
	ext	halWriteReg16@rm
	call	halWriteReg16@rl

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

	.loc	135
	jp	__LX17		; 	xjp	__L17
__LX14:				; __L14:

	.loc	137
	ld.uh	%r13,%r11
	ext	0x1		; 	xld.w	%r12,0x00000058		; 88
	ld.w	%r12,0x18
	ext	halWriteReg16@rh	; 	xcall	halWriteReg16
	ext	halWriteReg16@rm
	call	halWriteReg16@rl

	.loc	138
	ld.uh	%r13,%r1
	ext	0x1		; 	xld.w	%r12,0x0000005a		; 90
	ld.w	%r12,0x1a
__LX17:				; __L17:
	ext	halWriteReg16@rh	; 	xcall	halWriteReg16
	ext	halWriteReg16@rm
	call	halWriteReg16@rl
__LX12:				; __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
	cmp	%r12,0x2	; 	xcmp	%r12,2
	jrne	__LX19		; 	xjrne	__L19

	.loc	157
	ext	0x1		; 	xld.w	%r12,0x00000058		; 88
	ld.w	%r12,0x18
	ext	halReadReg16@rh	; 	xcall	halReadReg16
	ext	halReadReg16@rm
	call	halReadReg16@rl
	ld.uh	%r10,%r10
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	sll	%r10,0x1	; 	xsll	%r10,1
	jp	__LX30		; 	xjp	__L30
__LX19:				; __L19:

	.loc	160
	ext	0x1		; 	xld.w	%r12,0x00000042		; 66
	ld.w	%r12,0x2
	ext	halReadReg16@rh	; 	xcall	halReadReg16
	ext	halReadReg16@rm
	call	halReadReg16@rl
	ld.uh	%r0,%r10
	add	%r0,0x1		; 	xadd	%r0,%r0,1
	sll	%r0,0x1		; 	xsll	%r0,1

	.loc	161
	ext	0x0		; 	xld.w	%r12,0x00000032		; 50
	ld.w	%r12,0x32
	ext	halReadReg16@rh	; 	xcall	halReadReg16
	ext	halReadReg16@rm
	call	halReadReg16@rl
	ld.uh	%r10,%r10
	srl	%r10,0x8	; 	xsrl	%r10,10
	srl	%r10,0x2
	cmp	%r10,0x10	; 	xcmp	%r10,16
	jrlt	__LX21		; 	xjrlt	__L21
	cmp	%r10,0x12	; 	xcmp	%r10,18
	jrle	__LX25		; 	xjrle	__L25
	cmp	%r10,0x16	; 	xcmp	%r10,22
	jrgt	__LX21		; 	xjrgt	__L21
	cmp	%r10,0x14	; 	xcmp	%r10,20
	jrge	__LX28		; 	xjrge	__L28

	.loc	164
	jp	__LX21		; 	xjp	__L21
__LX25:				; __L25:

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

	.loc	169
	jp	__LX21		; 	xjp	__L21
__LX28:				; __L28:

	.loc	174
	sll	%r0,0x1		; 	xsll	%r0,1
__LX21:				; __L21:

	.loc	177
	ld.w	%r10,%r0
__LX30:				; __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

⌨️ 快捷键说明

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