| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- /************************************************************************
- Grt-Mars, Inc.
- 240 Sheffield Str.
- Mountainside, New Jersey 07092
- PROJECT : ProEX
- Author : Peter Strezev
- *******************************************************************************
- --------------------- EEPROM emulation headers -----------------------
- EEPROM emulator is used to store the irrigation programs in FLASH. Total of 4
- programs can be stored USER-A, USER-B, USER-C and Contractor. The 3 User programs
- can be recalled at any time by placing to Program Select switch in proper position.
- The Contractor program is only accessible through "SAVE" and "RESTORE" functions
- of the "Spetial Features" user interface menu.
- *******************************************************************************/
- #ifndef _EE_DATASET
- #define _EE_DATASET
- #include "stm32f10x_conf.h"
- #include "config.h"
- /*
- 笔记:
- 模拟1k,实际需要2k空间(2页交互使用)
- 能保存1k/2=512byte数据(另外512byte存地址)
- 注意:数据越小越好建议在1k/4=256byte内,这样才有意义
- <=256byte, 用1k
- <=512byte, 用2k
- */
- /* Virtual addresses for the FLASH variables */
- #define EE_ADDR_COMGATEWAY 0
- #define __disable_interrupt() __disable_irq()
- #define __enable_interrupt() __enable_irq()
- typedef enum
- {
- EE_DONE = 0,
- EE_BADVAR = 1,
- EE_BADPRG = 2,
- EE_BADPAGE = 0xAB,
- } tEEstat;
- void EEprom_Init ( void );
- void SaveDtuConfig ( unsigned short addr );
- void LoadDtuConfig ( unsigned short addr );
- #endif
|