⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eeprom.h

📁 矿工定位系统单端
💻 H
字号:
//- code recommendation for C header file
/***********************************************************************
MODULE:    EEPROM
VERSION:   1.00
CONTAINS:  Routines for accessing the EEPROM on the Philips
           P89LPC932
COPYRIGHT: Embedded Systems Academy, Inc. - www.esacademy.com
LICENSE:   May be freely used in commercial and non-commercial code
           without royalties provided this copyright notice remains
           in this file and unaltered
WARNING:   IF THIS FILE IS REGENERATED BY CODE ARCHITECT ANY CHANGES
           MADE WILL BE LOST. WHERE POSSIBLE USE ONLY CODE ARCHITECT
           TO CHANGE THE CONTENTS OF THIS FILE
GENERATED: On "Mar 14 2004" at "11:02:25" by Code Architect 2.03
***********************************************************************/

#ifndef _EEPROMH_
#define _EEPROMH_

/***********************************************************************
DESC:    Initializes the EEPROM. Enables EEPROM interrupt
RETURNS: Nothing
CAUTION: Set EA to 1 after calling to enable all interrupts
************************************************************************/
extern void eeprom_init
  (
  void
  );

/***********************************************************************
DESC:    Reads a location in the EEPROM.
         If either global interrupts or the EEPROM interrupt is disabled
         then the function will return when the operation is complete.
         If global interrupts and the EEPROM interrupt are enabled, the
         function will return immediately and an interrupt will occur
         when the operation is complete.
RETURNS: The 8-bit value read if interrupts are disabled, otherwise
         0x00 will be returned.
CAUTION: eeprom_init must be called first
************************************************************************/
extern unsigned char eeprom_read
  (
  unsigned int address     // 9-bit address to read (0x000 - 0x1FF)
  );

/***********************************************************************
DESC:    Writes to a location in the EEPROM.
         If either global interrupts or the EEPROM interrupt is disabled
         then the function will return when the operation is complete.
         If global interrupts and the EEPROM interrupt are enabled, the
         function will return immediately and an interrupt will occur
         when the operation is complete.
RETURNS: Nothing
CAUTION: eeprom_init must be called first
************************************************************************/
extern void eeprom_write
  (
  unsigned int address,    // 9-bit address to write to (0x000 - 0x1FF)
  unsigned char value      // value to write
  );

/***********************************************************************
DESC:    Writes a value to every location in a 64-byte row in
         the EEPROM.
         If either global interrupts or the EEPROM interrupt is disabled
         then the function will return when the operation is complete.
         If global interrupts and the EEPROM interrupt are enabled, the
         function will return immediately and an interrupt will occur
         when the operation is complete.
RETURNS: Nothing
CAUTION: eeprom_init must be called first
************************************************************************/
extern void eeprom_fillrow
  (
  unsigned int address,    // 9-bit starting address of row
                           // (64-byte aligned)
  unsigned char value      // value to fill row with
  );

/***********************************************************************
DESC:    Writes a value to every location in the EEPROM.
         If either global interrupts or the EEPROM interrupt is disabled
         then the function will return when the operation is complete.
         If global interrupts and the EEPROM interrupt are enabled, the
         function will return immediately and an interrupt will occur
         when the operation is complete.
RETURNS: Nothing
CAUTION: eeprom_init must be called first
************************************************************************/
extern void eeprom_fill
  (
  unsigned char value      // value to fill EEPROM with
  );

/***********************************************************************
DESC:    Erases a 64-byte row in the EEPROM.
         If either global interrupts or the EEPROM interrupt is disabled
         then the function will return when the operation is complete.
         If global interrupts and the EEPROM interrupt are enabled, the
         function will return immediately and an interrupt will occur
         when the operation is complete.
         Equivalent to eeprom_fillrow(address, 0x00);
RETURNS: Nothing
CAUTION: eeprom_init must be called first
************************************************************************/
extern void eeprom_eraserow
  (
  unsigned int address      // 9-bit starting address of row
                            // (64-byte aligned)
  );

/***********************************************************************
DESC:    Erases the EEPROM.
         If either global interrupts or the EEPROM interrupt is disabled
         then the function will return when the operation is complete.
         If global interrupts and the EEPROM interrupt are enabled, the
         function will return immediately and an interrupt will occur
         when the operation is complete.
         Equivalent to eeprom_fill(0x00);
RETURNS: Nothing
CAUTION: eeprom_init must be called first
************************************************************************/
extern void eeprom_erase
  (
  void
  );

#endif // _EEPROMH_


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -