I like the fact that you can pass configuration settings in the options 'option'.
Yes - it's also a bit more verbose - nothing worse than connect(SPI,D3,true,false,true,true) :)
Personally I'd stick with two connect functions for SPI and I2C. It could be merged into one as you say (and maybe should have originally) but it's nice to try and keep modules all working the same way so it's more familiar to move between them.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes - it's also a bit more verbose - nothing worse than
connect(SPI,D3,true,false,true,true)
:)Personally I'd stick with two connect functions for SPI and I2C. It could be merged into one as you say (and maybe should have originally) but it's nice to try and keep modules all working the same way so it's more familiar to move between them.
Should just be: