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

📄 eeprom.h

📁 ST7 Mcu eeprom setting and program sample for learning
💻 H
字号:
/******************************************************************************
COPYRIGHT 2003 STMicroelectronics
Source File Name :  eeprom.h 
Group            : IPSW,CMG-IPDF
Author           : MCD Application Team
Date First Issued: 11/03/2002
********************************Documentation**********************************
General Purpose - Contains prototypes for all the functions of EEPROM

********************************Revision History*******************************
_______________________________________________________________________________
Date :11/03/2002       Release:1.0            	  
Date :23/09/2003       Release:2.0 		        		     
                       1. Removed the inclusion of eeprom_hr.h file.
                       2. Added Macro for one function.
                       3. Removed the prototype for the previous function.
                       4. Added necessary comments.
Date :28/04/04         MISRA changes
******************************************************************************/
#ifndef EEPROM_H                                 /* avoid multiple inclusion */
#define EEPROM_H                           

#include "ST7lib_config.h"	   		       /* Compiler selection */


/*---------------------------------------------------------------------------*/
                                             /* Programming Status parameter */
typedef enum { 
              EEPROM_PROG_COMPLETE = (unsigned char) 0x00,
              EEPROM_PROG_PROGRESS = (unsigned char) 0xFF
             }Prog_Status;
/*---------------------------------------------------------------------------*/
                  /* Description of all the functions defined in this module */
/* MACRO Defination */

                                             /* Macro for Initialising EECSR */
#define EEPROM_Init() ((EECSR) &= (0x00)) 
                                             
/* FUNCTION Prototypes */                                             

#ifdef _COSMIC_					/* for cosmic compiler	 */
              /* Reads data from EEPROM memory and store them in user buffer */              
void EEPROM_Read (unsigned char * PtrToUsrBuffer, unsigned char NbOfBytes, 
                  @near unsigned char * PtrToE2Buffer);
                    /* Writes data bytes from user buffer into EEPROm memory */
void EEPROM_Write (unsigned char * PtrToUsrBuffer, unsigned char NbOfBytes, 
                   @near unsigned char * PtrToE2Buffer);
#endif /* COSMIC */                   

#ifdef _HIWARE_					/* for Hiware Compiler	 */
              /* Reads data from EEPROM memory and store them in user buffer */              
void EEPROM_Read (unsigned char * PtrToUsrBuffer, unsigned char NbOfBytes, 
                  unsigned char * far PtrToE2Buffer);
                    /* Writes data bytes from user buffer into EEPROm memory */
void EEPROM_Write (unsigned char * PtrToUsrBuffer, unsigned char NbOfBytes, 
                   unsigned char * far PtrToE2Buffer);
#endif /* HIWARE */                  
 
/* Programs data from EEPROM latches to EEPROM cells and 
                                      returns the programming status to user */
Prog_Status EEPROM_Programming (void);                   

#endif   /* EEPROM_H */                                   
/**** (c) 2003   STMicroelectronics *************************** END OF FILE **/

⌨️ 快捷键说明

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