isrspi.c

来自「zilog的实时操作系统RZK,可以移植到多种处理器上」· C语言 代码 · 共 37 行

C
37
字号
/*!\file isruart0.c
 * \brief Implementation file for handling UART0 interrupt.
 *
 *  This file contains implementation for handling UART0 interrupt
 *  required by UART driver implementations for eZ80 and eZ80
 *  Acclaim! series of microprocessors and microcontrollers.
 *
 *  This source file uses Doxygen-style comments to generate documentation
 *  automatically.
 *
 *  Copyright (C) 1999-2004 by  ZiLOG, Inc.
 *  All Rights Reserved.
 */

#include "ZSysgen.h"
#include "ztypes.h"
#include "ZThread.h"
#include "ZInterrupt.h"
#include "ZDevice.h"
#include "spi.h"

extern DEV_SPI_CB_t spiDevStruct ; 
/* SPI Interrupt task */
void spi_task(void)
{
	RZK_STATE_t stat ;

	while(1)
	{
		stat = RZKDisablePreemption() ;
		/* Re enabling spi interrupts */
		RZKResumeThread(spiDevStruct.hSPIThread);
		RZKSuspendInterruptThread() ;
		RZKRestorePreemption(stat) ;
	}
}/*! End of File */

⌨️ 快捷键说明

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