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

📄 events.c

📁 飞思卡尔单片机MC9SDG128B的脉冲捕获程序
💻 C
字号:
/** ###################################################################
**     Filename  : Events.C
**     Project   : Capture
**     Processor : MC9S12DG128BCPV
**     Beantype  : Events
**     Version   : Driver 01.04
**     Compiler  : Metrowerks HC12 C Compiler
**     Date/Time : 2008-3-5, 上午 09:26
**     Abstract  :
**         This is user's event module.
**         Put your event handler code here.
**     Settings  :
**     Contents  :
**         Cap1_OnCapture - void Cap1_OnCapture(void);
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2005
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/
/* MODULE Events */


#include "Cpu.h"
#include "Events.h"

#pragma CODE_SEG DEFAULT

/*
** ===================================================================
**     Event       :  Cap1_OnCapture (module Events)
**
**     From bean   :  Cap1 [Capture]
**     Description :
**         This event is called on capturing of Timer/Counter actual
**         value (only when the bean is enabled - <"Enable"> and the
**         events are enabled - <"EnableEvent">.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void Cap1_OnCapture(void)
{ word Time;
  byte a;
  /* Write your code here ... */
   a=0;
   Time=0;
  // PORTB++;
    a=FC161_GetTimeUS(&Time);
    a=FC161_GetTimeMS(&Time);
   PORTB=Time;
   a=FC161_Reset();
    
}

/* END Events */

/*
** ###################################################################
**
**     This file was created by UNIS Processor Expert 2.96 [03.76]
**     for the Freescale HCS12 series of microcontrollers.
**
** ###################################################################
*/

⌨️ 快捷键说明

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