SPI1 onInit()

Posted on
  • Just tried the following:

    var onInit = function () {
         SPI1.setup({sck:A5,miso:A6,mosi:A7});
         SPI1.send([0x90],A4);
    };
    

    when I call onInit() it gives

    ERROR: Got EOF expected '}' at line 3 col 25
          SPI1.send([0x90,0],A4);
                                                        ^
    

    Any ideas?

    Using Espruino 1v44 on the HY 3.2"

  • Yes, sadly it's a huge regression in that version of Espruino that causes it to leave off the last few characters of the function.

    It should have been fixed in last night's nightly build, but because of the filename change, that hasn't appeared!

    For now, type:

    var onInit = function () {
         SPI1.setup({sck:A5,miso:A6,mosi:A7});
         SPI1.send([0x90],A4);
    };123
    

    If you add a few characters after every function definition then you'll be fine.

    Sorry about that - everything is in flux at the moment. I'm trying really hard to get everything ready for KickStarter and I don't have time to make sure everything works on cutting edge git all the time.

  • OK, many thanks. I'll backoff with any problems for a while, to let you sort things out.

    Excellent project !!!

  • Actually, Ganehag just fixed the nightly builds. You could try this one:

    https://espruino-nightly.noda.se/2013-12­-13/

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

SPI1 onInit()

Posted by Avatar for user6204 @user6204

Actions