int eth32_set_counter_value(eth32 handle, int counter, int value);
This function loads a new value for the specified counter on the device. Since a counter is used to count the number of pulses / clocks from an external source, this function is typically not used frequently. It is useful for initializing the counter. All counters begin with a value of zero after powerup or reset.
handle - The value returned by the eth32_open function.
counter - Specifies the counter number (0 or 1).
value - Specifies the new value to load into the counter. For counter 0 (a 16-bit counter), this may be 0-65535. For counter 1 (an 8-bit counter), this may be 0-255.
This function returns zero on success and a negative error code on failure. Please see the Error Codes section for possible error codes.