/[H8]/trunk/PIC/TCP-IP stack/main.c
ViewVC logotype

Contents of /trunk/PIC/TCP-IP stack/main.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 65 - (show annotations) (download)
Tue May 1 13:59:04 2007 UTC (17 years, 1 month ago) by hedin
File MIME type: text/plain
File size: 720 byte(s)
TCPIP don't work. done some debug.
1 // main for tcp ip stack
2 #define THIS_IS_STACK_APPLICATION
3
4 #include "StackTsk.h"
5 #include "tick.h"
6 #include "Tcp.h"
7
8 APP_CONFIG AppConfig;
9
10 int global_network_int;
11 char global_network_char;
12
13 void network_send_hello( unsigned char termid)
14 {
15
16 switch(TCB[0].smState)
17 {
18 case SM_CONNECT:
19 Sock = TCPConnect(, 1234);
20 if( Sock == INVALID_SOCKET ){
21 return 1;
22 }
23 else
24 smState = SM_CONNECT_WAIT;
25 return;
26 case SM_CONNECT_WAIT:
27 if( TCPISConnected(Sock) ){
28 smState = SM_CONNECTED;
29 }
30 return;
31 }
32 }
33
34 void main()
35 {
36 TickInit();
37 StackInit(); // tcp,ud,mac,arp Init happends in StackInit();
38 while(1)
39 {
40 TickUpdate();
41 StackTask();
42 TCPTick();
43 }
44 }

  ViewVC Help
Powered by ViewVC 1.1.20