Procedure for Adding a New Sensor

Follow the procedure below to add a new sensor.
  1. Declare a private sensor structure that packed the “SENSOR_FUNCTS” structure and necessary variables.

    For the MIPI sensor, you can refer to the files of imx219mipi.c and imx219mipi.h. Related to the DVP sensor, you can refer to the files of sc2235dvp.c and sc2235dvp.h.

  2. Implement member functions based on the structure of “SENSOR_FUNCS”.
    The following member functions are required.
    • GetModeIdx
    • GetMode
    • GetState
    • GetInterfaceInfo
    • Enable
    • Disable
    • Destroy
    • GetInfo
    • GetRegister
    • SetRegister
    • GetGainRange
    • GetCurrentGain
    • SetGain
    • GetExposureRange
    • GetExposure
    • SetExposure
    • SetExposureAndGain
  3. Implement a creation function for the private sensor structure initialization.
  4. Add the sensor creation function into the “InitialiseSensors[]” structure.
  5. Add the sensor name into the “Sensors[]” structure.
  6. Add the file names with ".c" and ".h" extensions into the file CMakeLists.txt.
  7. Re-build the ISP SDK to test the sensor functions.