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

Wiznet w5500 driver port for pic24

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



Joined: 22 Aug 2017
Posts: 7

View user's profile Send private message

Wiznet w5500 driver port for pic24
PostPosted: Tue Nov 26, 2019 5:09 pm     Reply with quote

Has anyone out there tackled porting over wiznet's ioDriver for their w5500 ethernet chip to work with the CCS compiler? Their driver seems to be pretty stable and has been used on many platforms, but appears to use structures that contain references to functions and so I have been having problems getting the c code to compile. There could be other issues as well. I know this is going to be a painful, time consuming slog, and want to see if anyone has dealt with this yet.

I know there has been previous work done on their w5100 and w5200 for CCS which I previously used, but they have redone their library with the w5500 release.

Thanks,
Ben
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Wed Nov 27, 2019 2:52 am     Reply with quote

The structures are only a problem because they rely on a
way of doing things, that is common. This has been covered here before
CCS requires you to explicitly 'call' function pointers as laid out in K&R
rather than using the shortcut that most modern C's support.
If you have a function pointer 'pf', a lot of C's allow you to call this
simply as:

pf()

However CCS requires you to use:

(*pf)()

Now the latter was originally the preferred way of doing this and does
better reflect the actual type of pf. This is how CCS requires you to do it.

With this changed, you should find the code happily compiles.
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