/
board_data file info

board_data file info

In DevWareX’s Register Dialog under “Pages”, the pull-down allows selection of a specific register page from the SDAT file. There is also any entry for “Demo3” - these registers are from the Demo3 CDAT file, located in the boards_data folder.

Custom Listings of CDAT files

If you’ve created a new Transport Layer, you may have additional chips on the same bus as the sensor.

To have the registers of non-sensor chips show in the Register panel, you need to set the pCamera->chip pointer to an array of mi_chip_t structures, and set pCamera->num_chips. How you do that is up to you. Using cdat files is one way to populate those data structures, but not the only way.

 

The most primitive way to do that is to statically declare an array of mi_chip_t, and set pCamera->chip and pCamera->num_chips in your open() function.

 

static mi_chip_t my_chips[] = { … };

pCamera->chip = my_chips;

pCamera->num_chips = sizeof(my_chips) / sizeof(my_chips[0]);

 

Each mi_chip_t in turn has a pointer to an array of mi_reg_data_t for the chip's registers. Each mi_reg_data_t has an optional pointer to an array of mi_bitfield_t for the bitfields.

 

You can create a std::vector's for the chip array and registers arrays, and use the vector.data() and vector.size() functions for the array pointers and sizes.

 

std::vector<mi_chip_t> chips;

std::vector<std::vector<mi_reg_data_t>> chip_regs;

/* fill in arrays, not shown */

for (size_t c = 0; c < chips.size(); ++c)

{

    chips[i].regs = chip_regs[i].data()

    chips[i].num_regs = chip_regs[i].size();

}

pCamera->chip = chips.data();

pCamera->num_chips = chips.size();

 

Define New CDAT files

If you want to use cfg file + cdat files, that feature is exposed to transports through the helper functions.

As examples, open the file board_data/MI_100E.cfg, and Demo3_5559.cdat.

In your open() function set pCamera->productID to match the name of your MI_XXXX.cfg file. Then call

HelperFn->getBoardConfig(pCamera, sensor_dir_file);

 

Call the free from your close() function and if the open() fails after you called getBoardConfig().

HelperFn->freeBoardConfig(pCamera);

Related content

DevWare Python
DevWare Python
Read with this
Capturing Sensor Initialization Settings
Capturing Sensor Initialization Settings
More like this
Transport DLL Development Guide
Transport DLL Development Guide
Read with this
Register Overwrite User Guide
Register Overwrite User Guide
More like this
ApBase API Development Guide
ApBase API Development Guide
Read with this
Demo2X and Demo3 Sensor GPIO information
Demo2X and Demo3 Sensor GPIO information
More like this