
Alexis Morris wrote:
Hi all,
I have a number of driver related function calls that I would like to add as Primitive functions to yhc and yhi. For yhi (yhc\src\runtime\BCKernel) I have added definitions to Runtime.c and WrapPrimitive.c, in order to define and wrap stuff like "void display_string(void)" where the function is declared in a display.h/display.c file (this code controls the LCD display of the NXT).
So far I think I have this yhi part covered. My question is about where these primitives are made known to the compiler so I can make display_string visible to yhc programs. After adding this line to Primitive.hs yhc hangs...
---------------------------------------------------------------------------------------------------- -- NXT Display ----------------------------------------------------------------------------------------------------
foreign import fastccall display_string :: CString -> IO ()
Oh it really shouldn't hang! just adding the function to Primitive.hs should be enough. Send me the whole file and I'll have a go at compiling it myself, see if I can make anything of it :-) Cheers Tom