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

📄 i2cisr.s

📁 zilog z80f91单片机的I2C接口函数
💻 S
字号:
;********************************************************************************
; Copyright 2004, ZiLOG Inc.													*
; All Rights Reserved															*
;																				*
; This is UNPUBLISHED PROPRIETARY SOURCE CODE of ZiLOG Inc., and might			*
; contain proprietary, confidential and trade secret information of				*
; ZiLOG, our partners and parties from which this code has been licensed.		*
;																				*
; The contents of this file may not be disclosed to third parties, copied or	*
; duplicated in any form, in whole or in part, without the prior written		*
; permission of ZiLOG Inc.														*
;********************************************************************************

	.include "ez80F91.inc"

;	.sect	".isr"	
	.extern _RZKResumeInterruptThread	
	.extern _i2cIntThreadHdl
	.extern _I2CStatus
	.extern _RZKISRProlog
	.extern _RZKISREpilog
	.assume	adl=1

	.def	_i2cisr
_i2cisr:	
	PUSH	AF
	PUSH	BC
	PUSH	DE
	PUSH	HL		; scratch reg for function call from isr
	PUSH	IX
	PUSH	IY
	
;	IN0  A,(%CB)
;	RES  %3,A   
;	OUT0 (%CB),A

;	IN0	A, (I2C_SR)		; Save the status register value
;	LD 	(_I2CStatus), A
	IN0 A, (I2C_CTL)	
	AND A, %7F
	OUT0 (I2C_CTL), A		; Disabling the I2C interrupts
	CALL	_RZKISRProlog
	LD HL, (_i2cIntThreadHdl)
	PUSH HL
	CALL _RZKResumeInterruptThread
	POP HL
	CALL	_RZKISREpilog
	POP		IY
	POP    	IX
	POP		HL
	POP		DE
	POP		BC
	POP		AF
	EI
	RETI





















⌨️ 快捷键说明

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