View previous topic :: View next topic |
Author |
Message |
Ben1172
Joined: 22 Aug 2017 Posts: 7
|
Wiznet w5500 driver port for pic24 |
Posted: Tue Nov 26, 2019 5:09 pm |
|
|
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: 19553
|
|
Posted: Wed Nov 27, 2019 2:52 am |
|
|
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. |
|
|
|