How does smartBASIC control hardware interfaces (such as SPI and UART)?
The smart BASIC includes an orthogonal API for UART, I2C, SPI, and VSP. The functions provided to control the interfaces are xOPEN(), xREAD(), and xWRITE(), where x is either UART, I2C, SPI, or VSP. This makes opening and using these interfaces easy.
When data arrives over one of the interfaces, events are thrown into the smart BASIC runtime engine and you may write handlers to service the triggering of an event.