Boards Component
The communication bus component (Bus) is a set of application-layer code built on top of the ESP-IDF peripheral driver code, including i2c_bus
, spi_bus
and etc. It is mainly used for bus communication between ESP chips and external devices. From the point of application development, this component has the following features:
Simplified peripheral initialization processes
Thread-safe device operations
Simple and flexible RW operations
This component abstracts the following concepts:
Bus: the resource and configuration option shared between devices during communication
Device: device specific resource and configuration option during communication
Each physical peripheral bus can mount one or more devices if the electrical condition allows, with the SPI bus addressing devices based on CS pins and the I2C bus addressing devices based on their addresses, thus achieving software independence between different devices on the same bus.