3 ms·
The docs page linked is, as expected, about language and syntax basics. Is there an example of it in use in a project, eg with interrupts, GPIO, bus access, DMA
by the__alchemist 5y ago
The docs page linked is, as expected, about language and syntax basics. Is there an example of it in use in a project, eg with interrupts, GPIO, bus access, DMA etc? There are a few examples on the Github, but they're terse.
What does performing an SPI etc operation look like? How will syntax for things like this map to MCU hardware? Eg built in to the language, or with HAL and peripheral access libs etc?
What makes it specifically targeted at IoT vice general embedded? RF support built into the standard lib? Security features, eg like nRF-53 and Cortex-M33?
- ErikCorry 5y agoAs an example, here's the driver for small TFT screens of the type that is built into the M5Stack. This is an SPI-attached device: https://github.com/toitware/toit-color-tft/blob/main/src/color_tft.toit https://github.com/toitware/toit-color-tft/blob/main/src/col... If you just have an M5Stack Core2 and want to play with it, then you don't need to write a new driver though. Probably you want the examples from this package: https://pkg.toit.io/package/github.com%2Ftoitware%2Ftoit-m5stack-core2@v1.1.0 https://pkg.toit.io/package/github.com%2Ftoitware%2Ftoit-m5s... (The implementation of that package in the src directory is an example of using an I2C peripheral.)
- akavel 5y agoHow many bytes of bytecode & any envelope does this file compile to? Together with the include'd deps vs. alone without them? How many bytes does the VM interpreter & runtime take?