Subversion Repositories Spectranet

[/] [trunk/] [include/] [flashconf.inc] - Blame information for rev 570

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 winston
;The MIT License
2
;
3
;Copyright (c) 2008 Dylan Smith
4
;
5
;Permission is hereby granted, free of charge, to any person obtaining a copy
6
;of this software and associated documentation files (the "Software"), to deal
7
;in the Software without restriction, including without limitation the rights
8
;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
;copies of the Software, and to permit persons to whom the Software is
10
;furnished to do so, subject to the following conditions:
11
;
12
;The above copyright notice and this permission notice shall be included in
13
;all copies or substantial portions of the Software.
14
;
15
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
;THE SOFTWARE.
22
 
23
; This file simply contains some EQU values of some configuration
24
; information that may be stored in the last page of flash (i.e. nonvolatile)
25
; - things like our MAC address, IP address/netmask/gateway if statically
26
; set, whether to DHCP on boot.
27
;
28
; Note that at the hardware level, when modifying these values, the entire
29
; 16k flash sector must be copied to RAM, since the flash erase operation
30
; erases a minimum of one 16k sector. The modified image can then be
31
; copied back in. However, this does keep the chip count (and therefore
32
; PCB size down) if we don't need to battery back RAM or have an EEPROM.
33
;
34 73 winston
; These values are all offsets from the bottom of the paged in page.
35 27 winston
 
36 71 winston
CONFIGPAGE      equ 0x001F      ; chip 0 page 0x1F (the last page)
37 72 winston
CONF_RAM        equ 0x1F00      ; config area, when copied to RAM
38 224 winston
FS_CONF_RAM     equ 0x1D00      ; config area for FS in RAM
39 27 winston
 
40 224 winston
; Default filesystems - up to 4 can be mounted
41
DEF_FS_MOUNT0   equ 0x0D00
42
DEF_FS_MOUNTPT0 equ 0x0D00      ; mount point (0-3)
43
DEF_FS_PROTO0   equ 0x0D01      ; Protocol (null terminated, max 6)
44
DEF_FS_HOST0    equ 0x0D07      ; Hostname (max 41)
45
DEF_FS_SRCPTH0  equ 0x0D30      ; Source path (max 48)
46
DEF_FS_USER0    equ 0x0D60      ; Username (max 16)
47
DEF_FS_PASSWD0  equ 0x0D70      ; Passord (max 16)
48
 
49
DEF_FS_MOUNT1   equ 0x0D80
50
DEF_FS_MOUNTPT1 equ 0x0D80      ; mount point (0-3)
51
DEF_FS_PROTO1   equ 0x0D81      ; Protocol (null terminated, max 6)
52
DEF_FS_HOST1    equ 0x0D87      ; Hostname (max 41)
53
DEF_FS_SRCPTH1  equ 0x0DB0      ; Source path (max 48)
54
DEF_FS_USER1    equ 0x0DE0      ; Username (max 16)
55
DEF_FS_PASSWD1  equ 0x0DF0      ; Passord (max 16)
56
 
57
DEF_FS_MOUNT2   equ 0x0E00
58
DEF_FS_MOUNTPT2 equ 0x0E00      ; mount point (0-3)
59
DEF_FS_PROTO2   equ 0x0E01      ; Protocol (null terminated, max 6)
60
DEF_FS_HOST2    equ 0x0E07      ; Hostname (max 41)
61
DEF_FS_SRCPTH2  equ 0x0E30      ; Source path (max 48)
62
DEF_FS_USER2    equ 0x0E60      ; Username (max 16)
63
DEF_FS_PASSWD2  equ 0x0E70      ; Passord (max 16)
64
 
65
DEF_FS_MOUNT3   equ 0x0E80
66
DEF_FS_MOUNTPT3 equ 0x0E80      ; mount point (0-3)
67
DEF_FS_PROTO3   equ 0x0E81      ; Protocol (null terminated, max 6)
68
DEF_FS_HOST3    equ 0x0E87      ; Hostname (max 41)
69
DEF_FS_SRCPTH3  equ 0x0EB0      ; Source path (max 48)
70
DEF_FS_USER3    equ 0x0EE0      ; Username (max 16)
71
DEF_FS_PASSWD3  equ 0x0EF0      ; Passord (max 16)
72
 
73 27 winston
; TCP/IP settings. These are in the same order as the W5100's hardware
74
; registers so they can just be LDIR'd in.
75 426 winston
OFS_IP_GATEWAY  equ 0x0000      ; offset for gateway
76 73 winston
IP_GATEWAY      equ 0x0F00      ; Gateway address (4 bytes)
77 426 winston
OFS_IP_SUBNET   equ 0x0004      ; offset for subnet
78 73 winston
IP_SUBNET       equ 0x0F04      ; Subnet mask (4 bytes)
79 426 winston
OFS_HW_ADDRESS  equ 0x0008      ; offset for hardware address
80 73 winston
HW_ADDRESS      equ 0x0F08      ; Hardware address (MAC address: 6 bytes)
81 426 winston
OFS_IP_ADDRESS  equ 0x000E      ; offset to IP address
82 73 winston
IP_ADDRESS      equ 0x0F0E      ; IP address
83 27 winston
 
84
; A bit field of initialization flags, and the definition.
85 426 winston
OFS_INITFLAGS   equ 0x0012      ; offset to flags
86
INITFLAGS       equ 0x0F12      ; init flags
87 27 winston
INIT_STATICIP   equ 1           ; Static IP address configured
88
INIT_DISBLTRAP  equ 2           ; Disable RST 8 traps on startup
89
 
90 94 winston
; Hostname - a null terminated string, maximum 15 characters (16 bytes).
91 426 winston
OFS_HOSTNAME    equ 0x0013      ; offset to hostname string
92 94 winston
HOSTNAME        equ 0x0F13
93 73 winston
 
94 95 winston
; DNS servers, primary and secondary.
95
PRI_DNS         equ 0x0F24      ; IP address of primary DNS server
96
SEC_DNS         equ 0x0F28      ; IP address of secondary DNS server
97
 
98 72 winston
; 16 bit cyclic redundancy check, in case a botched flash write (say,
99
; power loss during flashing, or an uninitialized chip) so the user
100
; can get notification if all is not well.
101 73 winston
CONFIGCRC       equ 0x0FFE
102 72 winston