Both sensors have the same I2C address, so can't be enabled at the
same time. This patch tries to read a byte-sized address first,
if GC2145 chip id is not read back, then it retries reading wide
address. I tested this with RT1060 and H7 and I can detect the OV5640
fine.
sensor_dcmi_config function was called every time the pixel format changed,
and typically reconfigured the capture interface. This originated from the
stm32 port, which required reconfiguring the DCMI if the pixel format changed.
However, most ports only require configuring the capture interface once
during initialization (for example nrf, rp2 and mimxrt ports).
The new sensor_config function is called after a setting that may require
reconfiguring the hardware changes, such as such as window size, frame size,
or pixel format. The exact setting that has changed is passed to the function,
allowing ports to decide whether to do a full reconfiguration of the hardware,
or just ignore it based on the changed setting.
- Rename options more consistently.
- Add OMV prefix to every config option.
- Replace the ST-specific DCMI prefix with CSI.
- Remove the clock source defined in every header to a common enum.
- Remove obsolete board config options.
This patch removes the duplicated `sensor_abort()` logic in the stm32 and mimxrt ports.
This is done by adding a `flush_fifo` argument, which controls the flush operation, and
a `in_irq` argument , which indicates whether `sensor_abort()` is called from within an
IRQ context or not.
To support boards that have multiple devices on the camera bus,
the scan now uses a list to return all detected addresses, and
it will check them all for a valid sensor.
* Rename cambus to omv_i2c for consistency with other HALs.
* Rename sensor I2C handle from bus to i2c_bus to allow adding
another handle (ex spi_bus).
* Provide image sensor driver utility functions that can be used by all ports.
* Provide default (weak) functions that can be replaced by port-specific drivers.