In my code I create the socket object like so:
UDPSocket sock(ð);
"eth" is of type EthernetInterface.
All is well for using the "sock" functions inside the function where I created the socket object, however I need to access the same socket to receive UDP packets in a different function.
It can't go with the other global variables because of the function in it, and I have tried setting UDPSocket socket;
in globals and then
UDPSocket s(ð);
sock = s;
This seems to crash the ARM device I am running it on. I don't want to create a UDPObject and then have to pass it as a parameter to every function every time they are called.