I'm trying to convert the code for the OLED 128 from spin to C.
the function Fxn takes only 3 parameters:
- nb of arg
- command
- first adress of argument
With that it can be called with higher function with several parameter. see code below with function Drawcircle
How can it be translated correctly to C ?
this line cause me some problem :
the function Fxn takes only 3 parameters:
- nb of arg
- command
- first adress of argument
With that it can be called with higher function with several parameter. see code below with function Drawcircle
How can it be translated correctly to C ?
this line cause me some problem :
SendData(long[ArgAddress][index++])
pri Fxn(argCount,Command,ArgAddress)|index SendData(Command) index := 0 repeat argCount SendData(long[ArgAddress][index++]) ''Main Function to communicate with various methods result := ser.CharIn ''associated with the uOLED display pub DrawCircle(X,Y,R,Co) {{ Description: draws a circle with center at X,Y with radius R using the specified color }} _Ack := Fxn(4,Cmd_gfx_Circle,@X) pri SendData(Data) ''Send Word variable to the uOLED display ser.char(Data.byte[1]) ser.char(Data.byte[0])