MakingThings
  • Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

eeprom.h

00001 /*********************************************************************************
00002 
00003  Copyright 2006-2008 MakingThings
00004 
00005  Licensed under the Apache License, 
00006  Version 2.0 (the "License"); you may not use this file except in compliance 
00007  with the License. You may obtain a copy of the License at
00008 
00009  http://www.apache.org/licenses/LICENSE-2.0 
00010  
00011  Unless required by applicable law or agreed to in writing, software distributed
00012  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
00013  CONDITIONS OF ANY KIND, either express or implied. See the License for
00014  the specific language governing permissions and limitations under the License.
00015 
00016 *********************************************************************************/
00017 
00018 /*
00019   EEPROM.h
00020   MakingThings
00021 */
00022 
00023 #ifndef EEPROM_H
00024 #define EEPROM_H
00025 
00026 #include "types.h"
00027 
00028 int Eeprom_SetActive( int state );
00029 int Eeprom_GetActive( void );
00030 
00031 int Eeprom_GetLastAddress( void );
00032 
00033 int Eeprom_Write( int address, uchar *buffer, int count );
00034 int Eeprom_Read( int address, uchar* buffer, int count );
00035 
00036 #define EEPROM_RESERVE_SIZE 1024
00037 #define EEPROM_SIZE ( 32 * 1024 )
00038 #define EEPROM_SYSTEM_BASE          ( EEPROM_SIZE - EEPROM_RESERVE_SIZE )
00039 #define EEPROM_SYSTEM_SERIAL_NUMBER   EEPROM_SYSTEM_BASE + 0
00040 #define EEPROM_SYSTEM_NOTUSED         EEPROM_SYSTEM_BASE + 4
00041 #define EEPROM_SYSTEM_NET_CHECK       EEPROM_SYSTEM_BASE + 8
00042 #define EEPROM_SYSTEM_NET_ADDRESS     EEPROM_SYSTEM_BASE + 12
00043 #define EEPROM_SYSTEM_NET_MASK        EEPROM_SYSTEM_BASE + 16
00044 #define EEPROM_SYSTEM_NET_GATEWAY     EEPROM_SYSTEM_BASE + 20
00045 #define EEPROM_SYSTEM_END             EEPROM_SYSTEM_BASE + 24
00046 #define EEPROM_POLY_0_TIMER_DURATION  EEPROM_SYSTEM_BASE + 28
00047 #define EEPROM_POLY_0_TIMER_SUSTAIN   EEPROM_SYSTEM_BASE + 32
00048 #define EEPROM_POLY_1_TIMER_DURATION  EEPROM_SYSTEM_BASE + 36
00049 #define EEPROM_POLY_1_TIMER_SUSTAIN   EEPROM_SYSTEM_BASE + 40
00050 #define EEPROM_POLY_0_FOLLOWER_RATE   EEPROM_SYSTEM_BASE + 44
00051 #define EEPROM_POLY_0_FOLLOWER_PEAK   EEPROM_SYSTEM_BASE + 48
00052 #define EEPROM_POLY_1_FOLLOWER_RATE   EEPROM_SYSTEM_BASE + 52
00053 #define EEPROM_POLY_1_FOLLOWER_PEAK   EEPROM_SYSTEM_BASE + 56
00054 #define EEPROM_POLY_0_OSCILLATOR_PERIODON  EEPROM_SYSTEM_BASE + 60
00055 #define EEPROM_POLY_0_OSCILLATOR_PERIODOFF EEPROM_SYSTEM_BASE + 64
00056 #define EEPROM_POLY_1_OSCILLATOR_PERIODON  EEPROM_SYSTEM_BASE + 68
00057 #define EEPROM_POLY_1_OSCILLATOR_PERIODOFF EEPROM_SYSTEM_BASE + 72
00058 #define EEPROM_OSC_UDP_LISTEN_PORT         EEPROM_SYSTEM_BASE + 76
00059 #define EEPROM_TCP_AUTOCONNECT     EEPROM_SYSTEM_BASE + 80
00060 #define EEPROM_TCP_OUT_ADDRESS     EEPROM_SYSTEM_BASE + 84
00061 #define EEPROM_TCP_OUT_PORT        EEPROM_SYSTEM_BASE + 88
00062 #define EEPROM_DHCP_ENABLED           EEPROM_SYSTEM_BASE + 92
00063 #define EEPROM_SYSTEM_NAME            EEPROM_SYSTEM_BASE + 96 // this is 100 bytes long
00064 #define EEPROM_WEBSERVER_ENABLED      EEPROM_SYSTEM_BASE + 196
00065 #define EEPROM_OSC_UDP_SEND_PORT      EEPROM_SYSTEM_BASE + 200
00066 #define EEPROM_OSC_ASYNC_DEST      EEPROM_SYSTEM_BASE + 204
00067 #define EEPROM_XBEE_AUTOSEND      EEPROM_SYSTEM_BASE + 208
00068 #define EEPROM_DIPSWITCH_AUTOSEND      EEPROM_SYSTEM_BASE + 212
00069 #define EEPROM_ANALOGIN_AUTOSEND      EEPROM_SYSTEM_BASE + 216
00070 #define EEPROM_OSC_ASYNC_INTERVAL      EEPROM_SYSTEM_BASE + 220
00071 
00072 #endif

The Make Controller Kit is an open source project maintained by MakingThings.
MakingThings code is released under the Apache 2.0 license.
Bug tracker, development wiki and status can be found at http://dev.makingthings.com.
This document was last updated on 18 May 2009.