/** ###################################################################
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : IFsh1.H
**     Project   : QG8_test
**     Processor : MC9S08QG8CFQ
**     Beantype  : IntFLASH
**     Version   : Bean 02.173, Driver 01.15, CPU db: 2.87.095
**     Compiler  : CodeWarrior HCS08 C Compiler
**     Date/Time : 3/29/2007, 7:02 AM
**     Abstract  :
**         This bean "IntFLASH" implements an access to internal FLASH.
**         The bean support reading/writing data into FLASH, erasing of
**         selected sector.
**         The bean supports events if the write interrupt is supported.
**         The bean supports following modes of write operations:
**           - Write - writing without any test.
**           - Destructive write - sector is erased if necessary.
**           - Safe write - user event is invoked to save and resore data
**                          from the current sector.
**         The bean requires on-chip FLASH memory (not used/allocated by
**         other beans).
**     Settings  :
**         Total FLASH memory size       : 0x2000 bytes
**         Write method                  : Write
**         Wait in RAM                   : yes
**         Save buffer                   : Disabled
**         Virtual page                  : Disabled
**         CPU clock/speed selection
**           FLASH clock                 : 181 kHz
**           High speed mode             : This bean enabled
**     Contents  :
**         SetByteFlash - byte IFsh1_SetByteFlash(dword Addr,byte Data);
**         SetWordFlash - byte IFsh1_SetWordFlash(dword Addr,word Data);
**
**     (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 __IFsh1
#define __IFsh1

/*Include shared modules, which are used for whole project*/
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
//RB#include "IO_Map.h"
/* Include inherited beans */

#include "Cpu.h"
/* MODULE IFsh1. */

typedef void (*pFnCmdInRam)(byte,word, byte);
typedef void (*pFnBurstProgCmdInRam)(word, word, word);

byte IFsh1_SetByteFlash(word Addr,byte Data);
/*
** ===================================================================
**     Method      :  IFsh1_SetByteFlash (bean IntFLASH)
**
**     Description :
**         Write byte to address in FLASH.
**     Parameters  :
**         NAME            - DESCRIPTION
**         Addr            - Address to FLASH.
**         Data            - Data to write.
**     Returns     :
**         ---             - Error code, possible codes:
**                           - ERR_OK - OK
**                           - ERR_NOTAVAIL - Desired program/erase
**                           operation is not available
**                           - ERR_RANGE - Address is out of range
**                           - ERR_VALUE - Read value is not equal to
**                           written value
**                           - ERR_SPEED - This device does not work
**                           in the active speed mode
** ===================================================================
*/

byte IFsh1_SetWordFlash(word Addr,word Data);
/*
** ===================================================================
**     Method      :  IFsh1_SetWordFlash (bean IntFLASH)
**
**     Description :
**         Write word to address in FLASH.
**     Parameters  :
**         NAME            - DESCRIPTION
**         Addr            - Address to FLASH.
**         Data            - Data to write.
**     Returns     :
**         ---             - Error code, possible codes:
**                           - ERR_OK - OK
**                           - ERR_NOTAVAIL - Desired program/erase
**                           operation is not available
**                           - ERR_RANGE - Address is out of range
**                           - ERR_VALUE - Read value is not equal to
**                           written value
**                           - ERR_SPEED - This device does not work
**                           in the active speed mode
** ===================================================================
*/

/*
** ===================================================================
**     Method      :  IFsh1_Init (bean IntFLASH)
**
**     Description :
**         Description_Init - Initializes the associated peripheral(s) 
**         and the bean's 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.
** ===================================================================
*/
void IFsh1_Init(void);

/* END IFsh1. */

#endif /* ifndef __IFsh1 */
/*
** ###################################################################
**
**     This file was created by UNIS Processor Expert 2.98 [03.80]
**     for the Freescale HCS08 series of microcontrollers.
**
** ###################################################################
*/
