u32mux;///< Sensor multiplexer, currently 0 (SENSOR_DETECT, SENSOR_MUX_10359 or SENSOR_NONE)
u32mux;///< Sensor multiplexer, currently 0 (SENSOR_DETECT, SENSOR_MUX_10359 or SENSOR_NONE)
u32broadcast_addr;///< For MUX: broadcast address for connected sensors, for single sensor it's 0, for mux: 3
u32sensor[MAX_SENSORS];///< Without mux only [0] is used, with 10359 - 0..2 are used (i2c addressing is shifted so 0 is broadcast)
u32sensor[MAX_SENSORS];///< Without mux only [0] is used, with 10359 - 0..2 are used (i2c addressing is shifted so 0 is broadcast)
u16par2addr[MAX_SENSORS][MAX_SENSOR_REGS];///< Big LUT. SENSOR_REGSxxx par to sensor reg 'yyy' internal address: haddr+laddr for 16 bit
//u16 par2addr[MAX_SENSORS][MAX_SENSOR_REGS]; ///< Big LUT. SENSOR_REGSxxx par to sensor reg 'yyy' internal address: haddr+laddr for 16 bit
u8haddr2rec[MAX_SENSORS][MAX_FPGA_RECS];///< Big LUT (but almost empty). Sensor's page address (haddr of reg addr) to fpga i2c record number (fpga line#)
// u32 for error handling
u32par2addr[MAX_SENSORS][MAX_SENSOR_REGS];///< Big LUT. SENSOR_REGSxxx par to sensor reg 'yyy' internal address: haddr+laddr for 16 bit
//u8 haddr2rec[MAX_SENSORS][MAX_FPGA_RECS]; ///< Big LUT (but almost empty). Sensor's page address (haddr of reg addr) to fpga i2c record number (fpga line#)
// u32 is for error handling
u32haddr2rec[MAX_SENSORS][MAX_FPGA_RECS];///< Big LUT (but almost empty). Sensor's page address (haddr of reg addr) to fpga i2c record number (fpga line#)
@@ -318,9 +322,10 @@ int mt9f002_pgm_detectsensor (int sensor_port, ///< sensor port
...
@@ -318,9 +322,10 @@ int mt9f002_pgm_detectsensor (int sensor_port, ///< sensor port
add_sensor_proc(sensor_port,onchange_detectsensor,&mt9f002_pgm_detectsensor);// detect sensor type, sets sensor structure (capabilities), function pointers NOTE: will be called directly, not through pointers
add_sensor_proc(sensor_port,onchange_detectsensor,&mt9f002_pgm_detectsensor);// detect sensor type, sets sensor structure (capabilities), function pointers NOTE: will be called directly, not through pointers
add_sensor_proc(sensor_port,onchange_initsensor,&mt9f002_pgm_initsensor);// resets sensor, reads sensor registers, schedules "secret" manufacturer's corrections to the registers (stops/re-enables hardware i2c)
add_sensor_proc(sensor_port,onchange_initsensor,&mt9f002_pgm_initsensor);// resets sensor, reads sensor registers, schedules "secret" manufacturer's corrections to the registers (stops/re-enables hardware i2c)
//add_sensor_proc(sensor_port,onchange_exposure, &mt9x001_pgm_exposure); // program exposure
//add_sensor_proc(sensor_port,onchange_exposure, &mt9x001_pgm_exposure); // program exposure
//add_sensor_proc(sensor_port,onchange_window, &mt9x001_pgm_window); // program sensor WOI and mirroring (flipping)
add_sensor_proc(sensor_port,onchange_window,&mt9f002_pgm_window);// program sensor WOI and mirroring (flipping)
//add_sensor_proc(sensor_port,onchange_window_safe, &mt9x001_pgm_window_safe); // program sensor WOI and mirroring (flipping) - now - only flipping? with lower latency
add_sensor_proc(sensor_port,onchange_window_safe,&mt9f002_pgm_window_safe);// program sensor WOI and mirroring (flipping) - now - only flipping? with lower latency
//add_sensor_proc(sensor_port,onchange_limitfps, &mt9x001_pgm_limitfps); // check compressor will keep up, limit sensor FPS if needed
//add_sensor_proc(sensor_port,onchange_limitfps, &mt9x001_pgm_limitfps); // check compressor will keep up, limit sensor FPS if needed
//add_sensor_proc(sensor_port,onchange_gains, &mt9x001_pgm_gains); // program analog gains
//add_sensor_proc(sensor_port,onchange_gains, &mt9x001_pgm_gains); // program analog gains
//add_sensor_proc(sensor_port,onchange_triggermode, &mt9x001_pgm_triggermode); // program sensor trigger mode
//add_sensor_proc(sensor_port,onchange_triggermode, &mt9x001_pgm_triggermode); // program sensor trigger mode
...
@@ -345,18 +350,17 @@ int mt9f002_pgm_detectsensor (int sensor_port, ///< sensor port
...
@@ -345,18 +350,17 @@ int mt9f002_pgm_detectsensor (int sensor_port, ///< sensor port
//NOTE 353: hardware i2c is turned off (not needed in 393)
//NOTE 353: hardware i2c is turned off (not needed in 393)