a9803f4711
Zephyr v3.7.0 added a new feature to allow getting devices by their devicetree node labels. Use this feature in the MicroPython Zephyr port to simplify constructing machine module objects, including Pin, SPI, I2C, and UART. It's still possible to use the more verbose device names (e.g., gpio@400ff040, i2c@40066000, spi@4002c000), but now we can also use their devicetree node labels (e.g., gpiob, i2c0, spi0). Node labels aren't standardized across all SoC families because they generally try to follow their respective SoC hardware user manual naming convention, however many boards define common labels for devices routed to Arduino headers (e.g., arduino_i2c, arduino_serial, and arduino_spi). That means I2C("arduino_i2c") will work on quite a few boards (>100 in the main Zephyr tree). Signed-off-by: Maureen Helm <maureen.helm@analog.com> |
||
---|---|---|
.. | ||
tutorial | ||
general.rst | ||
quickref.rst |