Looked at the sample code and here is where I stand.
Calling into the C method (RLP) is working well, i know i hit the right method as i get a hardcoded return value of 42 back from it.
I’m now trying to write to a single (hardcoded) pin from C, using
RLPext->GPIO.EnableOutputMode(41, 1);
RLPext->GPIO.WritePin(41, i % 2 == 0);
I got the value 41 from GetSocket(7,).CpuPins[5].
I’m printing out debug info the the Char display - and right after it called the C extention where I enable/write to the pin, the Cerb reboots (you can hear the windows usb unplug/plug back in-sound). Just returning a value 42 works fine tough.
Another thing is, with RLPLite you only have one Invoke method (with a few overloads).
ByteArray);
public int Invoke(float[] VoidArray, int[] IntArray, byte[] ByteArray);
public int Invoke(int[] VoidArray, int[] IntArray, byte[] ByteArray);
public int Invoke(sbyte[] VoidArray, int[] IntArray, byte[] ByteArray);
public int Invoke(uint[] VoidArray, int[] IntArray, byte[] ByteArray);
I don’t see how these maps over to C-style methods… and what the those
int StartLEDBlink(unsigned int *generalArray, void **args, unsigned int argsCount, unsigned int *argSize)
{
//
}
and even worse when you throw in stuff like void** foo[], and then again the examples cast that to char/byte arrays ???
I tried sending in very simple stuff from C# to C++, like
{ 43 });
when I try to grab the first object from the different params in the C method, i get nothing like those values back. Got somhting like 62 and 255 from the different params (If i recall correct).