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

📄 ledasm.s

📁 针对于sa1100的bootloader。blob2.04是一个功能比较强大的bootloader
💻 S
字号:
/* * ledasm.S: simple LED control code * * Copyright (C) 2001  Erik Mouw (J.A.K.Mouw@its.tudelft.nl) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * *//* * Documentation: * [1] Intel Corporation, "Intel StrongARM SA-1100 Microprocessor *     Developer's Manual", April 1999 * [2] Intel Corporation, "Intel StrongARM SA-1110 Microprocessor *     Advanced Developer's manual, December 1999 */.ident "$Id: ledasm.S,v 1.2 2001/08/06 22:44:52 erikm Exp $"#ifdef HAVE_CONFIG_H# include <config.h>#endif#define ASSEMBLY#include "led.h".textLED:		.long LED_GPIOGPIO_BASE:	.long 0x90040000#define	GPDR	0x00000004#define GPSR	0x00000008#define GPCR	0x0000000c.globl ledinit	/* initialise LED GPIO and turn LED on.	 * clobbers r0 and r1	 */ledinit:	ldr	r0, GPIO_BASE	ldr	r1, LED	str	r1, [r0, #GPDR]		/* LED GPIO is output */	str	r1, [r0, #GPSR]		/* turn LED on */	mov	pc, lr.globl led_on	/* turn LED on. clobbers r0 and r1 */led_on:	ldr	r0, GPIO_BASE	ldr	r1, LED	str	r1, [r0, #GPSR]	mov	pc, lr.globl led_off	/* turn LED off. clobbers r0 and r1 */led_off:	ldr	r0, GPIO_BASE	ldr	r1, LED	str	r1, [r0, #GPCR]	mov	pc, lr

⌨️ 快捷键说明

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