events.c
来自「飞思卡尔单片机MC9SDG128B的脉冲捕获程序」· C语言 代码 · 共 69 行
C
69 行
/** ###################################################################
** 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 + =
减小字号Ctrl + -
显示快捷键?