|
|
View previous topic :: View next topic |
Author |
Message |
tduttagupta Guest
|
Problem with a code |
Posted: Sat Feb 10, 2007 1:45 am |
|
|
Hey guys i am having problems in running an example code in the CCS compiler.
The code is for recieving ehternet packets
#include <18f6722.h>
#use delay(clock=40000000)
#use rs232(baud=9600, xmit=PIN_C6,rcv=PIN_C7)
#fuses H4,NOWDT,NOLVP,NODEBUG
#define STACK_USE_CCS_PICNET TRUE
#define STACK_USE_MAC TRUE
#include "drivers\stacktsk.c"
void MACDisplayHeader(MAC_ADDR *mac , int8 type)
{
int8 i;
printf("\r\nMAC: ");
for(i=0;i<6>v[i]);
if(i!=5)
putc(':');
}
printf (" prot:0*08%x ",type);
if(type==MAC_IP)
printf("[ip]");
else if(type==MAC_ARP)
printf("[arp]");
}
void main(void)
{
MAC_ADDR mac;
int8 type;
printf("\r\n\n this the the tcp/ip tutorial\n\n");
MACInit();
while(true)
{
if(MACGetHeader(&mac,&type)){
if(type!=MAC_UNKNOWN){
MACDisplayHeader(&mac,type);
}
();//////Here lies the problem. I have to pass some number through it. But in the book its written clearly that you are not supposed to pass any value. It should work like this only. But mine is showing errors
Any suggestions?? |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Sat Feb 10, 2007 7:22 am |
|
|
I have no clue as to what your problem is.
Quote: | ();//////Here lies the problem. | Where is 'here'? Are you reffering to the parameter list of MACinit()?
Quote: | But in the book its written clearly that... | Which book? I know only of one book that is reffered to as 'The Book', but that book is not about computers.
Which TCP-IP stack software are you using?
Than, some more notes:
- When posting code please use the 'Code' buttons to preserve the layout, it makes for easier reading to us.
- Always post your compiler version and processor type. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|