CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Problem with a code

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
tduttagupta
Guest







Problem with a code
PostPosted: Sat Feb 10, 2007 1:45 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Feb 10, 2007 7:22 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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