mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Allow sensor_utils probe_init to take bus id/speed args.
This commit is contained in:
parent
c5364b6a90
commit
5ed5671423
@ -259,7 +259,7 @@ void sensor_init0();
|
|||||||
int sensor_init();
|
int sensor_init();
|
||||||
|
|
||||||
// Detect and initialize the image sensor.
|
// Detect and initialize the image sensor.
|
||||||
int sensor_probe_init();
|
int sensor_probe_init(uint32_t bus_id, uint32_t bus_speed);
|
||||||
|
|
||||||
// Configure DCMI hardware interface.
|
// Configure DCMI hardware interface.
|
||||||
int sensor_dcmi_config(uint32_t pixformat);
|
int sensor_dcmi_config(uint32_t pixformat);
|
||||||
|
|||||||
@ -166,7 +166,7 @@ __weak int sensor_reset()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sensor_probe_init()
|
int sensor_probe_init(uint32_t bus_id, uint32_t bus_speed)
|
||||||
{
|
{
|
||||||
int init_ret = 0;
|
int init_ret = 0;
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ int sensor_probe_init()
|
|||||||
mp_hal_delay_ms(10);
|
mp_hal_delay_ms(10);
|
||||||
|
|
||||||
// Initialize the camera bus.
|
// Initialize the camera bus.
|
||||||
cambus_init(&sensor.bus, ISC_I2C_ID, ISC_I2C_SPEED);
|
cambus_init(&sensor.bus, bus_id, bus_speed);
|
||||||
mp_hal_delay_ms(10);
|
mp_hal_delay_ms(10);
|
||||||
|
|
||||||
// Probe the sensor
|
// Probe the sensor
|
||||||
|
|||||||
@ -73,7 +73,7 @@ int sensor_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Detect and initialize the image sensor.
|
// Detect and initialize the image sensor.
|
||||||
if ((init_ret = sensor_probe_init()) != 0) {
|
if ((init_ret = sensor_probe_init(ISC_I2C_ID, ISC_I2C_SPEED)) != 0) {
|
||||||
// Sensor probe/init failed.
|
// Sensor probe/init failed.
|
||||||
return init_ret;
|
return init_ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,7 +99,7 @@ int sensor_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Detect and initialize the image sensor.
|
// Detect and initialize the image sensor.
|
||||||
if ((init_ret = sensor_probe_init()) != 0) {
|
if ((init_ret = sensor_probe_init(ISC_I2C_ID, ISC_I2C_SPEED)) != 0) {
|
||||||
// Sensor probe/init failed.
|
// Sensor probe/init failed.
|
||||||
return init_ret;
|
return init_ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,7 +134,7 @@ int sensor_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Detect and initialize the image sensor.
|
// Detect and initialize the image sensor.
|
||||||
if ((init_ret = sensor_probe_init()) != 0) {
|
if ((init_ret = sensor_probe_init(ISC_I2C_ID, ISC_I2C_SPEED)) != 0) {
|
||||||
// Sensor probe/init failed.
|
// Sensor probe/init failed.
|
||||||
return init_ret;
|
return init_ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user