/* ** ################################################################### ** ** Filename : Events.C ** ** Project : Capture ** ** Processor : MC9S12DP256BCPV ** ** Componenttype : Events ** ** Version : Driver 01.00 ** ** Compiler : Metrowerks HC12 C Compiler ** ** Date/Time : 27.11.2002, 9:44 ** ** Abstract : ** ** This is user's event module. ** Put your event handler code here. ** ** Settings : ** ** ** Contents : ** ** Cap1_OnCapture - void Cap1_OnCapture(void); ** ** ** Copyright: 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved. ** ** ** ** http : www.freescale.com ** mail : support@freescale.com ** ** ################################################################### */ /* MODULE Events */ /*Including used modules for compilling procedure*/ #include "Cpu.h" #include "Events.h" #include "Cap1.h" /*Include shared modules, which are used for whole project*/ #include "PE_Types.h" #include "PE_Error.h" #include "PE_Const.h" #include "IO_Map.h" word Captures=0, LastCapturedValue=0; byte error; /* ** =================================================================== ** Event : Cap1_OnCapture (module Events) ** ** From Component : Cap1 [Capture] ** Description : ** This event is called on capturing of Timer/Counter actual ** value. ** Parameters : None ** Returns : Nothing ** =================================================================== */ void Cap1_OnCapture(void) { Captures++; error = Cap1_GetCaptureValue(&LastCapturedValue); } /* END Events */ /* ** ################################################################### ** ** This file was created by Processor Expert 03.08 for ** the Freescale HCS12 series of microcontrollers. ** ** ################################################################### */