Merge pull request #1222 from kwagyeman/kwabena/cambus_reinit

Make cambus reinit standard for all boards
This commit is contained in:
Ibrahim Abd Elkader 2021-03-15 20:47:42 +02:00 committed by GitHub
commit c06775d99d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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