/** ###################################################################
**     THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename    : EC161.h
**     Project     : ProcessorExpert
**     Processor   : MC56F84789VLL
**     Component   : EventCntr16
**     Version     : Component 02.136, Driver 02.06, CPU db: 3.50.001
**     Compiler    : Metrowerks DSP C Compiler
**     Date/Time   : 2012-07-05, 11:35, # CodeGen: 10
**     Abstract    :
**         This component "EventCntr16" implements an 16-bit event counter.
**         It counts the external events (specified edges of the external
**         signal). It uses a hardware timer counter.
**         The counter width is extended or taperred to 16 bits.
**     Settings    :
**         Timer name                  : TMRA0 [16-bit]
**
**         Counting mode               : Repetitive
**         User handling procedure     : EC161_OnEnd
**         This event is called when the 10000 of iterations is generated
**
**         Used input pin              : 
**             ----------------------------------------------------
**                Number (on package)  |    Name
**             ----------------------------------------------------
**                       11            |  GPIOC3/TA0/CMPA_O/RXD0/CLKIN1
**             ----------------------------------------------------
**
**         Initialization:
**              Timer                  : Disabled
**              Events                 : Enabled
**
**         Timer registers
**         Counter register            : TMRA_0_CNTR [E145]
**         Mode register               : TMRA_0_CTRL [E146]
**         Run register                : TMRA_0_CTRL [E146]
**     Contents    :
**         Enable       - byte EC161_Enable(void);
**         Reset        - byte EC161_Reset(void);
**         GetNumEvents - byte EC161_GetNumEvents(word *Value);
**
**     Copyright : 1997 - 2012 Freescale Semiconductor, Inc. All Rights Reserved.
**     
**     http      : www.freescale.com
**     mail      : support@freescale.com
** ###################################################################*/

#ifndef __EC161
#define __EC161

/* MODULE EC161. */

/*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"

#include "Cpu.h"


byte EC161_Enable(void);
/*
** ===================================================================
**     Method      :  EC161_Enable (component EventCntr16)
**
**     Description :
**         This method enables the component - the external events are
**         counted.
**     Parameters  : None
**     Returns     :
**         ---             - Error code, possible codes:
**                           ERR_OK - OK
** ===================================================================
*/

byte EC161_Reset(void);
/*
** ===================================================================
**     Method      :  EC161_Reset (component EventCntr16)
**
**     Description :
**         This method resets the external event counter (sets it to
**         zero).
**     Parameters  : None
**     Returns     :
**         ---             - Error code, possible codes:
**                           ERR_OK - OK
** ===================================================================
*/

byte EC161_GetNumEvents(word *Value);
/*
** ===================================================================
**     Method      :  EC161_GetNumEvents (component EventCntr16)
**
**     Description :
**         This method returns the number of the external events.
**     Parameters  :
**         NAME            - DESCRIPTION
**       * Value           - A pointer to the returned number of
**                           the external events
**     Returns     :
**         ---             - Error code, possible codes:
**                           ERR_OK - OK
**                           ERR_OVERFLOW - Timer overflow
** ===================================================================
*/

void EC161_Interrupt(void);
/*
** ===================================================================
**     Method      :  EC161_Interrupt (component EventCntr16)
**
**     Description :
**         The method services the interrupt of the selected peripheral(s)
**         and eventually invokes the beans event(s).
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

void EC161_Init(void);
/*
** ===================================================================
**     Method      :  EC161_Init (component EventCntr16)
**
**     Description :
**         Initializes the associated peripheral(s) and the beans 
**         internal variables. The method is called automatically as a 
**         part of the application initialization code.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/

/* END EC161. */

#endif /* ifndef __EC161 */
/*
** ###################################################################
**
**     This file was created by Processor Expert 5.3 [05.01]
**     for the Freescale 56800 series of microcontrollers.
**
** ###################################################################
*/
