/** ###################################################################
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : Inhr5.C
**     Project   : fgh
**     Processor : MC56F8006_48_LQFP
**     Beantype  : BitIO
**     Version   : Bean 02.072, Driver 01.17, CPU db: 3.00.177
**     Compiler  : Metrowerks DSP C Compiler
**     Date/Time : 11/26/2008, 11:52 AM
**     Abstract  :
**         This bean "BitIO" implements an one-bit input/output.
**         It uses one bit/pin of a port.
**         Note: This bean is set to work in Output direction only.
**         Methods of this bean are mostly implemented as a macros
**         (if supported by target language and compiler).
**     Settings  :
**         Used pin                    :
**             ----------------------------------------------------
**                Number (on package)  |    Name
**             ----------------------------------------------------
**                       33            |  GPIOA4_PWM4_FAULT1_SDA_TIN2
**             ----------------------------------------------------
**
**         Port name                   : GPIOA
**
**         Bit number (in port)        : 4
**         Bit mask of the port        : 0010
**
**         Initial direction           : Output (direction cannot be changed)
**         Initial output value        : 0
**         Initial pull option         : off
**
**         Port data register          : GPIO_A_DR [F181]
**         Port control register       : GPIO_A_DDR [F182]
**         Port function register      : GPIO_A_PER [F183]
**
**         Optimization for            : speed
**     Contents  :
**         GetVal     - bool Inhr5_GetVal(void);
**         PutVal     - void Inhr5_PutVal(bool Val);
**         ClrVal     - void Inhr5_ClrVal(void);
**         SetVal     - void Inhr5_SetVal(void);
**         NegVal     - void Inhr5_NegVal(void);
**         ConnectPin - void Inhr5_ConnectPin(void);
**
**     (c) Copyright UNIS, a.s. 1997-2008
**     UNIS, a.s.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

/* MODULE Inhr5. */

#include "Inhr5.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"

#include "Cpu.h"


/*
** ===================================================================
**     Method      :  Inhr5_GetVal (bean BitIO)
**
**     Description :
**         This method returns an input value.
**           a) direction = Input  : reads the input value from the
**                                   pin and returns it
**           b) direction = Output : returns the last written value
**         Note: This bean is set to work in Output direction only.
**     Parameters  : None
**     Returns     :
**         ---             - Input value. Possible values:
**                           FALSE - logical "0" (Low level)
**                           TRUE - logical "1" (High level)

** ===================================================================
*/
/*
bool Inhr5_GetVal(void)

**  This method is implemented as a macro. See Inhr5.h file.  **

*/

/*
** ===================================================================
**     Method      :  Inhr5_PutVal (bean BitIO)
**
**     Description :
**         This method writes the new output value.
**     Parameters  :
**         NAME       - DESCRIPTION
**         Val             - Output value. Possible values:
**                           FALSE - logical "0" (Low level)
**                           TRUE - logical "1" (High level)
**     Returns     : Nothing
** ===================================================================
*/
void Inhr5_PutVal(bool Val)
{
  if (Val) {                           /* Is it one to be written? */
    setRegBits(GPIO_A_DR,Inhr5_PIN_MASK); /* Set bit on port */
  }
  else {                               /* Is it zero to be written? */
    clrRegBits(GPIO_A_DR,Inhr5_PIN_MASK); /* Clear bit on port */
  }
}

/*
** ===================================================================
**     Method      :  Inhr5_SetVal (bean BitIO)
**
**     Description :
**         This method sets (sets to one) the output value.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
/*
void Inhr5_SetVal(void)

**  This method is implemented as a macro. See Inhr5.h file.  **
*/

/*
** ===================================================================
**     Method      :  Inhr5_ClrVal (bean BitIO)
**
**     Description :
**         This method clears (sets to zero) the output value.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
/*
void Inhr5_ClrVal(void)

**  This method is implemented as a macro. See Inhr5.h file.  **
*/

/*
** ===================================================================
**     Method      :  Inhr5_NegVal (bean BitIO)
**
**     Description :
**         This method negates (inverts) the output value.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
/*
void Inhr5_NegVal(void)

**  This method is implemented as a macro. See Inhr5.h file.  **
*/

/*
** ===================================================================
**     Method      :  Inhr5_ConnectPin (bean BitIO)
**
**     Description :
**         This method reconnects the selected pin in this bean.
**         This method is available only for CPU derivatives and
**         peripherals that support the runtime pin sharing with
**         other internal on-chip peripherals.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
/*
void Inhr5_ConnectPin(void)

**  This method is implemented as a macro. See Inhr5.h file.  **
*/

/* END Inhr5. */

/*
** ###################################################################
**
**     This file was created by UNIS Processor Expert 2.99 [04.17]
**     for the Freescale 56800 series of microcontrollers.
**
** ###################################################################
*/
