Make cambus reinit standard for all boards

This commit is contained in:
Kwabena W. Agyeman 2021-03-14 15:49:08 -07:00
parent c1289deb02
commit 9e4bcb21fc

View File

@ -234,11 +234,9 @@ void sensor_init0()
{ {
dcmi_abort(); dcmi_abort();
#if defined(PORTENTA) || defined(OPENMVPT) // Always reinit cambus after soft reset which could have terminated the cambus in the middle
// These boards use the same I2C bus for the sensor and // of an I2C read/write.
// user scripts. The I2C bus must be reinitialized on soft-reset.
cambus_init(&sensor.bus, ISC_I2C_ID, ISC_I2C_SPEED); cambus_init(&sensor.bus, ISC_I2C_ID, ISC_I2C_SPEED);
#endif
// Disable VSYNC IRQ and callback // Disable VSYNC IRQ and callback
sensor_set_vsync_callback(NULL); sensor_set_vsync_callback(NULL);