You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Awesome, glad you're diving in :)

    Where are the parameters, and how could I interpret those ?

    They're generated by scripts/build_jswrapper.py in Espruino itself - you can use anything that some other function in Espruino uses. At the moment this is:

    ...
    edit: no longer relevant - 1v61 handles all different types
    ...
    

    I'll be trying to change this though, so that Espruino can take a much larger variety of types.

    Big question, as far as I can see, r0 is used in the example for input and return value

    It's the way values are passed to functions on ARM: http://en.wikipedia.org/wiki/Calling_convention#ARM

    Would it be possible to have something like a list of "interesting entrypoints". There is something like spi_sender_software in jswrap_spi_i2c.c This could be an additional file created during compilation of new version, and could be used similiar to boardinfo.

    If you compile yourself, there's espruino_1v##_espruino_1r3.lst which actually has this in - I guess this could be included in the binaries folder. IMO it might be more sensible if Espruino itself could return a list of these functions and then the assembler could load them in.

    This would be way more useful if/when someone gets a C compiler working though. For now it would probably be easier (maybe even faster) to do SPI in software.

About

Avatar for Gordon @Gordon started