Looks like on each call of graphicsGetFromVar, graphicsSetCallbacks is called.
So its called very often.
My expectation was to set callbacks (fillRect, setPixel) only once during initialisation.
This would add an option to write my own drivers in C, which only set fillRect and setPixel.
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.
Looks like on each call of graphicsGetFromVar, graphicsSetCallbacks is called.
So its called very often.
My expectation was to set callbacks (fillRect, setPixel) only once during initialisation.
This would add an option to write my own drivers in C, which only set fillRect and setPixel.