eth32_get_firmware_release

int eth32_get_firmware_release(eth32 handle, int *major, int *minor);

Summary

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.

Parameters

  • 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.

Return Value

This function returns zero on success and a negative error code on failure. Please see the Error Codes section for possible error codes.

Example
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);
         
See Also

eth32_get_serialnum