📄 iee1.h
字号:
/** ###################################################################
** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : IEE1.H
** Project : eeprom
** Processor : MC9S12HZ64CFU
** Beantype : IntEEPROM
** Version : Bean 02.177, Driver 01.19, CPU db: 2.87.443
** Compiler : CodeWarrior HC12 C Compiler
** Date/Time : 2008-12-15, 上午 11:04
** Abstract :
** This device "IntEEPROM" implements internal EEPROM
** Comment :
** The EEPROM array is organized as rows of word (2 bytes), the EEPROM block's
** erase sector size is 2 rows (2 words). Therefore it is preferable
** to use word aligned data for writting - methods SetWord and SetLong -
** with word aligned address.
** Driver expects that all security options of EEPROM are disabled.
** If some security option is enabled methods performing write
** operation (such as SetWord) can return error.
** Settings :
** EEPROM size : 1024 byte
** Initialization:
** Wait in methods : Disabled
** EEPROM clock : 181 kHz
**
** Contents :
** SetByte - byte IEE1_SetByte(IEE1_TAddress Addr, byte Data);
** GetByte - byte IEE1_GetByte(IEE1_TAddress Addr, byte *Data);
** SetWord - byte IEE1_SetWord(IEE1_TAddress Addr, word Data);
** GetWord - byte IEE1_GetWord(IEE1_TAddress Addr, word *Data);
** EraseEeprom - byte IEE1_EraseEeprom(IEE1_TAddress Addr);
**
** (c) Copyright UNIS, spol. s r.o. 1997-2007
** UNIS, spol. s r.o.
** Jundrovska 33
** 624 00 Brno
** Czech Republic
** http : www.processorexpert.com
** mail : info@processorexpert.com
** ###################################################################*/
#ifndef __IEE1
#define __IEE1
/* MODULE IEE1. */
#include "Cpu.h"
#ifndef __BWUserType_IEE1_TAddress
#define __BWUserType_IEE1_TAddress
/* User type for addressing of the EEPROM. Actual type depends on the CPU family. */
typedef word IEE1_TAddress; /* Type of address to the EEPROM */
#endif
#pragma CODE_SEG IEE1_CODE
/* EEPROM area start address (in the format used by bean methods). */
#define IEE1_AREA_START (2048)
/* EEPROM area last address (in the format used by bean methods). */
#define IEE1_AREA_END (3055)
/* EEPROM area size (in bytes). */
#define IEE1_AREA_SIZE 1008U
/* EEPROM area sector size: minimal erasable unit (in bytes). */
#define IEE1_AREA_SECTOR_SIZE 4U
/* EEPROM virtual page size (in bytes). */
/* TRUE if the bean setting allows clear bits of already programmed flash memory location without destruction of the value in surrounding addresses by sector erase. */
#define IEE1_ALLOW_CLEAR (TRUE)
/* Size of programming phrase, i.e. number of bytes that must be programmed at once */
#define IEE1_PROGRAMMING_PHRASE (2U)
#define EEPROMStart IEE1_AREA_START /* Start address of used EEPROM array */
#define EEPROMEnd IEE1_AREA_END /* End address of used EEPROM array */
byte IEE1_SetByte(IEE1_TAddress Addr,byte Data);
/*
** ===================================================================
** Method : IEE1_SetByte (bean IntEEPROM)
**
** Description :
** This method writes a given byte to a specified address in
** EEPROM. The method also sets address pointer for <SetActByte>
** and <GetActByte> methods (applicable only if these methods
** are enabled). The pointer is set to address passed as the
** parameter.
** Parameters :
** NAME - DESCRIPTION
** Addr - Address to EEPROM
** Data - Data to write
** Returns :
** --- - Error code, possible codes:
** - ERR_OK - OK
** - ERR_SPEED - the bean does not work in the
** active speed mode
** - ERR_BUSY - device is busy
** - ERR_VALUE - verification of written data
** failed (read value does not match with
** written value)
** - ERR_NOTAVAIL - other device-specific
** error
** - ERR_RANGE - parameter Addr is out of range
** ===================================================================
*/
byte IEE1_GetByte(IEE1_TAddress Addr,byte *Data);
/*
** ===================================================================
** Method : IEE1_GetByte (bean IntEEPROM)
**
** Description :
** This method reads a byte from a specified EEPROM address.
** The method also sets address pointer for <SetActByte> and
** <GetActByte> methods (applicable only if these methods are
** enabled). The pointer is set to address passed as the
** parameter.
** Parameters :
** NAME - DESCRIPTION
** Addr - EEPROM Address
** * Data - A pointer to the returned 8-bit data
** Returns :
** --- - Error code, possible codes:
** - ERR_OK - OK
** - ERR_BUSY - device is busy
** - ERR_RANGE - parameter Addr is out of range
** ===================================================================
*/
byte IEE1_SetWord(IEE1_TAddress Addr,word Data);
/*
** ===================================================================
** Method : IEE1_SetWord (bean IntEEPROM)
**
** Description :
** This method writes a given word (2 bytes) to the specified
** address in EEPROM. The method also sets address pointer for
** <SetActByte> and <GetActByte> methods (applicable only if
** these methods are enabled). The pointer is set to address
** passed as the parameter + 1.
** Parameters :
** NAME - DESCRIPTION
** Addr - Address to EEPROM
** Data - Data to write
** Returns :
** --- - Error code, possible codes:
** - ERR_OK - OK
** - ERR_SPEED - the bean does not work in the
** active speed mode
** - ERR_BUSY - device is busy
** - ERR_VALUE - verification of written data
** failed (read value does not match with
** written value)
** - ERR_NOTAVAIL - other device-specific
** error
** - ERR_RANGE - selected address out of the
** selected address range
** ===================================================================
*/
byte IEE1_GetWord(IEE1_TAddress Addr,word *Data);
/*
** ===================================================================
** Method : IEE1_GetWord (bean IntEEPROM)
**
** Description :
** This method reads a word (2 bytes) from the specified EEPROM
** address. The method also sets address pointer for
** <SetActByte> and <GetActByte> methods (applicable only if
** these methods are enabled). The pointer is set to address
** passed as the parameter + 1.
** Parameters :
** NAME - DESCRIPTION
** Addr - Address to EEPROM
** * Data - Pointer to returned 16-bit data
** Returns :
** --- - Error code, possible codes:
** - ERR_OK - OK
** - ERR_BUSY - device is busy
** - ERR_RANGE - selected address out of the
** selected address range
** ===================================================================
*/
byte IEE1_EraseEeprom(IEE1_TAddress Addr);
/*
** ===================================================================
** Method : IEE1_EraseEeprom (bean IntEEPROM)
**
** Description :
** The method mass erases all EEPROM memory. The method also
** sets address pointer for <SetActByte> and <GetActByte>
** methods (applicable only if these methods are enabled). The
** pointer is set to address passed as the parameter - 1.
** Parameters :
** NAME - DESCRIPTION
** Addr - Pass any valid EEPROM address. EEPROM
** module in some CPU families don't require
** address for mass erase, then the parameter
** is ignored.
** Returns :
** --- - Error code, possible codes:
** - ERR_OK - OK
** - ERR_SPEED - the bean does not work in the
** active speed mode
** - ERR_BUSY - device is busy
** - ERR_NOTAVAIL - other device-specific error
** ===================================================================
*/
void IEE1_Init(void);
/*
** ===================================================================
** Method : IEE1_Init (bean IntEEPROM)
**
** Description :
** Initializes the associated peripheral(s) and the bean 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.
** ===================================================================
*/
#pragma CODE_SEG DEFAULT
/* END IEE1. */
#endif /* ifndef __IEE1 */
/*
** ###################################################################
**
** This file was created by UNIS Processor Expert 2.98 [03.98]
** for the Freescale HCS12 series of microcontrollers.
**
** ###################################################################
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -