Our great sponsors
-
stm32l0xx-hal
A hardware abstraction layer (HAL) for the STM32L0 series microcontrollers written in Rust
-
awesome-embedded-rust
Curated list of resources for Embedded and Low-level development in the Rust programming language
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Once you can program the microcontroller with your toolchain (cargo, rustc, and cargo-embed or cargo-flash for programming), I would look at the stm32l0x3-hal repository example SPI code. There's also a more advanced example using DMA for data transfer instead of the blocking read and write calls.
However, before you do that, I recommend you look at other embedded Rust device drivers. That list has one existing SPI ADC driver for the MCP3008, depending on how different your ADC chip is you may be able to use that driver as a starting point. In fact, there's even a blog post on writing platform agnostic Rust drivers using the MCP3008 as an example!