/[H8]/trunk/PIC/Demo trimmet/TFTPcDemo.c
ViewVC logotype

Diff of /trunk/PIC/Demo trimmet/TFTPcDemo.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 91 by hedin, Tue May 8 09:37:15 2007 UTC revision 92 by hedin, Wed May 16 09:24:33 2007 UTC
# Line 143  void main(void) Line 143  void main(void)
143      static TICK t = 0;      static TICK t = 0;
144      UDP_SOCKET usock1;      UDP_SOCKET usock1;
145      NODE_INFO rnode;      NODE_INFO rnode;
146        char datagrams_to_send = 10;
147      char sock_open = 0;      char sock_open = 0;
148      char is_resolved = 0;      char is_resolved = 0;
149                    
# Line 267  void main(void) Line 268  void main(void)
268                                  else                                  else
269                                  {                                  {
270                                          if (ARPIsResolved( &rnode.IPAddr, &rnode.MACAddr))                                          if (ARPIsResolved( &rnode.IPAddr, &rnode.MACAddr))
271                                            //if (MyArp( &rnode))
272                                          {                                          {
273                                                  usock1=UDPOpen(2000,&rnode,3000); // socket to send UDP                                                  usock1=UDPOpen(2000,&rnode,3000); // socket to send UDP
274                                                  sock_open=1;                                                  sock_open=1;
# Line 278  void main(void) Line 280  void main(void)
280                          }                          }
281                  }                  }
282                                    
283                  if (UDPIsPutReady(usock1))                  if (UDPIsPutReady(usock1) && datagrams_to_send>0)
284                  {                  {
285                          UDPPut( rnode.MACAddr.v[0] );                          UDPPut( rnode.MACAddr.v[0] );
286                          UDPPut( rnode.MACAddr.v[1] );                          UDPPut( rnode.MACAddr.v[1] );
# Line 291  void main(void) Line 293  void main(void)
293                          UDPPut('w');                          UDPPut('w');
294                          UDPPut(0);                          UDPPut(0);
295                          UDPFlush();                          UDPFlush();
296                            datagrams_to_send--;
297                  }                  }
298          }          }
299      }      }
# Line 512  void XLCDDelay100us(void) Line 515  void XLCDDelay100us(void)
515      Delay10us(1);      Delay10us(1);
516      INTCON_GIEH = 1;      INTCON_GIEH = 1;
517  }  }
518    
519    

Legend:
Removed from v.91  
changed lines
  Added in v.92

  ViewVC Help
Powered by ViewVC 1.1.20