Demo3 Serial Number - read source code

The following “C” code can be used to read the Demo3 Serial Number.
This can be useful for applications that need to uniquely identify multiple Demo3 boards.

ap_u32 eepromBase = 0;
ap_GetRegisters(apbase, 0, 0x64, 0x40, 8, 16, 1, &eepromBase);
eepromBase = 0xA0 | (eepromBase & 0x0E);
ap_u32 c[10] = {0};
ap_GetRegisters(apbase, 0, eepromBase, 0x7FF0, 16, 8, 10, c);
char serialNumber[10] = {0};
for (int i = 0; i < 10; ++i)
serialNumber[i] = (char)c[i];

 

Or use the new: ap_GetCameraSerialNumber(pCameraHandle[camera])