📄 tcpip.lst
字号:
##############################################################################
# #
# IAR MSP430 C/C++ Compiler V3.41C/W32 [Kickstart] 08/May/2009 10:30:09 #
# Copyright 1996-2006 IAR Systems. All rights reserved. #
# #
# __rt_version = 2 #
# __double_size = 32 #
# __reg_r4 = free #
# __reg_r5 = free #
# __pic = no #
# __core = 64kb #
# Source file = F:\rf\参考资料\NET430\Internet\slaa137a\tcpip.c #
# Command line = F:\rf\参考资料\NET430\Internet\slaa137a\tcpip.c #
# --preprocess F:\rf\参考资料\NET430\Internet\slaa137a\D #
# ebug\List\ -lCN F:\rf\参考资料\NET430\Internet\slaa137 #
# a\Debug\List\ -o F:\rf\参考资料\NET430\Internet\slaa13 #
# 7a\Debug\Obj\ -s3 --no_cse --no_unroll --no_inline #
# --no_code_motion --no_tbaa --debug -e --double=32 -I #
# "D:\Program Files\IAR Systems\Embedded Workbench #
# 4.0\430\INC\" -I "D:\Program Files\IAR #
# Systems\Embedded Workbench 4.0\430\INC\CLIB\" #
# List file = F:\rf\参考资料\NET430\Internet\slaa137a\Debug\List\tcp #
# ip.lst #
# Object file = F:\rf\参考资料\NET430\Internet\slaa137a\Debug\Obj\tcpi #
# p.r43 #
# #
# #
##############################################################################
F:\rf\参考资料\NET430\Internet\slaa137a\tcpip.c
1 //------------------------------------------------------------------------------
2 // Name: tcpip.c
3 // Func: implements the TCP/IP-stack and provides an API
4 // Ver.: 1.1
5 // Date: January 2004
6 // Auth: Andreas Dannenberg
7 // MSP430 Applications
8 // Texas Instruments Inc.
9 // Rem.: -
10 //------------------------------------------------------------------------------
11
12 #include "msp430x14x.h"
\ In segment DATA16_AN, at 0x12e
\ unsigned short const volatile __data16 TAIV
\ TAIV:
\ 000000 DS8 2
\ In segment DATA16_AN, at 0x160
\ unsigned short volatile __data16 TACTL
\ TACTL:
\ 000000 DS8 2
\ In segment DATA16_AN, at 0x170
\ unsigned short volatile __data16 TAR
\ TAR:
\ 000000 DS8 2
\ In segment DATA16_AN, at 0x57
\ unsigned char volatile __data16 BCSCTL1
\ BCSCTL1:
\ 000000 DS8 1
13 #include "support.h"
14 #include "cs8900.h"
15 #include "tcpip.h"
16
17 // constants
\ In segment DATA16_C, align 2, align-sorted
18 const unsigned int MyIP[] = // "MYIP1.MYIP2.MYIP3.MYIP4"
\ MyIP:
\ 000000 C0A8001E DC16 43200, 7680
19 {
20 MYIP_1 + (unsigned int)(MYIP_2 << 8),
21 MYIP_3 + (unsigned int)(MYIP_4 << 8)
22 };
23
\ In segment DATA16_C, align 2, align-sorted
24 const unsigned int SubnetMask[] = // "SUBMASK1.SUBMASK2.SUBMASK3.SUBMASK4"
\ SubnetMask:
\ 000000 FFFFFF00 DC16 65535, 255
25 {
26 SUBMASK_1 + (unsigned int)(SUBMASK_2 << 8),
27 SUBMASK_3 + (unsigned int)(SUBMASK_4 << 8)
28 };
29
\ In segment DATA16_C, align 2, align-sorted
30 const unsigned int GatewayIP[] = // "GWIP1.GWIP2.GWIP3.GWIP4"
\ GatewayIP:
\ 000000 C0A80001 DC16 43200, 256
31 {
32 GWIP_1 + (unsigned int)(GWIP_2 << 8),
33 GWIP_3 + (unsigned int)(GWIP_4 << 8)
34 };
35
36 // variables
\ In segment DATA16_Z, align 1, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
37 static TTCPStateMachine TCPStateMachine; // perhaps the most important var at all ;-)
\ TCPStateMachine:
\ 000000 DS8 1
\ In segment DATA16_Z, align 1, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
38 static TLastFrameSent LastFrameSent; // retransmission type
\ LastFrameSent:
\ 000000 DS8 1
39
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
40 static unsigned int ISNGenHigh; // upper word of our Initial Sequence Number
\ ISNGenHigh:
\ 000000 DS8 2
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
41 static unsigned long TCPSeqNr; // next sequence number to send
\ TCPSeqNr:
\ 000000 DS8 4
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
42 static unsigned long TCPUNASeqNr; // last unaknowledged sequence number
\ TCPUNASeqNr:
\ 000000 DS8 4
43 // incremented AFTER sending data
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
44 static unsigned long TCPAckNr; // next seq to receive and ack to send
\ TCPAckNr:
\ 000000 DS8 4
45 // incremented AFTER receiving data
\ In segment DATA16_Z, align 1, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
46 static unsigned char TCPTimer; // inc'd each 262ms
\ TCPTimer:
\ 000000 DS8 1
\ In segment DATA16_Z, align 1, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
47 static unsigned char RetryCounter; // nr. of retransmissions
\ RetryCounter:
\ 000000 DS8 1
48
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
49 static unsigned int TxFrame1Size; // bytes to send in TxFrame1
\ TxFrame1Size:
\ 000000 DS8 2
\ In segment DATA16_Z, align 1, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
50 static unsigned char TxFrame2Size; // bytes to send in TxFrame2
\ TxFrame2Size:
\ 000000 DS8 1
\ In segment DATA16_Z, align 1, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
51 static unsigned char TransmitControl;
\ TransmitControl:
\ 000000 DS8 1
\ In segment DATA16_Z, align 1, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
52 static unsigned char TCPFlags;
\ TCPFlags:
\ 000000 DS8 1
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
53 unsigned int TCPRxDataCount; // nr. of bytes rec'd
\ TCPRxDataCount:
\ 000000 DS8 2
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
54 unsigned int TCPTxDataCount; // nr. of bytes to send
\ TCPTxDataCount:
\ 000000 DS8 2
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
55 unsigned int TCPLocalPort; // TCP ports
\ TCPLocalPort:
\ 000000 DS8 2
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
56 unsigned int TCPRemotePort;
\ TCPRemotePort:
\ 000000 DS8 2
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
57 unsigned int RemoteMAC[3]; // MAC and IP of current TCP-session
\ RemoteMAC:
\ 000000 DS8 6
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
58 unsigned int RemoteIP[2];
\ RemoteIP:
\ 000000 DS8 4
\ In segment DATA16_Z, align 1, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
59 unsigned char SocketStatus;
\ SocketStatus:
\ 000000 DS8 1
60
61 // properties of the just received frame
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
62 static unsigned int RecdFrameLength; // CS8900 reported frame length
\ RecdFrameLength:
\ 000000 DS8 2
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
63 static unsigned int RecdFrameMAC[3]; // 48 bit MAC
\ RecdFrameMAC:
\ 000000 DS8 6
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
64 static unsigned int RecdFrameIP[2]; // 32 bit IP
\ RecdFrameIP:
\ 000000 DS8 4
\ In segment DATA16_Z, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_zero
65 static unsigned int RecdIPFrameLength; // 16 bit IP packet length
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -