esp32-edge-firmware
esp32-edge-firmware copied to clipboard
Introduce ports to handle tasks like device scan in a generic way
Currently there are special functions to scan for devices on serial and can ports. In my case the devices are connected by SPI. So I would have to add another special function and do some code duplication.
Instead introduce ports that have general functions to scan for devices that are connected to the ports and also for other functions. The ports may be modeled (similar to devices) with a generic structure that can be filled with the the special functions for a specific type of port. The structure should ideally be constant to not consume precious RAM in constrained devices.
The concept of port may be not only applied to downstream links but also to upstream links.