/** ###################################################################
**     THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : Vystupni_port.H
**     Project   : Generator
**     Processor : MC9S08GT16ACFB
**     Component : ByteIO
**     Version   : Component 02.058, Driver 03.20, CPU db: 2.87.091
**     Compiler  : CodeWarrior HCS08 C Compiler
**     Date/Time : 27.3.2010, 16:08
**     Abstract  :
**         This bean "ByteIO" implements an one-byte input/output.
**         It uses one 8-bit 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 langauage and compiler).
**     Settings  :
**         Port name                   : PTA
**
**         Initial direction           : Output (direction cannot be changed)
**         Initial output value        : 0 = 000H
**         Initial pull option         : off
**
**         8-bit data register         : PTAD      [$0000]
**         8-bit control register      : PTADD     [$0003]
**         8-bit function register     : KBIPE     [$0017]
**
**             ----------------------------------------------------
**                   Bit     |   Pin   |   Name
**             ----------------------------------------------------
**                    0      |    32   |   PTA0_KBIP0
**                    1      |    33   |   PTA1_KBIP1
**                    2      |    34   |   PTA2_KBIP2
**                    3      |    35   |   PTA3_KBIP3
**                    4      |    36   |   PTA4_KBIP4
**                    5      |    37   |   PTA5_KBIP5
**                    6      |    38   |   PTA6_KBIP6
**                    7      |    39   |   PTA7_KBIP7
**             ----------------------------------------------------
**     Contents  :
**         GetDir - bool Vystupni_port_GetDir(void);
**         GetVal - byte Vystupni_port_GetVal(void);
**         PutVal - void Vystupni_port_PutVal(byte Val);
**         GetBit - bool Vystupni_port_GetBit(byte Bit);
**         PutBit - void Vystupni_port_PutBit(byte Bit, bool Val);
**         SetBit - void Vystupni_port_SetBit(byte Bit);
**         ClrBit - void Vystupni_port_ClrBit(byte Bit);
**         NegBit - void Vystupni_port_NegBit(byte Bit);
**
**     Copyright : 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved.
**     
**     http      : www.freescale.com
**     mail      : support@freescale.com
** ###################################################################*/

#ifndef Vystupni_port_H_
#define Vystupni_port_H_

/* MODULE Vystupni_port. */

  /* Including shared modules, which are used in the whole project */
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
#include "Cpu.h"


/*
** ===================================================================
**     Method      :  Vystupni_port_GetVal (component ByteIO)
**
**     Description :
**         This method returns an input value.
**           a) direction = Input  : reads the input value from the
**                                   pins 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 (0 to 255)
** ===================================================================
*/
#define Vystupni_port_GetVal() ( \
    getReg8(PTAD)                      /* Evaluate to port data */ \
  )

/*
** ===================================================================
**     Method      :  Vystupni_port_PutVal (component ByteIO)
**
**     Description :
**         This method writes the new output value.
**     Parameters  :
**         NAME       - DESCRIPTION
**         Val        - Output value (0 to 255)
**     Returns     : Nothing
** ===================================================================
*/
#define Vystupni_port_PutVal(Val) ( \
    (void)setReg8(PTAD, Val)           /* PTAD0-PTAD7=Val[bits 0-7] */ \
  )

/*
** ===================================================================
**     Method      :  Vystupni_port_GetBit (component ByteIO)
**
**     Description :
**         This method returns the specified bit of the input value.
**           a) direction = Input  : reads the input value from pins
**                                   and returns the specified bit
**           b) direction = Output : returns the specified bit
**                                   of the last written value
**         Note: This bean is set to work in Output direction only.
**     Parameters  :
**         NAME       - DESCRIPTION
**         Bit        - Number of the bit to read (0 to 7)
**     Returns     :
**         ---        - Value of the specified bit (FALSE or TRUE)
**                      FALSE = "0" or "Low", TRUE = "1" or "High"
** ===================================================================
*/
bool Vystupni_port_GetBit(byte Bit);

/*
** ===================================================================
**     Method      :  Vystupni_port_PutBit (component ByteIO)
**
**     Description :
**         This method writes the new value to the specified bit
**         of the output value.
**     Parameters  :
**         NAME       - DESCRIPTION
**         Bit        - Number of the bit (0 to 7)
**         Val        - New value of the bit (FALSE or TRUE)
**                      FALSE = "0" or "Low", TRUE = "1" or "High"
**     Returns     : Nothing
** ===================================================================
*/
void Vystupni_port_PutBit(byte Bit, bool Val);

/*
** ===================================================================
**     Method      :  Vystupni_port_SetBit (component ByteIO)
**
**     Description :
**         This method sets (sets to one) the specified bit of the
**         output value.
**         [ It is the same as "PutBit(Bit,TRUE);" ]
**     Parameters  :
**         NAME       - DESCRIPTION
**         Bit        - Number of the bit to set (0 to 7)
**     Returns     : Nothing
** ===================================================================
*/
void Vystupni_port_SetBit(byte Bit);

/*
** ===================================================================
**     Method      :  Vystupni_port_ClrBit (component ByteIO)
**
**     Description :
**         This method clears (sets to zero) the specified bit
**         of the output value.
**         [ It is the same as "PutBit(Bit,FALSE);" ]
**     Parameters  :
**         NAME       - DESCRIPTION
**         Bit        - Number of the bit to clear (0 to 7)
**     Returns     : Nothing
** ===================================================================
*/
void Vystupni_port_ClrBit(byte Bit);

/*
** ===================================================================
**     Method      :  Vystupni_port_NegBit (component ByteIO)
**
**     Description :
**         This method negates (inverts) the specified bit of the
**         output value.
**     Parameters  :
**         NAME       - DESCRIPTION
**         Bit        - Number of the bit to invert (0 to 7)
**     Returns     : Nothing
** ===================================================================
*/
void Vystupni_port_NegBit(byte Bit);

/*
** ===================================================================
**     Method      :  Vystupni_port_GetDir (component ByteIO)
**
**     Description :
**         This method returns direction of the bean.
**     Parameters  : None
**     Returns     :
**         ---        - Direction of the bean (always TRUE, Output only)
**                      FALSE = Input, TRUE = Output
** ===================================================================
*/
#define Vystupni_port_GetDir() ( \
    (bool)1                            /* Port is fixed to GPO mode */ \
  )



/* END Vystupni_port. */
#endif /* #ifndef __Vystupni_port_H_ */
/*
** ###################################################################
**
**     This file was created by Processor Expert 3.07 [04.34]
**     for the Freescale HCS08 series of microcontrollers.
**
** ###################################################################
*/
