source: uKadecot/trunk/uip/target/if_rx62n/if_rx62n.h@ 101

Last change on this file since 101 was 101, checked in by coas-nagasima, 8 years ago

TOPPERS/uKadecotのソースコードを追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/plain
File size: 4.3 KB
Line 
1/*
2 * TINET (TCP/IP Protocol Stack)
3 *
4 * Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
5 * Tomakomai National College of Technology, JAPAN
6 * Copyright (C) 2014 Cores Co., Ltd. Japan
7 *
8 * ã‹L’˜ìŒ ŽÒ‚́CˆÈ‰º‚Ì(1)`(4)‚ÌðŒ‚ð–ž‚½‚·ê‡‚ÉŒÀ‚èC–{ƒ\ƒtƒgƒEƒF
9 * ƒAi–{ƒ\ƒtƒgƒEƒFƒA‚ð‰ü•Ï‚µ‚½‚à‚Ì‚ðŠÜ‚ށDˆÈ‰º“¯‚¶j‚ðŽg—pE•¡»E‰ü
10 * •ÏEÄ”z•ziˆÈ‰ºC—˜—p‚ƌĂԁj‚·‚邱‚Ƃ𖳏ž‚Å‹–‘ø‚·‚éD
11 * (1) –{ƒ\ƒtƒgƒEƒFƒA‚ðƒ\[ƒXƒR[ƒh‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́Cã‹L‚Ì’˜ì
12 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’肪C‚»‚Ì‚Ü‚Ü‚ÌŒ`‚Ń\[
13 * ƒXƒR[ƒh’†‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚邱‚ƁD
14 * (2) –{ƒ\ƒtƒgƒEƒFƒA‚ðCƒ‰ƒCƒuƒ‰ƒŠŒ`Ž®‚ȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
15 * —p‚Å‚«‚éŒ`‚ōĔz•z‚·‚éê‡‚ɂ́CÄ”z•z‚É”º‚¤ƒhƒLƒ…
16ƒƒ“ƒgi—˜—p
17 * ŽÒƒ}ƒjƒ…
18ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L
19 * ‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
20 * (3) –{ƒ\ƒtƒgƒEƒFƒA‚ðC‹@Ší‚É‘g‚ݍž‚ނȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
21 * —p‚Å‚«‚È‚¢Œ`‚ōĔz•z‚·‚éê‡‚ɂ́CŽŸ‚Ì‚¢‚¸‚ê‚©‚ÌðŒ‚ð–ž‚½‚·‚±
22 * ‚ƁD
23 * (a) Ä”z•z‚É”º‚¤ƒhƒLƒ…
24ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
25ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜
26 * ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
27 * (b) Ä”z•z‚ÌŒ`‘Ô‚ðC•Ê‚É’è‚ß‚é•û–@‚É‚æ‚Á‚āCTOPPERSƒvƒƒWƒFƒNƒg‚É
28 * •ñ‚·‚邱‚ƁD
29 * (4) –{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚é‚¢‚©‚Ȃ鑹
30 * ŠQ‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð–Ɛӂ·‚邱‚ƁD
31 * ‚Ü‚½C–{ƒ\ƒtƒgƒEƒFƒA‚̃†[ƒU‚Ü‚½‚̓Gƒ“ƒhƒ†[ƒU‚©‚ç‚Ì‚¢‚©‚Ȃ闝
32 * —R‚ÉŠî‚­¿‹‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð
33 * –Ɛӂ·‚邱‚ƁD
34 *
35 * –{ƒ\ƒtƒgƒEƒFƒA‚́C–³•ÛØ‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚Å‚ ‚éDã‹L’˜ìŒ ŽÒ‚¨
36 * ‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚́C–{ƒ\ƒtƒgƒEƒFƒA‚ÉŠÖ‚µ‚āC“Á’è‚ÌŽg—p–Ú“I
37 * ‚ɑ΂·‚é“K‡«‚àŠÜ‚߂āC‚¢‚©‚È‚é•ÛØ‚às‚í‚È‚¢D‚Ü‚½C–{ƒ\ƒtƒgƒEƒF
38 * ƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚½‚¢‚©‚Ȃ鑹ŠQ‚ÉŠÖ‚µ‚Ä‚àC‚»
39 * ‚̐ӔC‚𕉂í‚È‚¢D
40 *
41 * @(#) $Id: if_rx62n.h 101 2015-06-02 15:37:23Z coas-nagasima $
42 */
43
44/*
45 * Copyright (C) 1993, David Greenman. This software may be used, modified,
46 * copied, distributed, and sold, in both source and binary form provided
47 * that the above copyright and these terms are retained. Under no
48 * circumstances is the author responsible for the proper functioning
49 * of this software, nor does the author assume any responsibility
50 * for damages incurred with its use.
51 */
52
53#ifndef _IF_RX62N_H_
54#define _IF_RX62N_H_
55
56/*
57 * ƒtƒB[ƒ‹ƒh’·
58 */
59
60#define ETHER_ADDR_LEN 6 /* Ethernet (MAC) Address */
61
62/*
63 * RX62N Ethernet Controler ‚ÉŠÖ‚·‚é’è‹`
64 */
65
66#define NUM_IF_RX62N_TXBUF 8 /* ‘—Mƒoƒbƒtƒ@” */
67#define NUM_IF_RX62N_RXBUF 8 /* ŽóMƒoƒbƒtƒ@” */
68#define IF_RX62N_BUF_PAGE_SIZE 1518 /* ƒoƒbƒtƒ@ƒTƒCƒY */
69
70/*
71 * NIC ‚Ì‘I‘ðƒ}ƒNƒ
72 */
73
74#define IF_ETHER_NIC_GET_SOFTC() rx62n_get_softc()
75#define IF_ETHER_NIC_WATCHDOG(i) rx62n_watchdog(i)
76#define IF_ETHER_NIC_PROBE(i) rx62n_probe(i)
77#define IF_ETHER_NIC_INIT(i) rx62n_init(i)
78#define IF_ETHER_NIC_LINK(i) rx62n_link(i)
79#define IF_ETHER_NIC_READ(i,b) rx62n_read(i,b)
80#define IF_ETHER_NIC_RESET(i) rx62n_reset(i)
81#define IF_ETHER_NIC_START(i,o,l) rx62n_start(i,o,l)
82
83#define T_IF_ETHER_NIC_SOFTC struct t_rx62n_softc
84struct t_if_softc {
85 //T_IF_ADDR ifaddr; /* ƒlƒbƒgƒ[ƒNƒCƒ“ƒ^ƒtƒF[ƒX‚̃AƒhƒŒƒX */
86 //uint16_t timer; /* ‘—Mƒ^ƒCƒ€ƒAƒEƒg */
87 T_IF_ETHER_NIC_SOFTC *sc; /* ƒfƒBƒoƒCƒXˆË‘¶‚̃\ƒtƒgƒEƒFƒAî•ñ */
88 uint8_t rxb_write;
89 uint8_t rxb_read;
90 bool_t link_pre;
91 bool_t link_now;
92 bool_t over_flow;
93 int udp_pos;
94};
95
96/* IPv6 ŠÖŒW */
97
98#define IF_ETHER_NIC_IN6_IFID(i,a) get_mac6_ifid(i,a) /* ƒCƒ“ƒ^ƒtƒF[ƒXŽ¯•ÊŽq‚̐ݒè */
99#define IF_ETHER_NIC_ADDMULTI(s) rx62n_addmulti(s) /* ƒ}ƒ‹ƒ`ƒLƒƒƒXƒgƒAƒhƒŒƒX‚Ì“o˜^ */
100
101#if !defined(TOPPERS_MACRO_ONLY) && !defined(_MACRO_ONLY)
102
103/*
104 * ‘O•ûŽQÆ
105 */
106
107#ifndef T_IF_SOFTC_DEFINED
108
109typedef struct t_if_softc T_IF_SOFTC;
110
111#define T_IF_SOFTC_DEFINED
112
113#endif /* of #ifndef T_IF_SOFTC_DEFINED */
114
115/*
116 * ŠÖ”
117 */
118
119extern T_IF_SOFTC *rx62n_get_softc(void);
120extern void rx62n_watchdog(T_IF_SOFTC *ic);
121extern void rx62n_probe(T_IF_SOFTC *ic);
122extern void rx62n_init(T_IF_SOFTC *ic);
123extern void rx62n_reset(T_IF_SOFTC *ic);
124extern bool_t rx62n_link(T_IF_SOFTC *ic);
125extern int rx62n_read(T_IF_SOFTC *ic, void **input);
126extern void rx62n_start(T_IF_SOFTC *ic, void *output, int size);
127extern ER rx62n_addmulti(T_IF_SOFTC *ic);
128extern void if_rx62n_trx_handler(void);
129
130#endif /* #if !defined(TOPPERS_MACRO_ONLY) && !defined(_MACRO_ONLY) */
131
132#endif /* of #ifndef _IF_RX62N_H_ */
Note: See TracBrowser for help on using the repository browser.