int eth32_get_firmware_release(eth32 handle, int *major, int *minor);
This function retrieves the release number (version number) of the firmware on the device. The firmware version consists of a major number and minor number. When displayed as a string, it is typically formatted as major.minor with minor zero-padded to three digits if necessary. For example, for release 2.001, the major number is 2 and the minor number is 1.
handle - The value returned by the eth32_open function.
major - Pointer to a variable which will receive the major number of the firmware version.
minor - Pointer to a variable which will receive the minor number of the firmware version.
This function returns zero on success and a negative error code on failure. Please see the Error Codes section for possible error codes.
eth32 handle;
int result;
int major;
int minor;
// .... Your code that establishes a connection here
result=eth32_get_firmware_release(handle, &major, &minor);
if(result)
{
// Handle error
}
printf("The device's firmware version is %d.%03d\n", major, minor);