eeprom.h

来自「ST7 Mcu eeprom setting and program sampl」· C头文件 代码 · 共 65 行

H
65
字号
/******************************************************************************
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 + =
减小字号Ctrl + -
显示快捷键?