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

📄 callout_debug_s3c2410.s

📁 QNX ADS BSP code for i.MX27 chips
💻 S
字号:
/* * $QNXLicenseC:  * Copyright 2007, QNX Software Systems.   *   * Licensed under the Apache License, Version 2.0 (the "License"). You   * may not reproduce, modify or distribute this software except in   * compliance with the License. You may obtain a copy of the License   * at: http://www.apache.org/licenses/LICENSE-2.0   *   * Unless required by applicable law or agreed to in writing, software   * distributed under the License is distributed on an "AS IS" basis,   * WITHOUT WARRANTIES OF ANY KIND, either express or implied.  *  * This file may contain contributions from others, either as   * contributors under the License or as licensors under other terms.    * Please review this entire file for other proprietary rights or license   * notices, as well as the QNX Development Suite License Guide at   * http://licensing.qnx.com/license-guide/ for other information.  * $ *//* * S3C2410 UART specific polled serial I/O */#include "callout.ah"#include <arm/s3c2410.h>.extern	patch_channel.extern	dbg_device/* * ----------------------------------------------------------------------- * Routine to patch callout code * * On entry: *	r0 - physical address of syspage *	r1 - virtual  address of syspage *	r2 - offset from start of syspage to start of the callout routine *	r3 - offset from start of syspage to read/write data used by callout * ----------------------------------------------------------------------- */patch_debug:	stmdb	sp!,{r4,lr}	add		r4, r0, r2					// address of callout routine	// Map registers	ldr		r0, Lpatch_channel	ldr		r1, Ldbg_device	ldr		r0, [r0]	add		r1, r1, r0, lsl #3	ldr		r1, [r1, #DDI_BASE]	mov		r0, #S3C2410_UART_SIZE	bl		callout_io_map	// Patch the callout routine	CALLOUT_PATCH	r4, r0, r1, r2, ip	ldmia	sp!,{r4,pc}Lpatch_channel:	.word	patch_channelLdbg_device:	.word	dbg_device/* * ----------------------------------------------------------------------- * void	display_char_s3c2410(struct sypage_entry *, char) * ----------------------------------------------------------------------- */CALLOUT_START(display_char_s3c2410, 0, patch_debug )	mov		ip,     #0x000000ff	orr		ip, ip, #0x0000ff00	orr		ip, ip, #0x00ff0000	orr		ip, ip, #0xff0000000:	ldr		r3, [ip, #0x10]	tst		r3, #0x02	beq		0b	str 	r1, [ip, #0x20]	mov		pc, lrCALLOUT_END(display_char_s3c2410)/* * ----------------------------------------------------------------------- * char	poll_key_s3c2410(struct sypage_entry *) * ----------------------------------------------------------------------- */CALLOUT_START(poll_key_s3c2410, 0, patch_debug )	mov		ip,     #0x000000ff	orr		ip, ip, #0x0000ff00	orr		ip, ip, #0x00ff0000	orr		ip, ip, #0xff0000000:	ldr		r3, [ip, #0x10]	tst		r3, #0x01	ldrne	r0, [ip, #0x24]	mvneq	r0, #1	mov		pc, lrCALLOUT_END(poll_key_s3c2410)/* * ----------------------------------------------------------------------- * ----------------------------------------------------------------------- */CALLOUT_START(break_detect_s3c2410, 0, patch_debug )	mov		ip,     #0x000000ff	orr		ip, ip, #0x0000ff00	orr		ip, ip, #0x00ff0000	orr		ip, ip, #0xff000000   	mov		pc, lrCALLOUT_END(break_detect_s3c2410)

⌨️ 快捷键说明

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