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

📄 ts_1325.inc

📁 RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
💻 INC
字号:
/*  These are just some useful macros that control the TS-1325's  LEDs and push-button switch. Useful for debugging.  NOTE:	This *must* be 16-bit compatible code to work in start.s	  Tony Ambardar*/	.macro	LED_OFF	movw	$P1LTC,	dx	inb	dx,	al	orb	$0b01000000,	al	andb	$0b11011111,	al	outb	al,	dx	.endm	.macro	LED_GREEN	movw	$P1LTC,	dx	inb	dx,	al	orb	$0b01100000,	al	outb	al,	dx	.endm	.macro	LED_YELLOW	movw	$P1LTC,	dx	inb	dx,	al	orb	$0b00100000,	al	andb	$0b10111111,	al	outb	al,	dx	.endm	.macro	LED_RED	movw	$P1LTC,	dx	inb	dx,	al	andb	$0b10011111,	al	outb	al,	dx	.endm	.macro	WAIT_BUTTON     # Wait till the button is pressed for a bit.	movw	$P1PIN,	dx      # ~25-30 cycles per loop, 25MHz -> 1 sec.	movl	$300000,ecx    # "Timer" count determines how long.0:	inb	dx,	al	andb	$0b00000001,al	jnz	0b              # Button pressed?	decl	ecx	jnz	0b              # CX count expired?	.endm

⌨️ 快捷键说明

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