Beat Küng
5fdff6a0e4
i2c drivers: add '-k' flag for keep_running directly to BusCLIArguments
4 years ago
Beat Küng
787f9c1213
i2c: use board-specific bus numbering for '-X -b <bus>' CLI
...
As boards don't have their external buses labeled consistently, it was not
useful to use an abstraction.
4 years ago
Beat Küng
4088c2581f
i2c_spi_buses: add '-q' for quiet startup flag ( #14969 )
...
* [WIP] i2c_spi_buses: add '-q' for quiet startup flag
And enable for optional board sensors.
* ROMFS: rc.sensors try starting all optional I2C sensors quietly
Co-authored-by: Daniel Agar <daniel@agar.ca>
5 years ago
Beat Küng
d3dd5e9da1
i2c_spi_buses: improve info output for external buses
5 years ago
Beat Küng
a556a44a57
i2c_spi_buses: print an error if a driver does not pass the I2C address
5 years ago
Beat Küng
d6bb5b3b9e
i2c spi buses: enforce drivers to set default SPI/I2C bus frequency
...
Not a lot of drivers use the global default, which is somewhat arbitrary.
5 years ago
Beat Küng
83b6f6456b
refactor I2CSPIInstance: store running instances in a global linked list
...
instead of a static per-driver array.
Reduces BSS RAM usage by a couple of 100 Bytes (linear increase with num
drivers).
Downsides:
- a bit more runtime overhead
- less isolation, locking required
- a bit more complex
5 years ago
Beat Küng
e7f04109d9
i2c spi init + custom methods: use WorkItemSingleShot
...
Use it for custom methods as well (like reset), and run by default on the
work queue, since they typically access the bus.
5 years ago
Beat Küng
134413233a
i2c spi: extend BusCLIArguments to handle common driver arguments
5 years ago
Beat Küng
f851f65f8d
i2c spi: add type to I2CSPIInstance
...
Needed to distinguish runtime instance types of the same driver (e.g.
bmi055 accel vs gyro).
5 years ago
Beat Küng
06712450a7
i2c+spi: add module base class and bus iterators
5 years ago