It's generally worth searching using google site:forum.espruino.com myKeywords as the forum's search is a bit noddy.
But yes, it's expecting that the contents of txBuffer will be read out via interrupt. Are you absolutely sure that the UART can't be fed from an interrupt, even if it's not exposed from the driver code. Pretty much every core I've seen has that capability.
There's a jshUSARTKick or similar function, which I guess could be called from that loop (and which could then do the USART send via polling). It's a pretty bad solution though - as Espruino needs a way to send characters while it's doing other stuff.
Or is this again a side-effect of the way the ESP8266 has its own RTOS. Maybe it does it's own output buffering and IRQ-driven output? If you did LED1=1;print("Hello World");LED1=0 in the ESP8266, would the LED go out before the text had finished sending? If so, you could actually change jshTransmit such that transmits to the UART don't ever go in txBuffer and just go straight to the ESP8266's RTOS.
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.
I actually wrote a little about this on the forum a week ago: http://forum.espruino.com/conversations/272743/#12452432
It's generally worth searching using google
site:forum.espruino.com myKeywords
as the forum's search is a bit noddy.But yes, it's expecting that the contents of
txBuffer
will be read out via interrupt. Are you absolutely sure that the UART can't be fed from an interrupt, even if it's not exposed from the driver code. Pretty much every core I've seen has that capability.There's a
jshUSARTKick
or similar function, which I guess could be called from that loop (and which could then do the USART send via polling). It's a pretty bad solution though - as Espruino needs a way to send characters while it's doing other stuff.Or is this again a side-effect of the way the ESP8266 has its own RTOS. Maybe it does it's own output buffering and IRQ-driven output? If you did
LED1=1;print("Hello World");LED1=0
in the ESP8266, would the LED go out before the text had finished sending? If so, you could actually changejshTransmit
such that transmits to the UART don't ever go in txBuffer and just go straight to the ESP8266's RTOS.