/** ###################################################################
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : PWM1.H
**     Project   : PWM_Lab
**     Processor : MC9S08QE128CLK
**     Beantype  : PWM
**     Version   : Bean 02.164, Driver 01.13, CPU db: 3.00.000
**     Compiler  : CodeWarrior HCS08 C Compiler
**     Date/Time : 14/5/2007, 15:14
**     Abstract  :
**         This bean implements a pulse-width modulation generator
**         that generates signal with variable duty and fixed cycle. 
**     Settings  :
**         Used output pin             : 
**             ----------------------------------------------------
**                Number (on package)  |    Name
**             ----------------------------------------------------
**                       34            |  PTC0_TPM3CH0
**             ----------------------------------------------------
**
**         Timer name                  : TPM3 [16-bit]
**         Counter                     : TPM3CNT   [$0061]
**         Mode register               : TPM3SC    [$0060]
**         Run register                : TPM3SC    [$0060]
**         Prescaler                   : TPM3SC    [$0060]
**         Compare register            : TPM3C0V   [$0066]
**         Flip-flop register          : TPM3C0SC  [$0065]
**
**         Interrupt name              : Vtpm3ch0
**         Interrupt enable reg.       : TPM3C0SC  [$0065]
**         Priority                    : undef
**         User handling procedure     : PWM1_OnEnd
**         This event is called when the 1 of cycles is generated
**
**         Port name                   : PTC
**         Bit number (in port)        : 0
**         Bit mask of the port        : $0001
**         Port data register          : PTCD      [$0004]
**         Port control register       : PTCDD     [$0005]
**
**         Initialization:
**              Output level           : low
**              Timer                  : Enabled
**              Event                  : Enabled
**         High speed mode
**             Prescaler               : divide-by-1
**             Clock                   : 4194304 Hz
**           Initial value of            period     pulse width
**             Xtal ticks              : 328        164
**             microseconds            : 10000      5000
**             milliseconds            : 10         5
**             seconds (real)          : 0.0100000  0.0050001
**
**     Contents  :
**         SetRatio16 - byte PWM1_SetRatio16(word Ratio);
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2006
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

#ifndef __PWM1
#define __PWM1

/* MODULE PWM1. */

/*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 PWM1_SetRatio16(word Ratio);
/*
** ===================================================================
**     Method      :  PWM1_SetRatio16 (bean PWM)
**
**     Description :
**         This method sets a new duty-cycle ratio.
**     Parameters  :
**         NAME       - DESCRIPTION
**         Ratio      - Ratio is expressed as an 16-bit unsigned integer
**                      number. 0 - 0xFFFF value is proportional
**                      to ratio 0 - 100%
**         Note: Calculated duty depends on the timer possibilities
**               and on the selected period.
**     Returns     :
**         ---        - Error code, possible codes:
**                           ERR_OK - OK
**                           ERR_SPEED - This device does not work in
**                           the active speed mode
** ===================================================================
*/

void PWM1_Init(void);
/*
** ===================================================================
**     Method      :  PWM1_Init (bean PWM)
**
**     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.
** ===================================================================
*/

__interrupt void PWM1_Interrupt(void);
/*
** ===================================================================
**     Method      :  PWM1_Interrupt (bean PWM)
**
**     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.
** ===================================================================
*/

/* END PWM1. */

#endif /* ifndef __PWM1 */
/*
** ###################################################################
**
**     This file was created by UNIS Processor Expert 3.00 [03.89]
**     for the Freescale HCS08 series of microcontrollers.
**
** ###################################################################
*/
