eeprom.h

Go to the documentation of this file.
00001 #include "t89c51cc02.h"
00002 #include "datatypes.h"
00003 
00004 /* structure of data within eeprom: 
00005  * WORD CANID for recieving
00006  * WORD CANID for sending
00007  * LONG binary status of monitored sensors
00008  * LONG binary status of monitoring directions
00009  * For all 18 sensors:
00010  *  WORD boundary for sensor
00011  * BYTE checksum
00012  */
00015 #define EEPROM_CANID_RECV 0
00016 
00017 #define EEPROM CANID_SEND 2
00018 
00019 #define EEPROM_MONITOR 4
00020 
00021 #define EEPROM_DIRECTION 8
00022 
00023 #define EEPROM_BOUNDARY 12
00024 
00025 #define EEPROM_CHECKSUM 48
00026 
00027 #define EEPROM_wait() while((EECON&MSK_EECON_EEBUSY)!=0)
00028 
00029 BYTE EEPROM_read(BYTE);
00030 void EEPROM_write(BYTE,BYTE);
00031 void EEPROM_flush(void);
00032 

Generated on Wed Oct 24 12:57:24 2007 for SensorControl by  doxygen 1.4.6