imxrt-rs / imxrt-hal

Rust for NXP i.MX RT
Apache License 2.0
133 stars 33 forks source link

Demonstrate basic LPSPI peripheral functions #159

Closed mciantyre closed 3 months ago

mciantyre commented 4 months ago

Use set_peripheral_enable to transition the LPSPI driver from a controller into a peripheral. You can then use the lower-level LPSPI interface to coordinate I/O.

The PR includes two examples that you can run on physically-connected boards. See the example documentation for more info. I tested the LPSPI device behavior by running the _peripheral example on a 1010EVK and the _controller example on a 1170EVK. I'm eagerly updating the pin configurations for other boards.

Inspired by discussions here.