Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
encx24j600_defines.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2015 Ell-i open source co-operative
3
* Kaspar Schleiser <kaspar@schleiser.de>
4
*
5
* This file is subject to the terms and conditions of the GNU Lesser General
6
* Public License v2.1. See the file LICENSE in the top level directory for more
7
* details.
8
*/
9
10
#pragma once
11
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
30
#define ENC_RCR 0x00
/* read control register */
31
#define ENC_WCR 0x04
/* write control register */
32
33
#define ENC_RCRU 0x20
/* read control register unbanked */
34
#define ENC_WCRU 0x22
/* write control register unbanked */
35
36
#define ENC_BFSU 0x24
/* set bits unbanked */
37
#define ENC_BFCU 0x26
/* clear bits unbanked */
38
39
#define ENC_RGPDATA 0x28
/* Read EGPDATA */
40
#define ENC_WGPDATA 0x2a
/* Write EGPDATA */
41
42
#define ENC_RRXDATA 0x2c
/* Read ERXDATA */
43
#define ENC_WRXDATA 0x2e
/* Write ERXDATA */
44
45
#define ENC_RUDADATA 0x30
/* Read EUDADATA */
46
#define ENC_WUDADATA 0x32
/* Write EUDADATA */
47
48
#define ENC_BFS 0x80
/* Bit Field Set */
49
#define ENC_BFC 0xa0
/* Bit Field Clear */
50
51
#define ENC_SETETHRST 0xca
/* System Reset */
52
#define ENC_SETPKTDEC 0xcc
/* Decrements PKTCNT by setting PKTDEC (ECON1<5>) */
53
#define ENC_ENABLERX 0xe8
/* Enables packet reception by setting RXEN (ECON1<0>) */
54
#define ENC_DISABLERX 0xea
/* Disable packet reception by clearing RXEN (ECON1<0>) */
55
#define ENC_SETEIE 0xec
/* Enable Ethernet Interrupts by setting INT (ESTAT<16>) */
56
#define ENC_CLREIE 0xee
/* Disable Ethernet Interrupts by clearing INT (ESTAT<16>) */
57
58
#define ENC_B0SEL 0xc0
/* select bank 0 */
59
#define ENC_B1SEL 0xc2
/* select bank 0 */
60
#define ENC_B2SEL 0xc4
/* select bank 0 */
61
#define ENC_B3SEL 0xc6
/* select bank 0 */
62
#define ENC_RBSEL 0xc8
/* Read Bank Select */
63
64
#define ENC_SETTXRTS 0xd4
/* Sets TXRTS (ECON1<1>), sends an Ethernet packet */
71
#define ENC_ETXST 0x00
72
#define ENC_ETXLEN 0x02
73
#define ENC_ERXST 0x04
74
#define ENC_ERXTAIL 0x06
75
#define ENC_ERXHEAD 0x08
76
#define ENC_ETXSTAT 0x12
77
#define ENC_ETXWIRE 0x14
78
#define ENC_EUDAST 0x16
79
#define ENC_ESTAT 0x1a
80
#define ENC_EIR 0x1c
/* Interrupt Flag Register */
81
#define ENC_ECON1 0x1e
82
83
#define ENC_ERXFCON 0x34
/* Receive filter control register */
84
85
#define ENC_MACON2 0x42
86
#define ENC_MAMXFL 0x4a
/* MAC maximum frame length */
87
88
#define ENC_MAADR3 0x60
/* MAC address byte 5&6 */
89
#define ENC_MAADR2 0x62
/* MAC address byte 3&4 */
90
#define ENC_MAADR1 0x64
/* MAC address byte 1&2 */
91
92
#define ENC_MIWR 0x66
93
#define ENC_MIREGADR 0x54
94
95
#define ENC_ECON2 0x6e
96
97
#define ENC_EIE 0x72
/* Interrupt Enable Register */
98
99
#define ENC_EGPRDPT 0x86
/* General Purpose SRAM read pointer */
100
#define ENC_EGPWRPT 0x88
/* General Purpose SRAM write pointer */
101
102
#define ENC_ERXRDPT 0x8a
/* RX buffer read pointer */
103
#define ENC_ERXWRPT 0x8c
/* RX buffer write pointer */
113
#define ENC_PHCON1 0x00
114
#define ENC_PHSTAT1 0x01
115
#define ENC_PHANA 0x04
116
#define ENC_PHANLPA 0x05
117
#define ENC_PHANE 0x06
118
#define ENC_PHCON2 0x11
119
#define ENC_PHSTAT2 0x1b
120
#define ENC_PHSTAT3 0x1f
127
#define ENC_PHYLNK (1<<8)
128
#define ENC_CLKRDY (1<<12)
135
#define ENC_RXEN (1<<0)
136
#define ENC_TXRTS (1<<1)
137
#define ENC_DMANOCS (1<<2)
138
#define ENC_DMACSSD (1<<3)
139
#define ENC_DMACPY (1<<4)
140
#define ENC_DMAST (1<<5)
141
#define ENC_FCOP0 (1<<6)
142
#define ENC_FCOP1 (1<<7)
143
#define ENC_PKTDEC (1<<8)
144
#define ENC_AESOP0 (1<<9)
145
#define ENC_AESOP1 (1<<10)
146
#define ENC_AESST (1<<11)
147
#define ENC_HASHLST (1<<12)
148
#define ENC_HASHOP (1<<13)
149
#define ENC_HASHEN (1<<14)
150
#define ENC_MODEXST (1<<15)
157
#define ENC_ETHRST (1<<4)
158
#define ENC_AUTOFC (1<<7)
/* automatic flow control enable bit */
165
#define ENC_PCFULIE (1<<0)
166
#define ENC_RXABTIE (1<<1)
167
#define ENC_TXABTIE (1<<2)
168
#define ENC_TXIE (1<<3)
169
#define ENC_DMAIE (1<<5)
170
#define ENC_PKTIE (1<<6)
171
#define ENC_LINKIE (1<<11)
172
#define ENC_AESIE (1<<12)
173
#define ENC_HASHIE (1<<13)
174
#define ENC_MODEXIE (1<<14)
175
#define ENC_INTIE (1<<15)
182
#define ENC_PCFULIF (1<<0)
183
#define ENC_RXABTIF (1<<1)
184
#define ENC_TXABTIF (1<<2)
185
#define ENC_TXIF (1<<3)
186
#define ENC_DMAIF (1<<5)
187
#define ENC_PKTIF (1<<6)
188
#define ENC_LINKIF (1<<11)
189
#define ENC_AESIF (1<<12)
190
#define ENC_HASHIF (1<<13)
191
#define ENC_MODEXIF (1<<14)
192
#define ENC_CRYPTEN (1<<15)
199
#define ENC_MCEN (1<<1)
202
#ifdef __cplusplus
203
}
204
#endif
Generated on Mon Jun 30 2025 18:46:45 by
1.9.1