lxvtag 发表于 2012-5-2 22:52:58

教程5九个demo中的中断演示代码好像不完整?

本帖最后由 lxvtag 于 2012-5-2 22:54 编辑

以下是interrupt_drv.c全文:
/*****************************************************************************
**                                               The C file for MG8F08A Microprocessors                                                        **
**                                                                                                                                                                                       **
**                                                           Copyright(C) 2012, Green Tec.                                                               **
**                                                                  All rights reserved.                                                                               **
*****************************************************************************
**   filename        : interrupt_drv.c                                                                                                               **
**   version               : v1.0                                                                                                                                        **
**   created by       : sean                                                                                                                                        **
**   date                : 2012-3-11                                                                                                                       **
**   used for mg8f08a                                                                                                                                                **
******************************************************************************/
//#include "interrupt_drv.h"
#include "mcu_def.h"
#include "iomg8f164v.h"
#include "macros.h"
/*****************************************************************************
** Function name       :               Ex_Interrupt_set
** Descriptions              :               
** parameters               :               mode:                               
** Returned value       :               None
*****************************************************************************/
//void Ex_Interrupt_set(u8 int_unmb,u8 int_mode)
//{

//}

SIGNAL(SIG_INTERRUPT0)
{
        PCIFR |= 0x40;        //clear flag
        //return 1;
}

/******************************************************************************
*******************                                                End Of File                                                         *******************
*******************************************************************************/

可以看到Ex_Interrupt_set整个函数都没有内容而且被注释掉了,

还有个疑问,手册71页里说PCIFR寄存器bit7-4是保留位

为何这个中断函数里却对它操作:
SIGNAL(SIG_INTERRUPT0)
{
        PCIFR |= 0x40;        //clear flag
        //return 1;
}

lxvtag 发表于 2012-5-2 23:01:06

对了,还有 ‘flash_drv.c’ 基本也是空的

为什么这么多天了都没人提出啊,难道大家都早就不需要看demo了的?

LGT 发表于 2012-5-3 09:14:44

请参考官方提供的示例代码:http://www.mcugreen.com/LGT8F0XA/tools/LGT8F0XABSP.zip

lxvtag 发表于 2012-5-4 17:07:38

LGT 发表于 2012-5-3 09:14 static/image/common/back.gif
请参考官方提供的示例代码:http://www.mcugreen.com/LGT8F0XA/tools/LGT8F0XABSP.zip

这里下载的可用
页: [1]
查看完整版本: 教程5九个demo中的中断演示代码好像不完整?